- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
I have a page where I want to track the usage of some videos which are streamed via the JW Player 8.
I was happy to find this code snippet which looks promising:
It sadly doesn't work because i then realized these geniuses did not just embed the player but an iFrame that embeds the player. Are you aware of any solution for this where I can use the snippet from the page that is embedding the iFrame that contains the JW player?
I've run into this issue when wanting to track AMP pages which are contained in iFrames.
Here's what I did:
1. I created a utility page. example: utilitypage.html
2. Within that utility page, I set up Teallum (utag_data object, utag.js, etc.)
3. In the iframe, i added the utility page and passed any necessary data via query parameters (example: utilitypage.html?page_name=awesomepage&video_name=awesomevideo
4. In the utility page, i grab those query parameters and set those in utag_data before utag.js is added.
hi, do you have access to the iframe itself? or the developers? because you could give the developers the setup on how to push events, but remember the tealium scipt has to be within the iframe and then you need to take into account that if you add a tealium script within an iframe you will need to take care of duplicate pageviews firing.
like others said sometimes these players have native callbacks to be leveraged by developers within the platform itself so they could embed external libraries such as utag.js for tracking purposes and then working when embedded as i-frames as well.
Antoher way, not so frequently used with video player and not always leverageable, is working on the parent page document.origin settings: you could set that in order to let html contents communicate like a single piece of html.
Hope to be helpful.
Copyright All Rights Reserved © 2008-2023