Forums » Help & Troubleshooting



Track dynamically loaded youTube videos (loaded after page ready)

Hi,

I have a wordpress site and I am using the "Clicky Analytics" plugin (wordpress.org/plugins/clicky-analytics/).

The plugin is successfully loading the required Clicky youtube.js file in order to enable automatic youTube video tracking. But I am not seeing any video analytics metrics.

I have a video on my homepage which is loaded dynamically in a modal window (lightbox) when a user click the "Play Video" button/link. The lightbox html content, including the youTube iframe, is loaded at the very bottom of the page before the closing BODY tag, and below where the clicky youTube.js file is loaded. But I think the main issue is that video iframe is added to the DOM after page ready.

My site is not yet "live" or open to the public, so I can't share a link unless an official clicky admin/staff member directly asks for a temp password.

But my main question is, can youTube videos that are added to the DOM dynamically (after page-ready) be tracked by the youtube.js tracking script? If not, is there a way to re-initialize the youtube.js tracking script when new content is added to the DOM?

Has anybody run into this issue?

Thanks in advance for any help anyone can provide!

- colin

Posted Fri Sep 18 2015 6:33p by adaptifyDes***


You must be logged in to your account to post!