Google Tag Manager for Beginners

  1. Introduction – What is Google Tag Manager?
  2. Setup – How to install GTM?
  3. Tag Deployment – Google Analytics Pageview Tracking
  4. Interaction Tracking – How to Track Button Clicks
  5. Conversion Tracking
  6. Bonus Content


1. Introduction –  What is Google Tag Manager?

Google Tag Manager helps make tag management simple, easy and reliable by allowing marketers and webmasters to deploy website tags all in one place. Register a free Google Tag Manager Account.

Google Tag Manager terms

  • Marketing tag – A piece of JavaScript code that you install to add third party tools to your website.
  • Google Tag Manager – Consolidates your marketing tags into one single tag
  • Trigger – A rule that sets when a marketing tag should be deployed
  • Preview and Debug Mode – In GTM that lets you see which tags fire on your website.


2. Setup – How to install GTM?

You will now see code snippets after your register a Google Tag Manager account.

  1. Copy the first code snippets and paste the code snippet above the </head> in your HTML
  2. Copy the second code snippet and paste it just below the <body> in your HTML

You can check that this is properly installed by visiting your Google Tag Manager dashboard and click the ‘Preview’ button. Next refresh the website you just installed the code snippets on and a sticky modal will appear. In the ‘Summary’ window it should say; ‘There are no Tags in the container.’, which is good because we haven’t set up any marketing tags just yet.

Google Tag Assistant-Chrome Extension Screenshot


3. Tag Deployment – Google Analytics Pageview Tracking

Let’s really get into what GTM is really about: Deploying Marketing Tags. Lets create our first Tag, a Google Analytics Page View Tracking Tag.

  1. Plan & Prepare – Plan and Prepare in an excel sheet. Download our example Excel Sheet: MyDigitalSauce Tag Plan Template – Excel Sheet Make sure you have all the details and assets you’ll need for implementation. Example: go to and sign in and copy your google analytics code to your clipboard.
  2. Implement – Open Next click Tags > New. Select your tag type and paste your google analytics ID in. Next click on the ‘Triggering’  section plus sign. Select ‘All Pages, Page View’. Now save.
  3. Test & Debug – Go to your and refresh the page.  Check the GTM preview modal and your Google Tag Assistant it should show you the tags fired.
  4. Deploy, Publish – In your GTM Workspace area click the ‘Submit’ button. Then click ‘Publish’, then click ‘Skip’ when ‘Container Version Description’ modal pops up.

GTM Triggers Diagram

GTM Triggers

Lets take a look at how we use this on a website. Lets track an ‘Buy’ click on your website, so to follow along make sure you have a demo website that has an ‘Buy’ button.


4. Interaction Tracking – How to Track Button Clicks

This is what GTM is best known for: Deploying Event-Tracking without having to manually install any code. We will explore this concept on Button-Click Tracking. What are ‘triggers’? Anytime an event is registered by Tag Manager, triggers from the container are evaluated and tags are fired accordingly.

  1. In your GTM go to ‘Variables’ and click ‘Configure’. Lets make sure you have your Click *Variables activated. Click ‘Configure’, scroll down to your Click *Variables and check them all.
  2. Go to ‘Triggers’, click ‘New’. Type your title and add a ‘Click – All Elements’ trigger type. Then save the trigger. You can see on your website in the GTM preview window that it will now log all your click events while on the website.
  3. Now lets create a specific trigger. Edit the trigger type, change the trigger fires on option and select ‘Some Clicks’. Choose the conditions ‘Click Classes’ contains ‘your-class’. Type in your class of the element you want to track.
  4. Now lets build a new tag. Title it ‘Google Analytics Event Tag’, choose ‘Universal Analytics’ for the tag configuration. Set the Google Analytics Tracking ID. Change the track type to ‘Event’. Set ‘Category’ to Product and ‘Action’ to Add to Cart Clicks. Go down to the ‘Triggering’ section and choose the specific click trigger you just created.

Google Analytics Real Time

Now when you go inside your Google Analytics dashboard and navigate to Real Time > Events you can see a report of the events that have been tracked. Now you are already able to track GA Events with GTM, which is awesome for when you are trying to get a better understanding of your users behavior. Now lets tie the events together with Conversion Tracking.


5. Conversion Tracking

Conversion tracking is measuring the success rate of your website. Conversions = Success. Conversions can be a Called Number, Click Events, Form Submission or a Product Purchase. An awesome example of conversion tracking is banner ads, if your website has banner ads knowing how often that banner ad is clicked is a good reason to implement conversion tracking.

Lets install conversion tracking on your website. Lets transfer over our Tags and Triggers data to Facebook for Businesses so we can create some Conversion Tracking.

  1. Go to Create a Facebook pixel, copy the tracking code snippet. Create a new Google Tag. Set the Tag Configuration to type of Custom HTML because there is no Facebook option available. Paste the tracking code snippet. Replace
    fbq('track', 'PageView');


    fbq('track', 'AddToCart');
  2. Now choose a trigger, choose the Add to Cart click event. Save the tag. Test your change using your GTM tools and this new tool: Facebook Chrome Extension – Facebook Pixel Helper.

Now you know how to track your conversions with GTM and transfer them to a third party tool like Facebook Pixels.


6. Bonus Content

Google Tag Assistant – Chrome Extension – Google Tag Assistant helps to troubleshoot installation of various Google tags including Google Analytics, Google Tag Manager and more.


Other Tag Management Systems

  • Quibit
  • Adobe Dynamic Tag Management
  • Segment
  • Google Tag Manager
  • TAG COMMANDER Universal Tag Container
  • Tealium
  • ensighten


GTM Resource Guide from Measure School


Simo Ahava’s website is a great blog resource for GTM information: