adding tracking parameters to links from facebook timeline actions
Asked Answered
O

1

6

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?

Ocelot answered 1/2, 2012 at 21:16 Comment(1)
are you still seeing the fb_action_ids parameter on your actions? They seem to be missing from all activity with the exception of when you view the "detailed" view by clicking on an action's timestamp in the stream.Lightproof
V
0

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)

Vinnie answered 1/2, 2012 at 22:46 Comment(1)
:) I edited the question to make it less subjective. But yeah, I imagine I'll probably be stuck doing #2, or more likely just sticking with the normal wall posts we have today.Ocelot

© 2022 - 2024 — McMap. All rights reserved.