Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
531 views
in Technique[技术] by (71.8m points)

event tracking - How to track article from my website shared on facebook?

I have share bar(containing Facebbok, linkedIn, twitter buttons) on articles on my website. I want to track when a user share that article on FB/linkedin/twitter, so that I can get how many times that post/article is shared. Can anyone provide method/way how to do that with injecting some code or any other way ?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

What I think you want to do is track all the posts that contain a link to your website, so that is what I'll base this answer off of.

For various reasons this is not feasible to strictly do what you want. Also you cannot inject code onto a 3rd party website as this would be a security vulnerability on their end.

You however can track where users are coming from. This part of the answer really depends on the platform you are using, e.g. WordPress, Drupal, custom site, etc... But the thing you want to be searching for how to track the Referer HTTP Header for your particular platform. This will tell you which site the user came from. However the client can choose to disable this feature in their browser and you have no control over this.

You also might be able to use google analytics or similar tool to accomplish a similar thing as above.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...