Hi Luca,
Here's the workflow for using my extension:
- Install my extension. 😉 No configuration is needed.
- Add a Rule that will fire when your YouTube videos are loaded in your web page. E.g. DOM Ready. In that Rule, add the "Enable video playback tracking" action from my extension. You can also select the checkbox to load the YouTube IFrame API.
- Create data elements from my extension, e.g. Video Title.
- Add another Rule that will fire with any of the events from my extension. In that Rule, add whatever actions you want to run when YouTube events occur, e.g. set variables for AA. In those actions, you can use the data elements created from step 3.
How it works:
- (assuming your rule from step 2 above uses DOM Ready) When the browser loads the web page with the YouTube videos, the Rule from step 2 runs. This enables tracking of the YouTube videos by setting them up to work with the YouTube IFrame API.
- (assuming your rule from step 4 above works with my "Video Paused" event) When you pause the video, my extension's event gets triggered and causes the Rule from step 4 to run. This event includes all of the information about the video at that point, including the video title. So the "Video Title" data element would have the video title and can be returned to the Rule's actions.
There are 2 implications here:
- If my extension's "Enable video playback tracking" action never runs somewhere, then my extension will not be able to track any playback events from your YouTube videos.
- All of my extension's data elements are only available when used in Rules that use my extension's events. They can't be used with any other events.
Hope that helps!