Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
537 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 Reply

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...