January 5th, 2013, 09:13 PM
ShareThis Individual User Tracking
I would like to track when users on my site successfully share something using the ShareThis buttons on my website. I was considering using event tracking in JS and passing the variable to PHP. But this wouldn't be able to track whether the user shared a link or just clicked the button.
After further consideration it seemed that this methodology would not be very efficient, because I would also need to ensure that this would not track if a user shared the same page multiple times. I would then need to update the database to increment the particular user's total number of shares.
If anyone can think of a better more efficient way of being able to track individual user shares it would be appreciated. The new shareThis forums are **** these days so it's very difficult to get any suggestions from those guys. Thanks.
January 6th, 2013, 02:00 PM
You could use AJAX, when the button is clicked to update your database and also combine that with HTML5 Web Storage... to use localStorage or sessionStorage. This way... you could track shares and use storage to moderate when AJAX should track individual shares. As far as getting a 100% accurate tracking statistics on a share/posting to a social site... I think unless the site offers an API to track such type of post (for web developers); the onclick event of the "Share" button (from your own site), is probably your best tracking choice.
January 6th, 2013, 02:06 PM
Thanks that's a good idea. I've been holding back on using some HTML5 attributes just to make sure everything on my site can be supported and rendered properly on as many browsers as possible. I hope maybe a year from now we can use all HTML5 without worrying about these issues and people using out of date browsers, but what do you think?
Originally Posted by web_loone08
January 6th, 2013, 03:17 PM
All modern (most up-to-date versions) browsers support web storage, but you are correct... older browsers do not support it. A workaround for this, would be to use a cookie for those non-supported browsers; if you wanted to implement web storage, that is. It may be a little more tedious to it this way; but usually with anything new; you have to create some type of workaround/hack to make something like this cross-browser compatible.