Hello, I’m new to Piwik and new to coding in javascript. However, I’m looking for sample / template code (javascript with PHP if needed) that would capture play, pause, stop, and finish events for Youtube videos. I embed Youtube videos using the iframe tag and primarily need assistance with the javascript portion. However, I would need to know where to place Piwik’s cutom variable or goal track code within the javascript.
I would greatly appreciate any help especially if this is someing you’ve already implemented.
Thank you,
CP
PS: The closest thing I’ve found was the following: 301 Moved Permanently and 301 Moved Permanently, but I’m not sure if this is applicable to Youtube. I’ve also found: YouTube Player API Reference for iframe Embeds | YouTube IFrame Player API | Google Developers and YouTube Embedded Players and Player Parameters | YouTube IFrame Player API | Google Developers, but lack the knowledge to bring it all together.