AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

4.4K members online now
4.4K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
Guide Me

GA code for tracking youtube video

Explorer ✭ ☆ ☆
# 1
Explorer ✭ ☆ ☆



We have a website, on which is placed a video on upper right side.  I would like to know how to track how many times the video was clicked ? What's the code for this ?



1 Expert replyverified_user

Re: GA code for tracking youtube video

Top Contributor
# 2
Top Contributor
Hi :-)
The site seems to possibly have the tracking code installed twice.
Once as GA tracking code snippet.. and then again via Google Tag Manager.
If its installed via Google Tag Manager, then if it were me, I would remove the tracking
code snippet and use GTM as the single method of tracking installation.

Since you are using GTM for tracking, there is a prebuilt setup by Lunametrics that can be imported
into the current GTM container. You can find the link for the YouTube Tracking Recipe on this page:

For further help with GTM related questions, I recommend the GTM Help Forum!forum/tag-manager

If you want to track the youtube videos without using GTM and just the tracking code snippet
Then you may want to setup the following method instead:


Bronwyn Vourtis, Google Analytics Top Contributor
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here