Google Tag Manager Basics
Orkhan Atesh Isazade
Digital Marketing Expert | Web Analyst | Driving Data-Driven Growth ?? Transforming Data into Insights | ?? Accelerating ROI | ?? Innovating Strategies
This article covers my sixth- week review of studying Digital Analytics Minidegree at CXL Institute. What is CXL Institute?
CXL Institute is a paid training program institute and it provides mini degrees and online certification courses in marketing. All the programs at CXL Institute are taught by industry leaders and top marketers which makes this perform the best place for team marketing.
CXL Institute providing Minidegrees in 5 scopes of Digital Marketing and they are:
- Conversion Optimization
- Customer Acquisition
- Digital Analytics
- Digital Psychology and Persuasion
- Growth Marketing
CXL Institute currently has 48 online courses divided into CRO & UX, Analytics, and Marketing. In this article, I am going to cover the basics of Google Tag Manager, how to set up GA via GTM, events ( video, scroll, and so on.)
What is Google Tag Manager
Google Tag Manager (GTM) is a tag management system (TMS) allowing users to quickly add and edit custom or templated code snippets to a website, called tags. Tags can incorporate tracking analytics, manage pixel advertising, or build additional site features. GTM provides hundreds of predefined tag templates that don't require custom coding.
In short, on your website or mobile device, Google Tag Manager is a user-friendly solution for managing tags or JavaScript snippets that send information to third parties. Adding to the site of other products, like but not limited to AdWords Conversion Tracking and Remarketing, DoubleClick Floodlight, and Google Analytics is a breeze, of course. GTM makes your life simpler in more detail by simplifying the process of adding certain JavaScript snippets to your website. Instead of updating code on your website, you are using the app to decide what to fire and on what page or action to take. GTM then applies the correct monitoring to your website to ensure it works.
Google Tag Manager consists of these three main parts:
- Tag: A snippet of code (usually JavaScript) added to a page.
- Triggers: Defines when and where tags are executed.
- Variables: Used to receive or store information to be used by tags and triggers.
How to install Google Analytics via Google Tag Manager
To get started, I would assume that you have already a Google Analytics and Google Tag Manager account setup. If you want to implement Google Tag Manager, you need to implement the GTM snippet which you can find by clicking just here on you GTM ID
And it will give you snippet codes that you need to install on your website and on every page of your website. First of all the tracking code that needs to be placed in the head section and then one that needs to be placed in the body section.
Depending on your website, you have different methods of installing this. If you use Wordpress, you can use Google Tag Manager for WordPress plugin to install a Google Tag Manager or if you are completely on a different CMS or shop system, you might find other ways to install this.
Google Tag Manager has a lot of different capabilities of deploying codes and will make use of the actual tag te
Navigate to your desired GTM account and container. From the Overview screen, select “Add a new tag.”
Then well give this a name is our Google Analytics pageview tagged and we want to deploy this on all pages
Next, click within the Tag Configuration box to choose a tag type. Select “Google Analytics: Universal Analytics.”
Leave the “Track Type” dropdown set to “Page View.” Next, under “Google Analytics Settings,” choose “New Variable.”
Now you will be creating a variable that contains your special Google Analytics Tracking ID. You will be able to reuse this variable in any future GA tags after a one-time setup. You can also configure the variable settings under "Advanced Configuration," or override settings in a particular tag by checking the "Allow overriding settings" tab.
Find your Tracking ID (you can locate this quickly by going to Tracking Info > Tracking Code within the Admin section of your GA account) and paste it into the respective field in GTM. Name and save the variable.
Now, return to editing your tag and select the GA variable you created.
Next, click within the Triggering section to choose which pages you want the tag to appear on. To deploy globally wherever your GTM code is in place, select “All Pages.” Submit changes to push your tag live.
How to track Youtube Videos via Google Tag Manager
The YouTube Video Trigger checks pretty much all the boxes that I would expect in a device for video monitoring. For items like Start, Improvement (e.g. 25 percent, 50%, 75 percent), and Total, it has built-in events.
Create and Configure Trigger
In Google Tag Manager user interface, scroll to Triggers to create the tag, and create a new trigger. You can find the YouTube Video option in the sidebar, which flies out when you click to pick a form of trigger.
Once you've selected the YouTube Video trigger type, it's time to configure it. Here are the options.
1. Capture - Start - Gathers a start when the user begins to watch the video.
2. Capture - Complete - Gathers the maximum when the user reaches the end of the recording.
3. Capture - Pause, Seeking, and Buffering - collects a pause when the user pauses the video or jumps forward or back, and buffering when the video starts buffering due to lack of bandwidth.
4. Capture - Progress - collects progress the moment the user passes either a percentage or time threshold (e.g. 25%, 50%, 75% or 10-second mark, 30-second mark, one minute mark).
5.Advanced - Add JavaScript API support to all videos - If you do not have the requisite enablejsapi=1 parameter for your YouTube embeds, you can test it to automatically apply it to all your images. PLEASE Remember! This reloads the iframe so users may see the video flicker when they load the page for the first time. This choice also adds to the page the requisite https:/www.youtube.com/iframe API library if verified.
One thing that might make you breathe easier is that there are new Built-in Variables for all these items in the dataLayer. You can find them by clicking the red CONFIGURE button when browsing to Variables / Built-In Variables in the Google Tag Manager user interface.
Note that the quality of tracks is proportional to the total duration of the video and not the actual time or percentage you watched the video...
And if you configure the trigger to fire at 25 percent, 50 percent, and 75 percent, it will fire those events when the user in the video timeline hits the respective thresholds, even if they haven't watched them continuously from the start. So, if you start playing a video and leap straight to the 25 percent mark, even though you have just started watching, the event will burn.
As there are so many combinations of events that you can capture with the YouTube Video trigger, with only one Universal Analytics Event tag, I will display a relatively standardized way of measuring start, pause, percentage progress, and complete events. The tag resembles this:
The trigger that fires this tag looks like this: