Media Analytics: scanForMedia Parameter does not work for youtube videos

We discovered the following issue:

scanForMedia Parameter does not work for youtube videos

Given an embedded youtube video, e.g.:

we want to call “scanForMedia” and limit the scan to

as documented here:
https://developer.piwik.org/guides/media-analytics/reference#scanformediadocumentorhtmlelementtoscanformedia

However, the call to scanForMedia(divVideo) fails: If scanForMedia finds a youtube video, it attempts to call createElement(“script”) on its parameter (the video div in our case). This will only work on the document. Therefore we cannot limit the scan for embedded youtube videos. (NB: In contrast, it does work for html5 videos.)

Thank you for reporting this. We were able to reproduce this and have fixed the issue. An update will be available by Friday or Monday.

Thanks for the quick response and the promised fix.

ist there any chance to get the “un-minified” version of the plugin. this would help us a lot debugging issues. we are very interested in the plugin and we have very capable developers identifying problems. (as you probably have seen in our other ticket.

thanks in advance

Unfortunately, the un-minified version of the plugin is not included in the release and it is currently not made available. What helps debugging is the “pretty print” feature in eg. Chrome and Firefox so it is at least not all in one line but of course names are still not visible. Feel free to email InnoCraft any time you experience any issue at contact at innocraft.com . Always happy to fix issues.