Tip of the Week: Youtube videos

Automatic measurement of Youtube videos

Youtube videos can be easily integrated into a website. All that is needed is the appropriate HTML code, which can be obtained via the Share → Embed function. It is essential to make sure that the option Activate extended data protection mode is used. In addition, the design and the playback mode can be adjusted via various parameters and the responsive display can be enabled via CSS. Since data is transmitted to Google when YouTube videos are played, consent should be given beforehand. This can be implemented with so-called dynamic content blocking, for example, with the consentmanager, see


First you load the Youtube API on the page of the video using the following script line:

<script src="https://www.youtube.com/iframe_api"></script>.

Then append this query parameter to the URL of the video to be measured:



<iframe id="yt" width="420" height="315" src="https://www.youtube.com/embed/tgbNymZ7vqY?enablejsapi=1"></iframe>

Once the video has been created, uploaded and integrated, you naturally want to measure how successful it is on the website. This is done automatically by default in etracker Analytics. Under Settings → Account → Automatic tracking of events, all you need to do is tick Playable media (videos, podcasts, music). The respective video is recorded as an object with a description and the corresponding URL.

In the events report, the videos can be evaluated with the specific key figures for playable media such as the number of starts and stops and the average playing time.

Scroll to Top