简体   繁体   English

使用wordpress或PHP / MySQL跟踪用户已查看内容的方法

[英]Method for tracking content users have viewed using wordpress or PHP/ MySQL

I'm looking for a method to track what content users have viewed on a website I'm developing. 我正在寻找一种方法来跟踪用户在我正在开发的网站上查看过的内容。 All I'd need is pointing in the right direction really and any links/examples/snippets would be brilliant. 我所需要的只是指向正确的方向,任何链接/示例/摘录都将是很棒的。

The website I'm developing has a database of wordpress users, basically it's an educational website with flash games and videos. 我正在开发的网站有一个wordpress用户数据库,基本上它是一个包含Flash游戏和视频的教育性网站。 As the users progress through the content it would be nice to mark each piece of content as complete/viewed. 当用户浏览内容时,最好将每条内容标记为已完成/已查看。 This would then be relayed to them so that they know what they've seen and what they haven't. 然后将其转发给他们,以便他们知道所看到的和未看到的。

How would I go about: 我将如何处理:

Passing code to the database when content is viewed (Flash based video player and flash based games - which can be edited by myself with some sort of trigger to pass on information once the end of the content is reached) 查看内容时将代码传递到数据库 (基于Flash的视频播放器和基于Flash的游戏-可以由我自己编辑,使用某种触发器可以在到达内容结尾时传递信息)

Automating this so that I can insert media into a "post" and the tracking business is automatically added 自动化它,以便我可以将媒体插入“帖子”中,并自动添加跟踪业务

This doesn't need to be strict tracking, it's more for user guidance than to check up on them. 这不需要严格的跟踪,更多的是用户指导而不是检查它们。 I realise I've been a little vague too, but whether it's too much coffee and too little sleep or just me being brain dead I have no idea where to start with this. 我意识到我也有点模糊,但是无论是喝咖啡过多,睡眠不足还是只是脑残,我都不知道从哪里开始。 Just pointing me in the right direction would be great. 只要向我指出正确的方向就好。

Your answers are much appreciated, Thanks in advance 非常感谢您的回答,谢谢

You can track pages, read by user by writing WordPress plugin, that utilizes some WordPress actions: http://codex.wordpress.org/Plugin_API/Action_Reference#Post.2C_Page.2C_Attachment.2C_and_Category_Actions 您可以跟踪通过编写WordPress插件由用户阅读的页面,这些页面利用了一些WordPress动作: http : //codex.wordpress.org/Plugin_API/Action_Reference#Post.2C_Page.2C_Attachment.2C_and_Category_Actions

If you want to track wheither user exactly viewed some particular video file, you will have to extend video-player script for that. 如果您想跟踪哪个用户正好观看了某个特定的视频文件,则必须为此扩展视频播放器脚本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM