CXL Institute Course Review: Google Tag Manager (GTM) for Beginners (Part-1)

GTM for Beginners Course by CXL

This article is written as part of the CXL Institute scholarship and covers my Seventh-week of studying the Google Tag Manager for Beginners Course from the Digital Analytics Minidegree. Previously I have covered Google Analytics Intermediate all classes and this week I will be covering the Google Tag Manager (GTM) for Beginners course lessons.

  • Introduction to Google Tag Manager Basics
  • Getting to Know GTM: Tags
  • Getting to Know GTM: Triggers
  • Getting to Know GTM: Variables
  • Getting to Know GTM: Data Layer
  • Getting to Know GTM: Organization
  • Getting to Know GTM: Preview Mode
  • Getting to Know GTM: Workflow
  • Getting Started: Creating Your First Tag
  • Getting Started: Scripts & Pixels
  • Tracking Engagement: Clicks & Time
  • Tracking Engagement: Scroll
  • Tracking Engagement: YouTube Videos
  • Data Layer 101: Storing Details
  • Data Layer 101: Reading Details
  • Tracking Ecommerce: The Basics
  • Deep Dive: Cross-Domain Tracking
  • Deep Dive: Tag Sequencing
  • Deep Dive: Formatting Variables
  • Wrap Up & Resources
  • Final exam – GTM for beginners

Introduction to Google Tag Manager

Google Tag Manager is a tag management system (TMS) that allows you to quickly and easily update measurement codes and related code fragments collectively known as tags on your website or mobile app.

Google Tag Manager makes it easier to manage this mess of tags by letting you define the rules of when certain tags should fire, but first, let’s take a quick overview of GTM.

Google Tag Manager is free software from Google that allows you to deploy various types of code (tags) to your website. Some good examples of a tag would be Google Analytics tracking code, Google Analytics event codes, Google Ads conversion script and remarketing tags. There are many more types of code that can be added to your website using GTM, including custom codes.

Google Tag Manager does not replace Google Analytics. Instead, it helps users to easily add Google Analytics tracking code (tag) to a website, deploy GA event code snippets and define rules when each code must fire.

Getting to Know GTM: Tags

GTM Tag Setup
GTM Tag Setup
  • Tags are snippets of code or tracking pixels from third-party tools. These tags tell Google Tag Manager what to do. Examples of common tags within Google Tag Manager are: Google Analytics Universal tracking code.
  • Now in order to set up a Tag (in this case a Page View tag), you have to define the Trigger and the Variable.

Getting to Know GTM: Triggers

GTM Trigger setup
GTM Trigger setup
  • Trigger is the condition on which the Tag has to fire. It is basically ‘when’ you want the GTM to take action.
  • Example, when a page loads (when a page view happens) on the site, fires the “Page View Tag”.

Getting to Know GTM: Variables

GTM Variables Setup
GTM Variables Setup
  • Variables are values used in triggers and tags to filter when a specific tag should fire. The term variable is used to denote a helper function that your tags, triggers, and other variables can invoke to retrieve values from.
  • To a computer programmer, a variable is a symbol in code that can be used to represent a value that will change.
  • A Tag Manager variable performs that same function. Tag Manager variables are used in both triggers and tags:
  • Variable tells you what other information you want to send with the tag. It basically tells you where to fire the tag.

Getting to Know GTM: Data Layer

A data layer is a JavaScript object that is used to pass information from your website to your Tag Manager container.

Data layer variables enable Tag Manager to read values from your data layer implementation and pass those values to tags, triggers, and other variables. A data layer object is made up of a list of key/value pairs. A key is a category of things – a book’s category, title, or author. Each key could have different values. A book’s title key could have a value of ‘Ulysses’, ‘War and Peace’, ‘A Brief History of Time’, etc.

The instructor showed a very neat example of this through the Scroll Tracking Event where how the values in the Data Layer (in the GTM preview mode) kept on changing as we scrolled through on the website.

Getting to Know GTM: Organization

  • Google Tag Manager Implementations grow over time; it is a good idea to put some strategies in place for how to organize your containers.
  • Most organizations will set up a single Tag Manager account for all of their containers. Within that account, the most common practice is to use a unique container for each website or mobile app.
  • Folders can help you organize a container’s tags, triggers, and variables into logical groups that can help make your Tag Manager configurations easier to manage

Getting to Know GTM: Preview Mode

Google Tag Manager’s Preview Mode allows you to browse a site on which your container code is implemented as if the current container draft was deployed, so that you can test a container configuration before it is published.

GTM Preview mode
GTM Preview mode
  • When you enable the preview mode in the Google Tag Manager interface, you will end up with additional browser tabs (window)
  • To enable Google Tag Manager Debug mode, click Preview button in the top right corner of your GTM interface (near Submit button). Once you click the Preview button, a new browser tab will open with tagassistant.google.com

Getting to Know GTM: Workflow

GTM has a wonderful workflow for their users. When you publish a container, Tag Manager will make your changes active for the environment specified. If you’ve added or edited tags, triggers, and variables in a workspace, you will need to publish those changes to make those changes operational on your website or mobile app.

You can review changes before you publish. Use the More Actions More menu in the Workspace Changes section to view differences between versions for the element in question, or abandon the change. Click on the name of the element in the list to view an expanded detail screen, where you can review what has changed with each element, make last minute changes, or abandon the change.

Getting Started: Creating a First Tag

Tags, in a general sense, are bits of code you embed in your website’s javascript or HTML to extract certain information. You can create unlimited configurations of tags in Google Tag Manager.

With Google Tag Manager, your whole tagging process becomes much easier. All you do is embed a code into your site pages once, and then each time you want to create a tag, Google Tag Manager Codes it and embed it for you.

GTM Tag Setup
GTM Tag Setup

Steps to Create a New Tag in GTM

  • Within your Google Tag Manager dashboard, click the “Add a New Tag” button, circled below in red.
  • Title your tag, and then click anywhere in the top “Tag Configuration” box, to choose a tag type.
  • There are dozens of tag types (they are not all displayed here, and you can also customize a tag type). I chose “Classic Google Analytics”.

Getting Started: Scripts & Pixels

Installing GTM (Script)

  • Create the GTM account or login using the Gmail account create the account with your business name
  • Install the Google Tag Manager code snippet onto your site. There are 2 parts to the code snippet. One goes in the header between the <head></head> section and the other in the <body> before the closing tag </body>. Sometimes your theme has a spot to do this if you don’t want to use a plugin.

Installing the Facebook Pixel

  • The most basic function of the Facebook pixel is to track audiences. Whenever someone lands on your website, Facebook will tag them. This means that you can then use their advertising platform to target the exact same people that visited your website.
  • The first thing we will want to do is click on Variables on the left hand. > Click Configure > and enable “HTML ID” and “Container ID” from the options. (I like to also enable all click and form variables for future use.)

In the next post I will be covering the remaining lessons of Google Tag Manager for Beginners course from Digital Analytics mini degree from CXL. Feel free to come back on every Mondays and read about CXL Digital Analytics mini degree review.

Thank you!

Isak

Isak

I am Isak, founder and author of onlineguider.com blog. A best place to have article through guest posts. I love reading (learning), sharing my skills and knowledge with all over the world using modern digital platforms.
Close
Menu