Setting up Google Analytics with Google Tag Manager

January 18, 2019

Setup Google Analytics

Click here to go to the Google Analytics webpage and log in to your Google account if you haven’t done so already. Once logged in, click on Sign up as shown in the screenshot below

Google Analytics / Google Tag Manager - Sign Up

You’ll be taken to the ‘New Account’ screen where you will enter the following information:

  • What would you like to track?
    • ​Select Website.
  • Account Name
    • Choose a unique name for this account.
  • Website Name
    • Insert the company’s name.
  • Website URL
    • Using the drop-down menu on the left-hand side, indicate whether your site is using http or https.
    • Insert the website address on the right-hand side.
  • Industry Category
    • Select the category that you feel best defines your business.
  • Reporting Time Zone
    • This should default to your timezone.
      • If not, correct as needed.
  • Data Sharing Settings
    • You can uncheck the following:
      • Google products & services
      • Benchmarking
      • Technical Support
      • Account specialists

Your screen should look like the image below (with your own information, of course).

Google Analytics / Google Tag Manager - New Account

If everything looks good, click the Get Tracking ID button and a general Terms and Conditions popup will prompt you to accept their, well, terms and conditions in order to move forward.

On the next screen, locate your Tracking ID as shown in the screenshot below. This is an important piece of information as this is what Google uses (among other pieces of code) to track information about your website.

Google Analytics / Google Tag Manager - Tracking ID

Setup Google Tag Manager

Let’s take a quick pause from Analytics and move into Google Tag Manager. Keep this window open as we will reference the tracking ID and click here to load Google Tag Manager.

  • Account Name
    • Type in an account name.
  • Share data anonomously with Google and others
    • You can go ahead and uncheck that.
  • ​Click Continue
  • Container Name
    • Enter the URL of your website without http:// or https://.
  • ​Where to Use Container
    • Select the Web option.

Your screen should look like the image below (with your own information, of course).

Google Analytics / Google Tag Manager - New Google Tag Manager

If everything looks good, click CREATE and a general Terms and Conditions popup will slide in and prompt you to accept their, well, terms and conditions in order to move forward. Anybody getting déjà vu?

Accept the terms and you should be directed into the workspace that Google Tag Manager has created for you. Disregard the small popup window containing two snippets of code. We will not be doing anything with that code.

Here is a general idea of what the workspace area will look like:

Google Analytics / Google Tag Manager - Workspace

Let’s create a variable in order to tie in our Google Analytics account with Google Tag Manager:

  • In the left-hand navigation, click on Variables.
  • In the User-Defined Variables section, click on New.
  • Name your variable, gaTrackingID.
  • Click anywhere within the Variable Configuration box to open the variable type list.
  • Scroll down to the Utilities section and choose Constant.
  • Go back to the Google Analytics window we left open earlier.
    • Copy/paste the Tracking ID from here into the Value field within Google Tag Manager.
  • Your screen should look like this right before we hit save:

Google Analytics / Google Tag Manager - Google Tag Manager Variable

  • Click on Save and you will be taken back to the main workspace page.

​Next, we will want to set up a Tag.

  • In the left-hand navigation, click on Tags.
  • Click on New.
  • Name your tag, Pageviews.
  • Click anywhere within the Tag Configuration box to open the tag list.
  • Click on Universal Analytics.
  • Track Type
    • Choose the Page View option.
  • Google Analytics Settings
    • Leave blank and checkmark the Enable overriding settings in this tag option.
    • The Tracking ID box should appear.
    • Click on the LEGO-looking icon.
    • Select your gaTrackingID variable we had set up earlier.
    • Leave More Settings and Advanced Settings alone.
  • Your screen should look like this before we hit save:

Google Analytics / Google Tag Manager - Google Tag Manager Pageviews

  • Click on Save and return to the workspace screen.
  • If you are prompted to set up a trigger, ignore for now and return to the workspace screen.

When our Pageviews tag gets set off, Google Tag Manager sends information over to Google Analytics to process and display. However, that does not happen unless we set up a trigger rule. Let’s do so right now.

  • In the left-hand navigation of of your workspace, click on Triggers.
  • Name your trigger, Page View Trigger.
  • Click anywhere within the Trigger Configuration to open the trigger type list.
  • Underneath the Page View section, select the Page View option.
  • This trigger fires on
    • Choose the All Page Views option.
  • Your screen should look like this before we save:

Google Analytics / Google Tag Manager - Google Tag Manager Trigger

  • Click on Save and return to your main workspace screen.

Click back to your Pageviews tag so you can add this newly-triggered rule to this tag.

  • Click on your Pageviews tag.
  • Click anywhere within the Triggering section.
  • Click on your Page View Trigger trigger
  • Click Save and you’ll return back to your main workspace screen.

[/vc_column_text][/vc_column][/vc_row][vc_row css=”.vc_custom_1551218486272{padding-top: 2em !important;padding-bottom: 2em !important;}”][vc_column][vc_column_text]

You’re almost done!

Within Google Tag Manager, we have created a variable, tag, and trigger. However, all of these changes have not been published to go live yet. In order to do so, click on SUBMIT in the upper right-hand corner of the workspace screen.

  • Version Name
    • Type in what you would like to call this initial launch.
  • Version Description
    • Type in a brief summary of the changes you committed throughout this version.

Your screen should look like this before we publish:

Google Analytics / Google Tag Manager - Google Tag Manager Publish

Tracking Code

  • Click on PUBLISH.

Awesome! All of your edits have been made official. The next step is to place the tracking code within your website. Here is how to find the tracking code.

  • Go to your Google Analytics account and in the left-hand navigation, click the Admin option.

Google Analytics / Google Tag Manager - Admin Panel

  • In the middle column labeled, Property, click on Tracking Info, followed by Tracking Code.

Google Analytics / Google Tag Manager - Tracking Code

 

​In the Global Site Tag section, you should see a small snippet of html code that will need to be included on your website. Copy that and use that in your code.

 

by Jonathan Watson

You May Also Like…