Google Analytics is one of the best free tools for measuring your website’s performance, but getting it set up can feel daunting if you are not a developer. I’m going to show you a way that is easy and effective — whether you know code or not.
At SiteCrafting, we install Google Analytics through Google Tag Manager. This allows for easy customizations like cross domain tracking and personally identifiable information filtering. Having Google Tag Manager and Google Analytics connected also opens the door for event-tracking without having to use complex code or a developer.
The first part of this process starts with getting all of your accounts activated. Some tips for creating your accounts:
- We recommend using an internally shared account as your main login, so others on your team can log in to make modifications or take over when you win the lottery and move to the Caribbean.
- When you create your Google accounts, make sure you use the same credentials in Tag Manager and Analytics.
Google Tag Manager
For Google Tag Manager you will need to log in and create a new container. I recommend doing this on an internally shared account so others will be able to make modifications or take over should there be organizational restructuring. Once on the home screen, click “Create Account.”
Follow the prompts to get a new account set up. Once you have created your account you will be prompted to Install Google Tag Manager. Disregard this if you are going to use the WordPress Plugin method. If you are not using a plugin, follow the prompts from Google.
Installing Google Tag Manager in WordPress
If you have a WordPress site, our favorite method is to use the Google Tag Manager For WordPress Plugin. Simply enter your Google Tag Manager ID into the appropriate field and you’re good to go.
To find your Google Tag Manager ID, navigate to Google Tag Manager, and click the Admin tab near the top of the screen. In the container section, there’s a line of text that starts with GTM-XXXXX and contains various numbers and characters after. This is your Google Tag Manager ID.
Google Tag Manager For WordPress Plugin has a few options for code placement. The Codeless injection option is probably one of the easiest, however, there is a remote possibility that could cause issues for the front end of your website.
At SiteCrafting we have made the required modifications to our templates so we generally use the “Custom” placement, however, this is all up to you and how comfortable you are with modifying your website’s front end.
Once you have entered that information in the plugin you are all set to start adding tags to your website through Google Tag Manager.
If you have already set up a Google Analytics account, skip ahead to the “Tying it all Together” section.
Google has created this intuitive step by step walkthrough to help you get an account set up. Follow the steps to sign up and you will end up on the Tracking Code page of the property level of Google Analytics. This page will walk you through installing Google Analytics to your website by using the Global Site Tag (gtag.js). Since we are using Tag Manager instead, we do not need to worry about this.
And now you have set up Google Analytics.
Tying it all Together
Now that you have an Analytics and Tag Manager account, you are ready to use them together to measure your website’s success.
Pro tip: For the next few steps I find it helpful to have two screens open, one with Google Analytics and One for Google Tag Manager.
- In Google Tag Manager, start by creating a new variable. I find it useful to name this variable Google Analytics ID.
2. Next, select the Google Analytics Settings variable type in the dropdown under “Utilities.”
3. Fill in the tracking ID from your Google Analytics Account. This can be found in Google Analytics under “Property”, on the Tracking code page.
4. Once your tracking ID is filled in, set the Cookie Domain to auto, and click save.
5. Next, in Google Tag Manager, click tags and create a new tag.
6. Name your tag.
7. Click into the tag configuration box and choose the Google Analytics: Universal Analytics choice.
8. Under track type, select Page View, and under Google Analytics Settings select the variable that you created earlier.
9. Next, click into the triggering box and select the “All Pages” trigger.
10. Click save, submit your changes in tag manager and you are all set.
And there you have it, tracking user actions like clicks, downloads, and calls to action will be easy now that you have Google Tag Manager and Analytics installed on your website. Tag Manager allows you to be creative with your tracking without the need of a developer. And with Google Analytics integrated, you can effectively report on the success of your website content.