简体   繁体   中英

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. 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)

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

If you want to track wheither user exactly viewed some particular video file, you will have to extend video-player script for that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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