Note: For versions below 16.5.0, use a custom code for YouTube video tracking.
The YouTube video tracking tag helps you collect data about interactions with YouTube videos on your site or app. After setting up this tag, you can see collected data in video analytics reports.
To create and set up the YouTube video tracking tag, follow these steps:
- Go to Menu > Tag Manager.
- Navigate to Tags.
- Click Add new tag.
- Name the tag and select the following type: YouTube video tracking.
- Click Next.
- Set up the following elements:
- Track progress: If turned on, you’ll track percentage thresholds and interaction timestamps.
- In Advanced tag settings, choose Consent type. Set it up if you use Consent Manager. The tag will fire only when selected consent is given by a visitor.
- Respect visitor privacy is turned on by default. Leave it as is, if you want to respect visitors who set a Do-Not-Track option in their browser or opted out from tracking.
- In Flight dates, set the date and time when the tag is fired.
- In Tag triggers, click Choose existing trigger.
- Choose the following trigger: All page views.
Note: You can also set a new trigger that will fire this tag on selected pages.
- When you’re done, click OK for the trigger.
- Click Save for the tag.
- Test your tag in debug mode.
- When you’re happy how the tag works, click Publish.
- After some time, data will be collected and you will be able to see it under Menu > Analytics > Reports > Video analytics.