Set up Event Tracking using Google Tag Manager

In my previous three articles, we have learned how to implement Google Tag Manager, added Google and Facebook Pixel tracking code and Set up conversion tracking. Today, I am going to show you how to set up event tracking. 

What is Event Tracking

It is to track any interaction or activity that users do on your site. such as a mouse, keyboard, frame and form events.

These interactions can be

  • Download a file
  • Scrolling down the page
  • Viewing of video
  • Form field
  • Clicking a button
  • etc

Why do we need Event Tracking?

By default, once you have set up Google Analytics (GA) properly, it will start tracking pageview when users visit your site. But still, some of the events are not trackable unless you tell GA to do so.

What are some of the events not trackable?

Some of the events not trackable are

  • click to an external link
  • downloading a file
  • viewing of video
  • scrolling of a page
  • clicking a button, etc.

Google Event Tracking

  1. Login to your Google Tab Manager account.

  2. Click on the “Variables” on the right and click “Configure”

    event tracking variable configure

  3. In this example, I am going to track clicks, so I will only check all the clicks checkbox. If you need to track other items, do check the necessary boxes and close it after you are done.

    configure build in variables

  4. Click on the “Tags” and click “New”.

    click on tags and new

  5. Give it a proper name and click the Tag Configuration section.

    name your tag and click configuration

  6. Select Google Analytics: Universal Analytics.

    select google analytics universal analytics

  7. Under Track Type, select Event.

    select event

  8. Under Event Tracking Parameters,
    for Category, name it “Click”,
    for Action, name it “sitemap”.

    event tracking setting

  9. Under label select “page path”. When a user clicks on the link, this label will auto track at which page the user clicks the link.

    select page path

  10. Under Google Analytics setting select your Google Analytics ID. Then click on the Trigger section.

    event tracking setting 2

  11. Click add.

    click add new trigger

  12. Give this trigger a proper name and click on the Trigger configuration section.

    trigger name

  13. Under Click, “Click all Elements”.

    under click select all elements

  14. Under “This trigger fires on”, check “Some Clicks”.

    The first dropdown box, select Click URL.

    Second dropdown box, select contains.

    Last dropdown box, type in sitemap.

    Click save.

    sitemap trigger setting

  15. Save again.

    save event tracking

  16. Click submit.

    click submit

  17. Give a proper name and description of this version and publish it.

    Name the version and publish it

How to check if your trigger is working

For my example, I will go to my site and click on the sitemap link.

click sitemap

Go to your Google Analytics, under Realtime -> Event, you can see that your data is logged.

google analytics realtime

The very next day, go back to your Google Analytics, under Behavior -> Events -> Overview, your data will be log there.

google analytics event data

Share the article with your friends

facebook icon twitter icon linkedin icon