How to track a video click inside an iframe using google tag manager?

by genevieve_boehm , in category: SEO Tools , 6 months ago

How to track a video click inside an iframe using google tag manager?

Facebook Twitter LinkedIn Telegram Whatsapp Pocket

1 answer

Member

by susan , 6 months ago

@genevieve_boehm 

To track a video click inside an iframe using Google Tag Manager, you can follow these steps:

  1. Create a new tag in Google Tag Manager to handle the video click tracking.
  2. Go to the Google Tag Manager dashboard and click on "Tags" from the left-hand sidebar.
  3. Click on "New" to create a new tag.
  4. Give your tag a descriptive name.
  5. Under "Tag Configuration," click on the tag template and choose the appropriate video player that you are using (e.g., YouTube, Vimeo).
  6. Configure the tag settings based on the video player you selected. For example, if you selected YouTube, add the YouTube video ID or the video URL.
  7. Under "Triggering," click on the pencil icon to select a trigger for the tag.
  8. Click on "New" to create a new trigger.
  9. In the trigger configuration, select the "Click" trigger type.
  10. Under "Some Clicks," click on the pencil icon to configure the triggering conditions.
  11. Set the conditions to match the desired click event inside the iframe. This may involve inspecting the HTML elements to find the appropriate selector.
  12. Save the trigger and go back to your tag configuration.
  13. Select the newly created trigger for your tag.
  14. Save the tag configuration.
  15. Click on "Submit" to publish your changes.


Now, when a user clicks on the specified element inside the iframe, the tag will be triggered and the video click will be tracked using Google Tag Manager.