Is there a way to increase counter in mysql database whenever somebody share an article on my website using addthis button?

StackOverflow https://stackoverflow.com/questions/21140793

  •  28-09-2022
  •  | 
  •  

Question

In my website, i want to keep track of each share made, using addthis share button. So is there a way to track the counter and save it in my mysql database. So that I can sort out the article with the maximum number of shares??

Thanx.

Was it helpful?

Solution

One way you can find the article with the most shares is through AddThis analytics. You can login to addthis.com and view the analytics or you can get shares by content or the top shared content through an API:

http://support.addthis.com/customer/portal/articles/381264-addthis-analytics-api#.Uu0jP3ddWTM

And then lastly, if you want to know when shares occur in real-time, there's an event api that you can use to listen for a share and then do an ajax call to your own server to track the share:

http://support.addthis.com/customer/portal/articles/1365497-addthis-javascript-events#.Uu0jmHddWTM

And look for the addthis.menu.share event. Hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top