开发者

use sharedObject to track number of clicks

How do I use sharedObject to track the number of clicks and store them in a .txt file? My client wants to track the clicks of the user an Im not sure how to make this开发者_如何学编程 work with sharedObject. Can anyone help me out?


If you store the clicks in SharedObject the click data will stay on the client. You'll still need to post the data to a server capture it. What you would need to store in SharedObject is a user id so you can identify which clicks belong to which user.

var so:SharedObject = SharedObject.getLocal("mydomain.com"); 
so.data.userId = "unique-id" // this would be a unique id from the server
so.flush(); // this writes the data in the SharedObject
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜