An Introduction To Google Tag Manager

An Introduction To Google Tag Manager

An Introduction To Google Tag Manager

If you have a website, you may have heard of Google Tag Manager (GTM). While this tool has been around since 2012, there is still a lot of confusion surrounding it, despite its development as an easy-to-use tag manager.

The Basics of Google Tag Manager

Google Tag Manager (GTM) is a free tool from Google that makes tag management and implementation much easier. As stated in Search Engine Land, “GTM involves a little bit of a learning curve, but once you understand the basics, you’ll wonder how you ever got along without it.”

What are tags? Tags are snippets of Javascript, a computer programming language, that send information about the activity happening on your site to a third party. In this case, tags send data to Google Analytics. In simpler terms, you’ll be able to tell Google what to track on your site.

Is GTM necessary? No, but it saves a lot of time. Without GTM, you or your web developer would need to add each individual Javascript snippet to your website, which can be complicated, confusing, and time-consuming. Take a look at this snippet of Javascript code for Outbound Link Tracking (tracking who clicks a link from a page of your site that takes them to another website) along with the instructions to add the code:

<script>
/**
*Function that tracks a click on an outbound link in Analytics
*This function takes a valid URL string as an argument, and uses that URL string
*as the event label. Setting the transport method to ‘beacon’ lets the hit be sent*using ‘navigator.sendBeacon’ in browser that support it. 

*/
var trackOutboundLink = function(url) {

gtag(‘event‘,’click‘,{

event_category‘:’outbound‘,
event_label‘:url,
transport_type‘:’beacon‘,
event_callback‘:function(){document.location=url;}
});

   }         

 </script>

You’ll have to copy and paste the script above into all of your site pages. Then you’ll need to add the onclick attribute to your links. Use this example as a  model for your own links:

<a href=http://www.example.com
onclick=trackOutboundLink(‘http://www.example.com‘); return
false;”>Check out example.com</a>

While this may be one simple task for a web developer, this can be a completely different animal for an organization that doesn’t have the resources or the training to implement these different snippets of codes.

Linking Google Analytics and GTM

If you’re familiar with Google Tag Manager, you’re probably familiar with Google Analytics, a free Google tool that tracks and reports website traffic. While Google Analytics does a great job of describing who’s on your site, how they navigate, and when they leave, Tag Manager adds another layer to your tracking.

The number of people coming from an ad who fill at a donation form? How far someone scrolls down a specific webpage? How often people click on links from your website to go to another? You’ll be able to add these many tracking codes by simply uploading the different containers for these tags in Tag Manager. Containers are as literal as they sound–they contain the snippet of code for the tag that you want to track.

For example, Susie is looking for events in Miami, FL. She searches for “events in Miami,” and clicks on an ad for Mary’s Angel’s upcoming Angels Run Too 5K & Food Festival. Susie’s really interested and wants to buy tickets for the event but the registration page is off-site. Without the proper tracking, Google Analytics will track this as a “bounce,” or that she left the page without interacting. With Google Tag Manager, Mary’s Angel’s can add the “Outbound Link Click” tag which will tell Analytics to track visitors going off-site to the registration page. Now Mary’s Angels can see that Susie liked the ad she saw on Google and followed through tho the off-site registration form.

By simply implementing Google Tag Manager, your organization can save the time of your web developer and staff. Applying Tag Manager is a relatively easy way of understanding how your audience navigates your website, and what motivated them to go there.

If you have any questions about Google Analytics, the Google Grant, or adding Tag Manager, contact us!

By: Cause Inspired Media