开发者

Flash Video metrics on the "play" button

I've been searching around the internet for a while to store a click counter within a flash video. Basically count how many times a video was actually viewed instead of the page being loaded.

I have a few restrictions. :(

  1. I cannot use a server side language.
  2. I cannot 开发者_运维百科use a database. (I want to use a text file stored on the server)

Is this even possible?


There is a simple and effective solution : Google analytics API.

Get an analytics account, and you can track videos clicks and much more, with beautiful graphs.

You can create dynamic stats from javascript or from flash, see this example.

If you use flowplayer, just hook to their API to track play, pause or any event.


Anyway you need a server side language to edit this text file.

and after you have to choices:

  1. Rewrite a video player, so every time user click play button it send a call to server script which update counter.
  2. use placeholder image instead of the video player, and after user click on it, make an ajax call to server which call update counter, and return an embed code for the video player.

update.

you can play with google analytics and some custom variables in the links to the video specific video, i think it could be even better than text file

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜