Installing Google Analytics in WordPress for Beginners
In this blog post, you’re going to learn exactly how to install Google Analytics on your WordPress website and we’ll cover three methods you can choose from to easily add Google Analytics to WordPress. You can choose which method works best for you. See, knowing how your audience interacts with your website is crucial to your site’s success. If you’re ready to let’s get started once you start a blog your number one goal is to get more traffic and subscribers and have Google Analytics on your site, well that helps you make the data-driven decisions you need by showing you the stats that matter.
With Google Analytics, you can see stats like who’s visiting your site, which posts are the most popular, and how people interact with your site and a lot more. To get Google Analytics on your site you first need to have an analytics account so let’s go to analytics.google.com if you don’t have an account yet you can sign up there. From there you may choose the website and choose account name then setup your property and then go ahead and add our website address here.
Now we can choose the category that the site is about and we can set up a reporting zone now we can scroll down and click get tracking ID and now we see the tracking ID here.
Syncing Google Analytics With Your Website
Okay so we’ve set up our Google Analytics, now we need to go to our website and set it up so that they’re in sync. Alright, now we need to install it on our WordPress dashboard I’m going to go ahead and leave this tab open but I’m going to head over to my WordPress dashboard and from here like I said where I’ll show you three different ways that you can use them choose one of these three and the first one is by using a plug-in. Let’s go to plugins, add new, I’m looking for a MonsterInsights you see it’s the Google Analytics for WordPress by MonsterIinsights that’s the one we want so we’ll click install now and then we need to activate it.
Once that’s activated let’s go ahead and configure it you see you have a notification to do that so we can click it up here or we can even go down to settings.
I’m going to click on the analytics settings notification. Alright from here you can see that we can authenticate it with our Google account so just click that button and it will walk us through it to authenticate I’ll click Next, click Next, and I need to click to get the Google code it will open up a new area where I need to give permissions to view the data so let’s click allow and it’s looking for this piece of code that we want to copy, head back over here and let’s paste that.
Click next from here you need to choose an analytics profile that’s the one that we just set up so let’s pick that one. And then when it’s done as we’re all set so we can close this out and then it puts us back into our MonsterInsights area now we just need to click Save Changes and now when we head over to our dashboard in the future once Google Analytics has started tracking data then we’ll see all the data here.
Different Analytic Method
Our second method is another plugin so let’s head back over to our plugins area, add new, and for this one, we, want to install insert headers and footers.
This is a great way for you to install a track, different tracking information either in the header section or the footer section without having to mess with your WordPress theme and we actually maintain this with shaneperry.co – it’s a free plug-in for you to use. You can click install now and activate. Now that it’s activated we can head over to our settings area, Insert Headers and Footers and remember I said we keep our Google Analytics open I’m going to head back over to that page we need to copy this script, once we copy it you can go back over to our WordPress dashboard and we need to paste that script in our scripts and header section.
So I’m going to click in here right-click and paste it. I want to make sure that you save your changes and now Google Analytics is still able to track your data. The difference between header, Insert Headers and Footers and MonsterInsights is that with MonsterInsights you could see a lot of your data and your analytics from within your WordPress dashboard which was great because you don’t have to leave it.
Headers And Footers
With Insert Headers and Footers, although it’s doing a great job of tracking, you’ll need to go to your Google Analytics to see any of your data. The third method is more for advanced users and we don’t usually recommend it because the code can disappear if you change themes and you would either add this directly to your header.php file or you can use this quick functions that we created to add your code here and then you would add that to your functions.php file and now you’ve added Google Analytics to your website and you can start tracking the data that means the most to you.
Did you learn something from today’s post? If so leave a comment below and we’ll send more helpful tips to help you manage your WordPress website!