Website analytics provide the statistical data for you to interpret the performance of your online business, establishing bench marks, and measurement of campaigns or work performed to improve the visibility, engagement and conversions for your online website.
Google Tag Manager (GTM) makes it quick and easy to deploy and update measurement tags, including Google Analytics, on your websites and mobile apps without the need of major code changes and app releases by your website developers. Google Tag Manager has now revolutionised the way website designers and marketers implement scripts and tags onto websites.
Use Google Tag Manager to manage tags (such as tracking and marketing optimisation JavaScript tags) onto your website. Without editing your site code, you use the Google Tag Manager user interface to add and update Google AdWords, Google Analytics, Floodlight, and non-Google tags such as Facebook, Twitter or LinkedIn tracking pixels. This reduces errors and allows you to deploy tracking tags on to your website quickly and efficiently.
For Google Android or iOS mobile apps you can use Google Tag Manager to manage the app analytics and advertising tools in your apps without having to rebuild and resubmit the applications’ binaries to the app marketplaces.
Google Tag Manager is a free tool provided by Google, that eliminates tedious code-editing tasks for your website. The easy-to-use web interface lets your marketing colleagues add and update their own website tags—including javascript code snippets for conversion tracking, site analytics, remarketing and more. They can do it all without bothering the website development team.
Benefits of Google Tag Manager
Let marketers add tags to your website? Absolutely. There’s no need to worry about Google Tag Manager disrupting your site. Google has built in a tag Preview Mode and error-recovery features like version history to make sure that no one will deploy a tag that could break the website. Plus, they have included user permission controls to grant and manage different levels of access.
How to get started with Google Tag Manager
The Google Tag Manager container snippet is a small piece of JavaScript and non-JavaScript code that you paste into your pages. It enables Tag Manager to fire tags by inserting gtm.js into the page (or through the use of an iframe when JavaScript isn’t available).
To implement Google Tag Manager on your website:
<head>
tag as possible on every page of your website, replacing GTM-XXXX with your container ID:<!-- Google Tag Manager --> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-XXXX');</script> <!-- End Google Tag Manager -->
<body>
tag on every page of your website, replacing GTM-XXXX with your container ID:<!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXX" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) -->
Many tag management operations can be achieved by just doing the basic code installation, but if you’d like to have finer control over tag events or data, you may want to use some customisation using the asynchronous methods.
Note: The Google Tag Manager snippet must be placed directly in the page that you intend on tracking. Placing it in a hidden iframe or deploying it within another tag management system will prevent certain tags from accurately tracking the parent page.
Multiple Domains
While you can use the same container for multiple websites it’s recommended that each separate web property that you manage be deployed with its own container. This separation will prevent changes specific to one website from having undesired effects on other websites using the same container. In some situations, however, when multiple TLDs (Top Level Domains) or subdomains are considered to be members of the same website, it may be beneficial to manage their tags through the same Google Tag Manager container.
When choosing to use a single container across multiple domains, it’s important to carefully configure your tags and triggers within Google Tag Manager. Using the default “All Pages” trigger in Google Tag Manager (i.e. $url matches RegEx .*) will fire tags on all pages of all domains on which your container snippet is deployed. Since some tags have configurations or purposes specific to the domain on which they’re deployed, you may need to create custom triggers (or even remove the “All Pages” trigger) to fire tags on all pages of one or each domain individually.
For example, you may choose to deploy your Google Analytics tracking code through GTM with configurations to support GA tracking across multiple domains or subdomains.
In such a case, you would add a line of code to your GA tracking code to manually set the first-party domain on which to set the GA cookies (e.g. on www.example-petstore.com and dogs.example-petstore.com, you might set the cookies to the common domain, .example-petstore.com). However, on the secondary site, www.my-example-blogsite.com, you might set the cookies to .my-example-blogsite.com. Therefore, you would want one of two GA tracking code tags (one set to .example-petstore.com, and one set to .my-example-blogsite.com) to fire on each of the two domains. If both domains were sharing a common GTM container, using the default “All Pages” trigger in Google Tag Manager, would cause each tag to fire on all pages of both domains.
Improve the accuracy of website traffic data
Marketers often need to identify and isolate various types of traffic in Google Analytics dashboards and reports. For example, many companies want to eliminate spam or internal (employee) traffic and visits from partners. Typically, they do this by using excluding filters in Google Analytics.
Google Analytics limits the number of filters to 100. If you have a large number of internal IPs you wish to exclude, I recommend that you use GTM to implement blocking triggers. Blocking triggers are built with a custom variable and a custom event trigger.
Keep in mind that if you use a blocking trigger, these traffic types will be excluded from any or all Google Analytics views — including the unfiltered view.
Implement structured data
Structured data is a key way to improve organic search results, but it can be difficult for marketers to implement — especially if you need to rely on technical resources. Google Tag Manager makes it easy for non-developers to implement structured data on any page of a website.
Import marketing automation parameters
Most companies use marketing automation software to capture lead data and track leads through the sales funnel. With Google Tag Manager, you can easily implement lead-tracking parameters and marry this data with Google Analytics information.
With the built-in variable of first-party cookie, Google Tag Manager can pass lead ID number, along with other parameters, into Google Analytics.
Google Analytics events
Google Tag Manager only fires tags in response to events. This article explains how to use auto-event tracking to generate Google Analytics tags that are triggered…
If auto-event tracking does not meet the needs of your scenario, you can manually trigger events from your code.
Note on Google Tag Manager variables: A value in a trigger or tag is a Tag Manager variable when they are wrapped in double brackets. For example: “Label: {{Click Text}}” denotes a variable as the value of the label field. “Label: Buy” denotes plain text entered by the user as the value of the label field.
Note on the difference between Google Analytics events and Google Tag Manager events: Analytics events are hits sent as the result of Analytics tags fired from Tag Manager. Tag Manager browser events are user interactions with web page elements (“DOM elements”) that are registered by the browser and pushed into the Tag Manager data layer so that they may be used to set up triggers.
Clicks on links
For the purposes of this discussion, imagine that every page on your site has a navigation menu that allows you to go to the “Buy” page, the “About” page, or the “Contact” page, depending upon which navigation item is selected. The “Buy” selection links to “http://example.com/buy.html”. “About” links to “http://example.com/about.html”. “Contact” links to “http://example.com/contact.html”.
The goal is to generate a Google Analytics event each time someone clicks one of these navigation items, so that they can be tracked individually. There are two methods for how to set this up shown here: One that uses separate triggers and tags for each type of link, and one that uses a regular expression to combine all click tracking into one single trigger and tag.
Set up click tracking using separate triggers and tags
NOTE: The Label value should correspond to the particular link being clicked (e.g. Buy for buy.html, Contact for contact.html, and About for about.html).
Set up click tracking using a single tag
Clicks on any specified element type
Imagine that your webpage contains elements that users might click which are not traditional links. This could be an image, a <div>
element, or any other item on the page accessible by the DOM. This technique will generate a Google Analytics event each time someone clicks on one of these elements. For this example, we will assume clicks on an image with a class of Gallery_Image
:
Timed intervals
Note on implementing timed intervals: Timed interval tracking may influence your bounce rate calculations in Analytics, possibly resulting in a lower bounce rate.
Tracking timed intervals can be used used when you have a page where users might spend a significant amount of time without triggering any events, such as a page with embedded video, and you would like to track how long users are on the page. Additionally, given that Google Analytics sessions timeout after 30 minutes by default, you may wish to implement a ‘keepalive event’ to ensure that activity is sent every 25 minutes. For this purpose, you may use a GTM Timer:
Form submits
This technique will cause a tag to fire every time a form is submitted. For this example, we want to record all submissions of a form with the Element ID My_Form
:
NOTE: The Form ID built-in variable must be enabled before it will show up as a Fire On option.
Toby Creative – Branding & Marketing in Perth, WA is a Google Partner Agency and Local Perth SEO Company. We provide Google Tag Manager, Google Analytics, Google Adwords and Google My Business support to local Perth businesses. Contact us on 0412 622 262 or fill in our contact form to book a no obligation free initial consultation at your location so that we can discuss your specific marketing requirements.
Call 0412 622 262 to book your no-obligation, free marketing consultation today!
We make it convenient and come to your location – so we can discuss your marketing requirements and get to know your business. We take the time to listen, researching you and your competitors to find out where your business is currently positioned. Then we provide effective and affordable marketing solutions to build your brand, drive targeted traffic, increase sales and improve conversions. Why not find out more by enquiring today.
Google Tag Manager eliminates the hassle of hard coding tags, so that businesses and marketing teams can move faster. It makes advanced tracking requirements a breeze and can actually boost the website speed by reducing tracking code. It is a sensible centralisation strategy for businesses to manage their website analytics.