Analytics

6 of the Best Google Tag Manager Recipes [Free Downloads] (Updated 2020)

By DOM Team| 5 Min Read | April 8, 2020
LinkedInFacebookTwitter
Best Google Tag Manager Recipes

A Google Tag Manager (GTM) container is a set of macros, rules, and tags within a GTM account. Containers can be exported from one account and imported into another to save time and increase efficiency. When a GTM container is exported, it exists as a piece of JSON code.

I’ve created several useful GTM containers. You can download any of my GTM containers for free. Using a few easy steps, you can vastly improve website functionality.

How to Import a Container

Once you’ve downloaded your GTM container, follow the below steps to import it. If you want to go straight to the downloadable containers, scroll down.

  1. In Google Tag Manager, click the admin tab
  2. Under Container, click “Import Container”
  3. Choose the following settings on the “Import Container” page:
    1. Select a file to import -> choose the file you just downloaded
    2. Choose workspace -> Existing -> Select your existing workspace
    3. Choose an import option -> Merge (Unless otherwise specified)
  4. Click on variables in your GTM workspace. Under User-Defined Variables, look for a variable named UA-XXXXXXXX-X (or something similar).
    1. If this variable exists, change the name and value of the variable in your Google Analytics UA code. If you are unsure where to locate your UA code, visit Google Analytics > Admin > Property > Tracking Info > Tracking Code

GTM Container Recipes


GTM Container Recipe #1

Track Pageviews in Google Analytics

This script is all you need to get Google Analytics pageview tracking functioning correctly through Google Tag Manager. Simply import the container and enter your UA code as explained in step 4 above.

Download This Container


GTM Container Recipe #2

Track Contact Link Clicks in Google Analytics

This container enables you to track contact link clicks on your website as Google Analytics events. If a website visitor clicks on a “tel:” or “mailto:” link on one of your pages, an event is recorded by Google Analytics. You can find the event action in Google Analytics under the Real-Time > Events report, or view historical aggregate data under Behavior > Events > Overview.

Download This Container


GTM Container Recipe #3

Cross-Domain Tracking

Cross-domain tracking is a way to analyze visitors across multiple websites in a single analytics view. Implementing cross-domain tracking grants you access to multiple website traffic channels as if they were a single website. If you are looking to implement cross-domain tracking, download the script here and check out my article – set up cross-domain tracking with Google tag manager in 7 easy steps.

Download This Container


GTM Container Recipe #4

Clear GTM Container

This functional GTM container helps website owners test new implementation. This container clears all tags, triggers, variables, and folders from your GTM implementation – allowing you to start fresh. Be sure to select “overwrite” when importing this container.

Download This Container


GTM Container Recipe #5

Track Copied Text in Google Analytics

Interested in knowing which text is copied on your website? Import this GTM container and an event will be sent to Google Analytics every time your website visitors copy text to their clipboards.

Here’s a working example:

As a bonus, the event label is set to the copied text, so you can see the exact text copied right in the Google Analytics interface.

Download This Container


GTM Container Recipe #6

Add Link to Website in Copied Text

In container 5 above, I showed you how to track when text is copied from your website to a visitor’s clipboard. This container is similar in that it also tracks copied text, but this time for the purpose of adding a custom message to the user’s clipboard. This seems to be most often used to add a reference link to the clipboard text. A good example of a website that leverages this functionality is BrainyQuote. As an example, I copied a quote from BrainyQuote’s Scooter Braun page to my clipboard (see image below).

When pasted, the following text was output:

I want to show that you can be a successful entertainment executive, be a good husband, be a good father, be a good friend, be down to earth, be a good person, and give back. If I can push that message out there into the world and pass it on to my son, then I’m OK.
Read more at: https://www.brainyquote.com/quotes/scooter_braun_884325

Note that “Read more at…” was appended to the copied text. This script will enable you to add similar functionality to your website. To get this functionality on your website, simply download the container and import it into your GTM workspace.

Download This Container


Conclusion

GTM containers help simplify otherwise confusing or laborious website code install issues. Website owners can quickly add new code with little hassle. Install downloadable GTM containers with ease and save time. These containers also add sophisticated functionality to your website.

If you like this post, you might also like my free Google Data Studio report templates article. Similar to this post, it contains a few preconfigured resources that may be of help.

To get more information on this topic, contact us today for a free consultation or learn more about our status as a Google Premier Partner before you reach out.

Related Articles

All Blogs
Setting Up Subdomain Tracking | How to Track Users Across Subdomains
By Justin Seibert| 11 Min Read | August 7, 2024

How to Track Users Across Subdomains In Google Analytics 4 (GA4) – November 2024

Google Analytics Subdomain Tracking Looking for information regarding subdomain tracking for monitoring users across your…

Read Article right arrow
save-your-universal-analytics-data-before-it-disappears-july-1st-dom-blog
By Ryan Norman| 6 Min Read | June 4, 2024

Save Your Universal Analytics Data Before It Disappears July 1st

Universal Analytics data will be gone July 1st. Are you prepared with a data exporting…

Read Article right arrow
Zen and the Art of First-Party Data Strategy
By Jim Foreman| 11 Min Read | March 7, 2024

Zen in the Art of First-Party Data Strategy

Table of Contents The Introduction The What and Why of First-Party Data Core Principles for…

Read Article right arrow