开发者

use sharedObject to track number of clicks

开发者 https://www.devze.com 2023-03-26 04:53 出处:网络
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 shared

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

精彩评论

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

关注公众号