How To Add Google Analytics To GeneratePress

Mamta
| | September 13, 2020

Disclosure: This page may contain affiliate links. When you click an affiliate link and make a purchase, we get a small compensation at no cost to you. See our Privacy Policy and Disclaimer for more info.

Are you facing trouble in adding tracking code of Google Analytics to GeneratePress powered website? Don't worry, you're covered.

GeneratePress is a multipurpose and responsive WordPress theme. It is a lightweight WordPress theme built with a focus on speed and usability. 

In most of the WordPress themes adding Google Analytics tracking code is much easier to add.

You may add the tracking code by going to Appearance >> Customize under WordPress Dashboard.

Then, under HomePage setting you may get an option to add this code.

But if you are using GeneratePress WordPress theme for your blog you may find adding Google Analytics tracking code a bit tricky as the option to add it is not straight forward.

Though it is super easy to add the tracking code using plugins but I would advise you not to use it. Because the more plugin you use in your blog or website the more heavier your site becomes.

Also Read: Optimize your Blog with proper Off-Page SEO and On-Page SEO

As there are many free plugins available in WordPress and also are very easy to use, users are tempted to use as much plugins as possible even for works which could be implemented by just modifying some codes.

So, it is recommended to use as much less plugin as possible to make your blog faster to load.

Let's see how we can easily add the tracking code in GeneratePress theme.

How To Add Google Analytics Tracking Code to GeneratePress?

What is Google Analytics? Google Analytics is a web analytics service offered by Google that tracks and reports website traffic. It provides real-time statistics and analysis of user interaction with the website. You can get data like your users location, behavior, source of traffic, bounce rate, etc.

To see these data, you first need to add your website to Google Analytics website and get tracking code.

The tracking code is a snippet of JavaScript that collects and sends data to Analytics from a website where tracking code is added.

To add the tracking code to GeneratePress go to WordPress Dashboard and select Appearance >> Elements. Under Elements select Add New.

Then from Choose Element Type select Hook. Now enter headline of your Hook as Google Analytics Tracking Code or any other headline as you may wish.

Below the headline enter the tracking code. see the image below.

How To Add Google Analytics To GeneratePress

Now click Display Rules. See the above image.

Under Display Rules select the Location as Entire Site.

Keep the other settings as it is.

display rules hook generatepress theme

That's it. Now hit Publish button.

NOTE: 

You can get the tracking code by visiting analytics.google.com.

Here, you select Admin >> Property >> Tracking Info >> Tracking Code.

tracking code

I hope now you get an idea on how to add Google Analytics to GeneratePress WordPress theme.

GreenGeeks70% OFF
GreenGeeks
GreenGeeks offers an environment-friendly hosting solution to its customers. Start your website at GreenGeeks Lite Plan at only $2.95 per month. The Plan includes FREE Domain Name, FREE SSL Certificate, FREE Backup, SSD Storage, and others.
GeneratePressBest Seller
GeneratePress
The GeneratePress WordPress theme is used by 200000+ websites. It is less than 30 kb in size which makes your website super light and very fast to load. This theme is very popular among affiliate marketers and is fully customizable. You will also get a 30-days money-back guarantee.
>
Share via
Copy link
Powered by Social Snap