A
A
Andrey Privalov2016-08-01 10:23:28
YouTube
Andrey Privalov, 2016-08-01 10:23:28

How to set a goal in Yandex.Metrica to watch YouTube videos?

Tell me a solution, how to track the start of watching a YouTube video (embedded as an iframe)?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
X
xmoonlight, 2016-08-01
@xmoonlight

1. On the event of a click on the video - create (if not available) a hidden iframe where you load a pre-prepared dummy page with a counter from Yandex and pass all the parameters of the video there: ID, viewing duration, start / end timestamp, etc.
2. Any events of the video can be tracked through the youtube api and the link can be changed in the hidden iframe.
3. In Yandex metrics - catch the parameters of the GET request and set goals based on them.
In general, I advise you to read: https://habrahabr.ru/post/233955/

E
Evgeny Bezymyannikov, 2016-08-01
@psman

No way. A cross-domain frame will not allow you to catch events.

A
Andrey Privalov, 2016-08-01
@negasus

I'll answer myself. Found the iframe tracker jquery plugin
It looks like it solves the problem without digging into the internals

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question