A custom design experience tailored for maximum ROI on your marketing efforts.
Multi-channel, blended search strategies for full-funnel lead generation.
Gravitate Team
April 22, 2020 | Gain Knowledge
UPDATED: 5/22/2020
Google Analytics event tracking gives you endless possibilities to track clicks, scrolls, form submits and many other behaviors as “events” that can get passed to your Google Analytics property for review. Implementing Google Analytics event tracking can be tedious, especially if you are using in-line event code snippets throughout the site (we wrote a whole blog post on traditional event tracking).
For starters, it significantly cuts down on development time. Once the initial <a href=”https://www.gravitatedesign.com/blog/google-tag-manager-setup-analytics/”>setup of Tag Manager</a> is completed, there is no more code to add to the site for tracking! Here are a few other reasons why event tracking through Tag Manager is the way to go:
Add Google Analytics to Tag Manager, firing on all pages. If you prefer to keep Google Analytics outside of Tag Manager due to your gtag.js setup, Google Optimize speed, or for any other reason, just make sure that your events fire after your base analytics script loads.
Make sure to think through how you would like to name your events by giving each parameter a name that makes sense for your tracking. See example below:
Once we have figured out what event parameters we want to send to Google Analytics we have to create conditions specifying when to send them. In our email click event example, we would fire the event trigger on all pages where a link is clicked with a URL that starts with “mailto:”
After confirming your event tag and triggers, we recommend putting Tag Manager in “Preview Mode” so you can debug and test your events with real-time tracking in Google Analytics. Once all of your events are firing correctly in your preview environment, you are safe to leave preview mode and publish your new Tag Manager container. Congratulations, you have now set up event tracking through Google Tag Manager!
Gosh Steven, is there a way that I can take use your event tracking setup instead of having to create all of the basic events myself?
Yes, yes you can. We have created a JSON export of what we consider to contain event tracking and Tag Manager basics (including a HotJar Tag). You will need to follow the following steps to get started:
After adding the tag to your site, you will need to create tags and rules.
To add an analytics tag through Google Tag Manager you will want to know a few things. One is that you want to have your UA number from your Universal/Google Analytics account and you want analytics to fire on all pages. To add analytics with Tag Manger:
To publish a tag to your site, begin by clicking the down arrow in the top right of the screen and select “create version” to create your first version. After creating a version, click on the down arrow again and select”preview” to view the tags on your site and I suggest clicking on “debug” so you can test each tag to ensure they are firing. This will open up your site with a window at the bottom showing what tags have been fired and what ones haven’t (see photo below). This is an amazing feature and I suggest using it before publishing any tags to your site just to ensure your tags are all firing.
Setting up your UA number as a variable will help you reduce the margin for errors when creating new tags. To add your UA number as a variable in Google Tag Manager do the following:
Outbound link clicks are when a user clicks on a link that leaves the your website. Follow these steps, starting from your container overview page:
This will track anytime a user clicks on a phone number from a mobile device. Follow these steps, starting from your container overview page:
This will track anytime a user clicks on an email link on your website. Follow these steps, starting from your container overview page:
This will track anytime a user clicks on a file to download that matches one of the predefined file types. If you want to track additional file types, simply add them to the list in step 22. Follow these steps, starting from your container overview page:
This might not be needed for most sites, but it can help you identify the top clicked links on individual pages and it’s just more data in case you need it. Follow these steps, starting from your container overview page:
Google Tag manager was created to make it easier for marketers and their teams to add/edit/remove website tags without the help of a web developer. This includes conversion tracking, site analytics, re-marketing, event tracking, and more. While it isn’t a new feature from Google, it is something you should learn to use.
Share
We deliver compelling digital experiences to drive brands forward, engage target audiences, and drive results.
We evolve and continually enhance your digital presence to drive traffic and improve conversions.