YouTube iframe API loader - Custom Tag Template
A tag created with this template loads the
https://www.youtube.com/iframe_api library on the page. This is necessary if you want to track interactions in lazy-loaded or dynamically added videos with Google Tag Manager’s native YouTube video trigger.
Simply add a Page View trigger to the tag (you can delimit this further to only fire on pages that will have videos inserted on them), and it will insert the library on these pages.
You only need to do this on pages that have dynamically inserted videos. If the page loads with YouTube videos, you do not need this template. You can simply use the default YouTube trigger, as it will automatically load the API if it finds a YouTube video on the page when it first loads.
|3 April 2020||Initial release.|