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.
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.
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.
Now click Display Rules. See the above image.
Under Display Rules select the Location as Entire Site.
Keep the other settings as it is.
That's it. Now hit Publish button.
You can get the tracking code by visiting analytics.google.com.
Here, you select Admin >> Property >> Tracking Info >> Tracking Code.
I hope now you get an idea on how to add Google Analytics to GeneratePress WordPress theme.
you may also like