Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Tracking activity


Reply


7 Posts   852 Views

Avatar
Lazarus404

Community Member, 71 Posts

19 September 2011 at 6:12am

Hey guys,

I want to track link clicks by user in my site. Essentially, all users will be logged in and will be provided with links to files to download and pages to visit. I need to log all actions by the user so that the data can be analysed at a later date. What's the best or preferred way to do this?

Thanks,
Lee

Avatar
swaiba

Forum Moderator, 1808 Posts

19 September 2011 at 7:47am

I'd recommend google analytics.

Avatar
Ryan M.

Community Member, 309 Posts

19 September 2011 at 7:59am

+1 what Swaiba said. Or pretty much any other analytics tracking package.

Avatar
Lazarus404

Community Member, 71 Posts

19 September 2011 at 8:16am

The problem is, I need to be able to track the users name, what files that particular person downloaded and when... I'm not sure Google Analytics supports that... Does it?

Thanks,
Lee

Avatar
swaiba

Forum Moderator, 1808 Posts

19 September 2011 at 8:58am

No it doesn't, how many users are you talking?

I've only ever seen aggregated tracking, not really user specific.

You could put a hook into page::init to store the page and member id, then for a download send the users to a page that sends the file. I think it would drive me crazy trying to track all user activity - even logging it almost crashed a server once due to the amount I was trying to record. Bottom line - choose what specifically needs tracking and add in custom hooks for it.

Avatar
Lazarus404

Community Member, 71 Posts

19 September 2011 at 9:06am

It should only be about 30 users, and several hundred files. I think I may have found something that fits :-

http://www.silverstripe.org/all-other-modules/show/15260

Just need to work it into my app :-)

Thanks,
Lee

Avatar
Ryan M.

Community Member, 309 Posts

20 September 2011 at 11:07am

Google Analytics has the ability for you to add custom tracking parameters. You'd just need to modify your tracking JS code in the footer to include the values you want which would be generated by some code snippets that retrieve the information you need from the SS system. In fact I think it'd be relatively easy to add tracking for usernames by using Member::currentUser()