How To Track Your Site With Google Analytics
Knowing who is using your site and how is a vital part of managing any website.
The more information you have about how people are getting to your site, and what they do when they get get there, the more effectively you can make decisions about how to best design your site, or what it needs in the future.
In order to get that kind of information, you’re going to need to install some form of analytics on your site. There’s lots of web analytics services available out there, but the industry standard is Google Analytics. It’s robust, for most purposes it’s free, it integrates with Google Adwords, and it’s relatively easy to get started. Plus it’s made by Google, the sorcerer-level masters of tracking information across the web.
While Google Analytics is pretty simple to set-up, you WILL need to edit your site’s HTML code directly. Most Content Management Systems (CMS) have a way to do this. If you’re not using a CMS and/or you don’t have access to your site’s HTML code, you’re going to have to get ahold of someone who can in order to install Google Analytics—like us.
1. Sign up for Google Analytics
This step is the most straight-forward. Head over to Google Analytics, hit sign up, and fill out the info for the new project you’re trying to track.
2. Grab your tracking code
If you just signed up, Google will jump you straight to the page with the new tracking code for your first project. Otherwise, click on ‘Admin’ at the top of the page, and then ‘Tracking Info > Tracking Code.’ Your page should look something like this:
Copy the snippet of code, and head over to whatever CMS or HTML editor you're running on your site.
3. Paste into your HEAD tag
You’re going to need to edit the HTML for your site, specifically the HEAD tag. In this case, I’m adding it to a wordpress site, so I’ve logged into my dashboard, and I’ve found the HEAD tag for my page in the header.php file. Depending on how your site is set up, you may need to use a different method to edit your page, but you put the code in the same place either way: You’ll paste in the code snippet right before the closing HEAD tag.
Save (update) the file and you’re done.
4. You now can track who’s on your site!
Back in Google Analytics, click on ‘Reporting’ on the top-left. You’ll immediately get some charts brought up, but those probably won’t have any data right now, since you JUST installed your tracking code: this data is collected every 24 hours or so. That’s fine. Click on ‘Real-time’ on the right. This window shows you who is on your site RIGHT NOW. Hey! Look at that one user: That’s me! (I pulled the site up on my phone to test.)
Now, if for some reason you’re getting errors instead, your tracking code might placed be in the wrong spot. You can verify this using a site called GA Checker to detect whether or not your snippet has been placed correctly. I’m also going to link Google’s troubleshooting page here just in case.
5. Explore and learn more!
A tool is only effective if you know how to use it, so take some time to familiarize yourself with the wealth of data in your Google Analytics account. It’s a powerful resource with a lot of features you can put to work... if you know what you’re doing. Google even offers a Google Analytics Academy that you can use to learn more if you want.
And that’s how it’s done! You should now be up and running with Google Analytics installed on your site. If you’re like me at all, you’re going to just stare at that little map of people logging on and off for hours. (Brazil?? Who’s accessing that site in Brazil?)
Unsure about your company website's performance? Renew your focus on search engine optimization tactics to become a known competitor in your industry or local market.