Also, another question: I assume this works fine with tracking social events using your Google Analytics xenForo add-on correct?
I see what was going on with the hash... on our end we were checking to make sure it's a well-formed URL and wasn't taking into account hashes being passed in. It should work now (refresh the page). As far as the Analytics, no... the thing from Better Analytics keys on DOM objects from the traditional buttons. This is the JS I'm using here currently to do it... although I was thinking about maybe just making it built into the social plug-in, but right now it's not there... Just trying to decide if it's worth it since not everyone uses Analytics. $('.dp-twitter').on('click', function(e) { _gaq.push(['_trackSocial', 'Twitter', 'Tweet', window.location.href]); }); $('.dp-fb').on('click', function(e) { _gaq.push(['_trackSocial', 'Facebook', 'Share', window.location.href]); }); Code (javascript):
Not everyone uses analytics but I bet the percentage is pretty high? Either way, I'll probably use this regardless. Looks nice. Hash works now as well.
Don't worry about the extra code... I just went ahead and made the Analytics tracking built into the social buttons thing itself (it will track if it's installed on any site if it has Analytics running). It just checks if the Google Analytics JavaScript object is defined or not (that way it's not trying to track if they don't have Analytics). BTW - 44.19% of sites run Google Analytics. https://tools.digitalpoint.com/cookie-search
I bet that percentage is much higher for people that download Social Tools though Thanks for the quick response and help.
Probably... but still never going to be 100%. Just didn't want it to throw JS errors when trying to interact with a nonexistent Google Analytics object. Not sure why I didn't think to just check if the object exists or not before. haha