How can I track a click event of an embedded video (youtube, vimeo, etc.)? (to track play count)

前端 未结 2 1400
南旧
南旧 2020-12-17 00:29

Is there a way to track play counts for embedded videos? Ideally without resorting to a thumbnail linked to launch the embed / iframe code.

Example (try it yourself

2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-17 01:14

    Ryan, the only way to do this is to use the video sharing site's player api(s), as html and javascript have no native support for this.

    To do this for youtube videos, you can check out the documentation here

    To do this for vimeo videos, you can check out the documentation here

提交回复
热议问题