How To Add Google Analytics To Your Website

Nivo Digital

23 January 2018

Share This Post

Google Tag Manager is Google Analytics right-hand matey. Together they make tracking website visitor much easier because once you have installed GTM to your website you won’t need to touch your website’s code ever again.

Any changes you want to your website, with respect to tracking, can then be carried out from within the Google Tag Managers interface. There are just a few steps to adding Google Analytics to your website using Google Tag Manager, so here they are.

Step 1: Create a GTM Account

After you have created a Google Tag Manager account, you will be given 2 pieces of code to add to your website. This is an essential one time step that will need to be completed before you can do anything else.

Step 2: Get GA Tracking Code

In your Google Analytics account, click on settings/admin and in the PROPERTY column click on “Property Settings” here you will find your GA code.

Step 3: Create a GA Variable

Within the GTM interface click on the option called “Variables” and create a “New”. Click on the variable type and select Google Analytics Settings. Then add in your Google Analytics Tracking ID.

Step 4: Creating a Tag

Now you have your GA variable in place you will need to create a tag. You can do this by clicking on the “Tags” option in the sidebar and then “New”. Give it a name “Google Analytics” then select Universal Analytics > Page View > Google Analytics Settings (the variable you set up in the step before) and then for the triggering select “All Pages” and SAVE.

Step 5: Publish and Test

Now you should be set, you just need to check if it’s working correctly. On the main page, on the top right you will see the submit button.

Click this and save.

There are 3 ways you can see if everything is working correctly.

  1. Use Google Tag Assistant – your GA tag should appear in the list
  2. Preview – Instead of clicking the Submit button, select the Preview button and head on over to your website. Refresh the page and you will notice white footer bar. In this bar, you will see your GA tag firing
  3. In your Google Analytics account, click on the Real-Time > Overview and you should see people live on your website right now.

In conclusion

By successfully setting up your Google Analytics tracking on Google Tag Manager, you will open your website tracking options up to a new level. This is just the start, go forth and get tracking.