Highlighted

Need to capture a callback on successful sharing via Add this tag integration?

Not applicable
I have a requirement where I need to capture the successful sharing event, once user click on the add this "facebook/twitter sharing" widget and shares the link. I tried to achieve this by adding the below mentioned code in the advanced settings section of the tag configuration, inside the template config.: addthis.addEventListener('addthis.menu.share', function(){ if (evt.type == 'addthis.menu.share') { alert("test"); } }); It's not working. Can anyone suggest how can we achieve this? I even tried to create an extension of type"Javascript code" and bind that with the AddThis tag and put the same js code snippet inside the body but didn't work out.
1 REPLY 1
Highlighted

Need to capture a callback on successful sharing via Add this tag integration?

Employee Emeritus

Hi Rahul,

 

As of now I don't have a precise answer to your question. However I was able to dig up an earlier Q&A along the same lines discussing how to use Content Modification Extension as opposed to a JavaScript Extension or modifying the template code.

 

Here's the link: https://community.tealiumiq.com/t5/Tealium-iQ/Ability-to-dynamically-generate-AddThis-URLs-based-on-...

 

If it is not what you are looking for, feel free to reach out here again. We are here to help.

 

Thanks!