YouTube订阅按钮事件 [英] Youtube Subscribe Button Event

查看:175
本文介绍了YouTube订阅按钮事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户在我的网站上订阅我的Youtube频道时,如何捕获事件?

How can I catch an event when a user subscribes to my Youtube Channel on my site?

推荐答案

您可以使用图像,按钮或横幅来记录将其放置在YouTube订阅页面上的操作(单击).

You could use an image, button, or banner in order to record the action(click) that lands them on the YouTube subscription page.

<p> <a href="DOMAIN" onClick="_gaq.push(['_trackEvent', 'ChannelSubcription', 'SUBSCRIBED', 'SUBSCRIPTION');"><img src="Title.jpg"></a></p>

如果您尝试从嵌入式播放器记录操作,则需要使用YouTube的API-明智的是引用其Beta API.您还可以为频道使用自定义iframe订阅按钮并进行记录而不会让他们退出您的网站.

If you're trying to record the action from an embedded player you'll need to use YouTube's API - it would be wise to reference their beta API. You could also use the custom iframe subscribe button for your channel and record without having them exit your site.

这篇关于YouTube订阅按钮事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆