Set up video tracking using GTM

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

What is video tracking

It is to track how users interact with your video, where did they pause the video, did they resume it later? If the user watches the full video or halfway through.

Why do we need video tracking?

Base on this information you can plan on how you can optimize for your future content. Is your content too long at what point did your user drop off?

Youtube video tracking configuration

  1. Login to your Google Tab Manager account.
  2. Click on Variables. 

    click on variable

  3. Scroll down to the bottom of the page and click New under the User Defined Variables.

    add new user defined variable

  4. Give your new variable a proper name such as “Youtube video variable – JS”. Then click on the Variable Configuration box.

    name your tag

  5. Select Custom Javascript.

    select custom javascript

  6. Paste the following code into custom javascript,

    Then click save

    save the name variable

  7. Click on the Tags

    click on the tag

  8. Click on New

    Click on new

  9. Give a proper name such as “Youtube video tracking”. Click on the Tag Configuration

    name your new tag

  10. Select Google Analytics: Universal Analytics

    select google Universal

  11. Under Track type select Event,
    For category key in youtube video,
    Under Action, select the new video variable which we just created.
    For Label, I have selected video title,
    For Google Analytics setting, select your GA ID. Then click the Triggering section.

    tag configuration

  12. Click on the + sign

    click the add icon

  13. Give your trigger a proper name such as Youtube trigger and then click on the Trigger Configuration section

    name the new trigger

  14. Select Youtube video

    video tracking using GTM

  15. Check all the boxes.
    Under Progress, I decided to track in a smaller percentage, you can put other values such as 20,40,60,80,100.
    Then save the Trigger.

    set up trigger configuration

  16. Save the new Tag

    Save the new Tag

  17. Click Submit

    video tracking using GTM

  18. Click Published

    video tracking using GTM

Where can I find the data in Google Analytics?

  1. Visit one of the pages with a video.

  2. Login to your Google Analytics account and under Realtime, click Events, you can see the data on the right.

    google analytics live event

  3. The next day, go to Behavior –> Events –> Top Events your data from yesterday will be shown there.

    google analytics behavior events

Other videos platform

Check back the site in the future on how to configure videos hosted on other platforms.

Share the article with your friends

facebook icon twitter icon linkedin icon