How-Tos
October 23, 2024
Thomas Bosilevac

Install, Preview, Publish and Test Google Tag Manager [Step 3 of 4]

We are now ready to start the data collection process. This quick post will show you step by step the best practices in installing Google Tag Manger (easier than you thought) for WordPress, Shopify, or any site.

  1. Best steps to setup a “AAA” Google Analytics Property
  2. Best steps to setup a “AAA” Google Tag Manager (GTM) container
  3. [Install] and Publish changes to start seeing the results!
    1. Installing and Publishing for WordPress
    2. Installing and Publishing for other sites
    3. Notes for eCommerce Sites
    4. Previewing changes made in GTM
    5. Publishing changes made in GTM
  4. Customizing your Google Analytics View Settings

[Step 3] Installing, Previewing and Publishing Google Tag Manager3.a  Generic option to add GTM on any website (or web page)To add Google Analytics or Google Tag Manager to any website drop the code near the opening <head> tag and the second portion of the code near the opening <body> tag.3.b  Options to install Google Tag Manager on WordPressThere are many plugins that can aid this process and install the tracking code for you. We tend to like the DuracellTomi’s Google Tag Manager for WordPress plugin.To add Google Analytics or Google Tag Manager to WordPress without a plugin you can edit your theme’s header.php file and drop the code near the opening <head> tag and the second portion of the code near the opening <body> tag.3.c  Notes of Caution for eCommerce websitesThese instructions, while already quite extensive, do not cover additional steps needed to track eCommerce metrics such as Revenue, Transaction Rate, Top Products and more.  SaaS systems like Shopify and Magento (along with WooCommerce which is supported by the plugin above) have good built in an amazing plugins available to get you going with little development.The settings in this article in many ways should be made in addition to other eCommerce configurations.  While the container provided is designed to work for any website, including Shopify and Magento, there may be small tweaks needed (shutting off the “pageview” tag in GTM for instance).

3.d Previewing changes made in Google Tag Manager

I know, I know, you want to see this data in Google Analytics!  We will make this as quick and painless as possible.  At least during this step you will start to see all this hard work in action.  Google Tag Mangager (GTM) allows YOU to see all these new settings in action before loading up for EVERYONE.  Again, developers paradise.

  1. Make sure you are at the very top of the page and select Workspace within Google Tag Manager
  2. Choose Overview from the menu on the left
  3. Notice all those “Workspace Changes”.  Want to add those by hand?  We didn’t think so.
  4. On the top right hand side click the Preview Button (White backgroud button)
  5. Once completed, while not loaded for other visitors of the website, your browser will load changes allowing you to test all tags, triggers, variables, the dataLayer and more.
  6. If desired, you can even have a developer, a whole team, or an outside consultant take a look.
gtm - preview mode

3.e Publishing changes made in Google Tag Manager

Now the moment you have been waiting for:  actual data collection.

  • We have prepared a test Google Analytics Property to collect data in (without impacting the data your boss looks at)
  • We have configured the property with the best settings for 2020
  • We have installed Google Tag Manager and it appears on all our pages, now let’s see the good stuff!
  1. On the top right hand side click the Submit Button (Blue background button)
  2. Provide the Version a name such as “Launching the MashMetrics changes”
  3. Provide a description, copy the description below to set a good example for others:
    *Added TEST Property Pageview and Event Tags
    *Added YouTube Video Tracking
    *Added Scroll Tracking
    *Added Time on Page Tracking
    *Added Phone Number and email Tracking
    *Added Outbound Click Tracking
    *Added SessionID Custom Dimension
    *Added Client Timestamp Dimension
    *and more, see version changes
  4. PRESS PUBLISH! (Hey, I am not a fan of All Caps either, but I think after all you have been through you deserve it!)
  5. Sing like no one is listening (or another cute phrase) while waiting, it shouldn’t be long.
  6. DONE!  The Version name and description along with all the changes will be listed.  Your analytics life has just got A LOT easier.

3.f  Check Real-Time Reporting

Now it time to start testing (or simply being amazed by) the setup.  We will be able to see (limited) reporting in real time.

Go to the Google Analytics Property and View you have just created

  1. Go to Reporting > Real-Time
  2. Choose the Content reports
  3. Look to make sure Pageviews are being recorded.  (You may want to go to your website and start clicking around)
  4. Now enter the Events report, and watch the various on-page activity being tracked with the help of Google Tag Manager (and little else!)
Go to the Google Analytics TEST Property and View created with the TEST DEMO account and review the Real-time Reporting. 1) Go to Reporting > Real-Time 2) Content 3) Pageviews (Last 30 minutes) Look to make sure hits are coming in on the TEST Account
Go to the Google Analytics Property and View created and review the Real-time Reporting. 1) Go to Reporting > Real-Time 2) Events 3) Events (Last 30 minutes) Look to make sure hits are coming in on the TEST Account