Adding Google Analytics to your website - AGENCY 18

Adding Google analytics to your website

“Using the Google Tag Manager for WordPress plugin, you don’t need to edit any code. Just install the plugin and copy paste the Google Tag Manager ID after activating the plugin and going to the settings.”

Getting started.

First things first, before you can use Google Analytics you have to set up Google Analytics on your website of course.

If you don’t already have a Google Analytics account, you can quickly create one for free on the Google Analytics website!

To create a Google Analytics account:

  1. Click here to go to Google AnalyticsNote: If you have a Google account, and are not signed in, click Sign in. If you do not have a Google account, click Create an account.
  2. Once you have signed in to your Google account, click Access Google Analytics.
  3. Click Sign up.
  4. Fill in your Account Name, Website Name, Website URL, and select an Industry Category and Reporting Time Zone.
  5. Under Data Sharing Options, check the boxes next to the options that you want.
  6. Click Get Tracking ID.
  7. From the Google Analytics Terms of Service Agreement that opens, click I Accept.
  8. Write down the Tracking ID for setup on your website.

Installing Google Analytics using Google Tag Manager .

The next thing you have to do is set up Google Analytics on your website. If you’re running WordPress like us, there are three different ways to do this:

  1. Implement the Tracking ID manually in your WordPress theme (only if you know how to code, ask your developer otherwise)
  2. Use a plugin like Monster Insights to add the basic tracking functionality to your website quickly
  3. Take a little longer approach by using Google Tag Manager to implement the tracking ID.

Our preference goes to the last method.

Google Tag manager not only allows you to implement Google Analytics on your website, but it also gives an easy way to deploy and manage all other marketing tags (snippets of code or tracking pixel, think Facebook Pixel, Snapchat pixel, etc.) to your website without you needing a developer at all.

So head over to Google Tag Manager and signup. Next step is creating a new account by entering an account name and location. Followed by entering the name of your website as the container name and choosing web as the place to use the container.


Pretty straightforward right?

Now accept the Terms of Services of Google Tag Manager, and you’re almost good to go.

Copy the tracking snippet given to you and then most importantly the Google Tag Manager ID (looks like GTM-XXXXXXX).

Using the Google Tag Manager for WordPress plugin, you don’t need to edit any code. Just install the plugin and copy paste the Google Tag Manager ID after activating the plugin and going to the settings.


Now we need to add a tag into the Google Tag Manager, do this by pressing the “New Tag” button.

Then you need to come up with a name, so the tag is easily recognisable for future use. We suggest using “Google Analytics”, but feel free to use whatever you want.

Next step, click on the big button in the “Tag Configuration” to begin the setup. There are a lot of different tags to choose from, but the first one is for “Universal Analytics”, that is the one we want.

To not go into too many details right now, you will keep the “Tracking Type” set for “Page view”, and then you choose “New Variable…” in the Google Analytics settings.

In the next screen, you can then enter your Tracking ID from the Google Analytics you set up earlier. Google Tag Manager asks you to name the variable for later use in other places, let’s keep that name as it is.

Next, you can click on the “Choose a trigger to make this tag fire…” button. For a basic Google Analytics implementation select “All Pages”.

The final step now to have Google Analytics working on your website and have it execute on every page is hitting the Submit Button (top right corner):

Giving your changes a version name and hit publish. When Google Tag Manager for WordPress is activated with your Google Tag Manager ID, Google Analytics will now be working on your site.