Rails - Google Analytics - 使用民意调查进行更新

时间:2022-02-18 15:17:13

I'm developing a rails application and I have created an introduction video that is about 10 minutes long.

我正在开发一个rails应用程序,我创建了一个大约10分钟的介绍视频。

I want to somehow push updates (poll?) to Google Analytics when users are watching the video because otherwise they're not displayed as active visitors after 4 minutes.

我希望以某种方式在用户观看视频时将更新(民意调查?)推送到Google Analytics,因为否则他们在4分钟后不会显示为有效访问者。

Any ideas?

1 个解决方案

#1


1  

I think, you can use Google Analytics events-it will send hits to Google Analytics and show, that user do not leave the page. You can use setTimeOut or setInterval at JavaScrpt to send hits(for example, every 2 min), or you can even use Youtube API and link it with Google Analytics events.

我认为,您可以使用Google Analytics事件 - 它会向Google Analytics发送点击并显示,该用户不会离开该页面。您可以在JavaScrpt上使用setTimeOut或setInterval发送匹配(例如,每2分钟一次),或者您甚至可以使用Youtube API并将其与Google Analytics事件相关联。

#1


1  

I think, you can use Google Analytics events-it will send hits to Google Analytics and show, that user do not leave the page. You can use setTimeOut or setInterval at JavaScrpt to send hits(for example, every 2 min), or you can even use Youtube API and link it with Google Analytics events.

我认为,您可以使用Google Analytics事件 - 它会向Google Analytics发送点击并显示,该用户不会离开该页面。您可以在JavaScrpt上使用setTimeOut或setInterval发送匹配(例如,每2分钟一次),或者您甚至可以使用Youtube API并将其与Google Analytics事件相关联。