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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…