By now you’ve likely learned how to deploy Google Tag Manager across your website and set up your basic pageview tracking tag to push your data into your Google Analytics Account.

The next step is to start creating event tracking tags to measure user interactions across your website. An event could be a form submission, a click on an outbound link or even a mobile user clicking on your phone number. I’ve outlined the steps below for setting up some basic events.

One important question you need to ask before you get started is if your event is preceded by a number of sequential steps. If the answer is yes, you will want to build this goal directly into Google Analytics as visualizing the goal funnel is not possible at this time with event tracking in Google Tag Manager. An example would be a check-out or registration process.

Jumping back into Google Tag Manager (GTM), be sure your default variables are activated. You can do this by clicking the Variables link in the left column, select "Configure" and checking all boxes so they appear blue. 

 

I’ve outlined below how to set up the following events.

Mobile Click-to-Call

  1. Before we can start building our tag, we need to find an HTML attribute so GTM knows what to look for to fire the trigger. This also helps determine if this tag is possible based on your current set-up. 
    • Right click on the phone number of your website while in Google Chrome and select "Inspect"
      • If the phone number is not clickable on mobile devices (a la there's no <a href> tag surrounding your phone number in the source HTML, you'll need to work with your developer first.
    • Once you've opened the Chrome developer console, look for the attribute that follows <a href=" and preceeds your phone number. This may likely be "tel:" or some close variation
  2. To create our tag, start by either “Add A New Tag” from the Overview page or “New” within the Tags page
  3. Tag Configuration: Select either “Universal Analytics” or "Classic Google Analytics" based on your current set-up
    • Tracking ID: Enter either your UA number from Google Analytics (ex. UA-XXXXXX-XX) or your custom variable.
      • Custom variable is preferred method as it eliminates all of the risk entering the wrong UA number and makes it easy to update your tags if you ever need to change UA numbers.
    • For Track Type, you’ll want to set the dropdown to “Event”
      • Category: Phone Calls
      • Action: {{Click URL}}
        • This will tell you what phone number was clicked on in the event you are using more than one
    • Label: {{Page URL}}
      • This will tell you what page the phone number was clicked on
  4. Once you select the Triggering section, a tab will appear with all of your existing triggers. We're going to create a custom trigger for this event so select the blue "+" in the top right.
                           
    • Select the Trigger Configuration box and select the "Just Links" trigger type under the Click category
    • For the section titled "This trigger fires on," select "Some Link Clicks”
      • For the conditions, You'll then select "Click URL" > Contains > "tel:" and save your Trigger as "Phone Number Clicks"
  5. Debug using the GTM interface. Go into "Preview mode" open your website in a new tab and click a phone number to find out if the event is firing properly.
  6. Once you confirm the tags are firing properly, Publish

Email Clicks

  1. First ensure we can track the event by clicking on the email on the live website. If your default email editor pops up, you're ready to go.
    • To test via Chrome console, right click the email and "Inspect" and look for "mailto:" to preceed the email address.
  2. Start by creating a tag either from Overview page or within the Tags page
  3. Tag Configuration: Select either Universal Analytics or Classic Google Analytics
    • Tracking ID: Use either you actual UA number (ex. UA-XXXXXX-XX) or your custom variable.
    • For Track Type, you’ll want to set to “Event”
      • Category: Email
      • Action: Click
      • Label: {{Page Path}}
  4. For "Triggering Configuration" let's go ahead a create a custom trigger for this event for "Just Links."
    • Enter a unique name like "Email Clicks"
    • For the section "This trigger fires on," select "Some Link Clicks"
      • In the list of conditions, you'll want Click URL > contains > :mailto
      • Name your trigger something unique like Email Clicks
  5. Debug using the GTM interface. Go into "Preview mode" open your website in a new tab and click a phone number to find out if the event is firing properly
  6. Once you confirm the tags are firing properly, Publish

 External Link Clicks

  1. Before we can start creating our tag, we’ll need to identify the HTML attribute GTM will look for when the link is clicked
    • Start by using Google Chrome and right click and then “Inspect” the link you want to track.
  2. Start by creating a tag either from the Overview page or within the Tags page
  3. Tag Configuration: Select either Universal Analytics or Classic Google Analytics
    • Tracking ID: Use either you actual UA number (ex. UA-XXXXXX-XX) or your custom variable.
    • For Track Type, you’ll want to set to “Event”
      • Category: Unique title for this particular action. Examples could include Schedule Tour, Learn More, etc.
      • Action: Click
      • Label: {{Page Path}}
  4. Let's go ahead a create a custom trigger for this event for "Just Links."
    • If you’d like to track this event across your whole website, select “Some Link Clicks”
      • For you conditions, enter "Click URL > contains > root URL you're linking out to.
    • If you only want to track engagements for certain sections of your website, you’ll need to select “Some Link Clicks" and create couple conditions
      • Enter the same condition as above but you'll also want a condition for Page URL and denote which pages you want to track your events on. 
    • Name your trigger and save
  5. Debug using the GTM interface. Go into "Preview mode" open your website in a new window and click a phone number to find out if the event is firing properly.
  6. Once you confirm the tags are firing properly, Publish.

Conclusion

There are ton more events and tagging capabilities through GTM and what we have stated here is just the tip of the iceberg. Take the time to review the resources from Google and learn how you tag elements on your website to better understand the engagemnet that's happening on your website right now!

Having trouble setting up one of these events or do you have an event you're trying to set up that's not outlined above? That's okay! Feel free to contact us or take a look at our Website Analytics services to have an expert take care of your GTM installation! We'd love to help where we can!

Contact Marcel Digital