In this video, I will show you how to add your google analytics code to your GeneratePress website without a plugin.
GeneratePress Premium has an amazing hook system that we can use to do this too.
- First, you will need to log into your WordPress admin area
Hover over appearance and click on the GP Hooks option
- You will need a hook called wp_head
- Next, open a new browser tab and go to your Google Analytics dashboard, click on the view you wish to use for tracking and click on the admin button at the bottom left. In the middle column click on the tracking info menu and choose the tracking code option. From here select the whole code and copy it.
- Go back to your website tab and paste the code into the wp_head hook area
- Hit save and go to a specific page on your website
In the Analytics browser tab, go to the real-time menu and click on the overview option. At this point, you should pop up as you are browsing around your website 🙂
- GeneratePress Premium
- Google Analytics