Sitecore DMS + OOB ways to track social share

84 Views Asked by At

Is there any OOB way to track the Social Share thru Fb, LinkedIn and Twitter.

We are not using the default social share rendering provided by Sitecore. These are normal links with JS code to share on fb,twitter etc..

Please guide.

1

There are 1 best solutions below

0
Gatogordo On

An ootb way is not available but it can be done rather easily with some custom code. I wrote a blog post about integrating the AddThis component with xDB a while ago.

It's a combination of some javascript (you'll need to adapt this to your social share solution, but it's actually nothing more than making a call when sharing) and a controller. The controller will trigger the actual goal (or event...) you want. The blog has code for Sitecore 8.1 - this might differ for other versions (don't know your version). In a 8 environment, you need this:

We try to find the goal (Sitecore item) based on the post parameter. If found, we use that data to register a PageEvent to the PreviousPage of the current Tracker. We end by 'saving' the changes and cancelling the current request