adding tracking parameters to links from facebook timeline actions

2.5k views Asked by At

Our customer would like to track when users share links with each other (via facebook, twitter, email, whatever), and reward the person who initially shared the link. Currently we're keeping track via a parameter on the URL that contains the user's ID, i.e.

http://www.customer.com/items/item1?sharedBy=user1

so, when a user clicks on that link, we're currently posting a standard wall post to the user's wall with that URL. When user1's friends click that link, we can read the sharedBy parameter and give user1 some credit for the referral.

We're also moving some of our actions from the standard wall posts to new OpenGraph actions, which presents a problem. In order to be recognized by Facebook, the opengraph object has metadata like the following:

    <meta property="fb:app_id" content="MY_APP_ID" /> 
    <meta property="og:title" content="test item 1" />
    <meta property="og:type" content="mynamespace:item" />
    <meta property="og:url" content="http://www.customer.com/items/item1" />
    <meta property="og:image" content="http://img.fark.net/images/2011/site/farkLogoBig.png" />

Regardless of which URL I submit to Facebook, it will use the canonical URL (og:url tag) when it constructs the link. So, doesn't have my tracking parameter.

I can think of a couple of ways to hack around it:

  1. Dynamically generate the value of og:url to match whatever URL facebook is looking at. I'd rather not put more implementation overhead on all of my customers (many of whom aren't tech savvy enough to implement this without significant amounts of handholding). Also seems like Facebook might object to this as it will basically treat each URL as a separate object, even though they're really the same.
  2. Facebook does add a fb_action_ids parameter to the URL on its own. I could fetch these through the graph API and pull the facebook user id off of it, then reconcile that id against my internal user ids. Would rather not write all that extra code instead of reusing the same parameter that any other sharing mechanism uses.

Is there any third method I'm not seeing that will let me force Facebook to add extra parameters to their link back to my page?

1

There are 1 answers

1
DMCS On BEST ANSWER

So, any better options than those two?

Although this is a subjective question asking for an opinion and not fact. I have an answer based upon both fact and opinion and I will point out the two. :)

1 is completely out since the last sentence is true about how Facebook will treat the different og:url tag values as different objects (fact). So 2, or some fashion thereof, is going to be the better of the two (opinion)