Sunday, 24 March 2013

Tracking shares before they happen (or even if they don't happen)?




// A tricky question poped up in my Quora home page: Is it possible to check, if somebody requested your site's #meta #tags ?The logic behind this is that you could track social shares even if the user doesn't complete the process (load's up the URL on Facebook or a sharing widget) and then quits.

My suggestion and response on Quora was that one can use the og:image tag. Declare a specific image that is only used on the og:image tag. Then check the Apache logs for requests to that image.

You will have when someone started the sharing process. You won't have when the shared page is shown in Facebook, because what is shown is a cached thumbnail that Facebook keeps. On that thought, you might want to have a dynamic URL for the image because the first time someone starts the sharing process, Facebook creates the cached copy (which is stored for some time)

Alternatively to the Apache logs part, you can set up some PHP/whatever script as the URL, allowing you to create a dynamic URL but also keep track of the requests in a database (easier than running analytics on Apache logs).

I haven't tried this, but I don't see why it wouldn't work, at least in part. It all comes down to Facebook/Twitter's cache systems and how often their cache is refreshed. It might also be worth looking into adding a random variable at the end of the og:url so that when someone tries to share the page (from a FB/Twitter button on the page for example) it would be a new URL and it would not be cached. Of course this would probably mess with share/like counts of the page.

That said, Twitter has their own set of  meta tags (because using the OG tags would be a discrace apparently), described here http://bit.ly/twittercards

Further thoughts on this are welcome :)


No comments:

Post a Comment