Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Universal Analytics and signup with Facebook

I have a website (theneeds.com) that allows signup via Facebook. We're running several campaigns, e.g. on Facebook itself, and we'd like to properly track signups from the different campaigns.

The problem is with Universal Analytics: when a user signs up with Facebook, she triggers a new session thus loosing the campaign reference.

Two possible solutions are:

  1. remove the analytics tracking on the signup form (i.e. the page that causes the new session to start)
  2. add facebook.com to the referral exclusion list

Unfortuantely both have disadvantages, so I'm wondering if there is any best practice or better solution.


More details follow.

From "Universal Analytics usage guidelines"

By default, all referrals trigger a new session in Universal Analytics https://support.google.com/analytics/answer/2795983

Here's an example of a campaign sent to Facebook:

http://www.theneeds.com/?utm_source=facebook&utm_medium=social&utm_campaign=_mycampaign

And here's what happens.

  • When a user clicks, she opens theneeds.com with source, medium and campaign properly set.
  • The user now clicks on Join and select Facebook [1], she's redirected to facebook.com for authorization.
  • After successful authorization [2], she's redirected back to theneeds.com, with referral facebook.com (or m.facebook.com, on a mobile device).
  • This triggers a new session in Universal Analytics, loosing information about the campaign.
  • The user is now on the signup form and, after submission, is redirected to the page that marks the analytics goal.
  • Unfortunately, the goal is registered as facebook.com/referral, and not as facebook/social/_mycampaign.

Notes:

[1] I've used Facebook as an example to simplify the discussion. Clearly the same happens with Twitter, Google, and any other oAuth provider.

[2] In order to test, one needs to make sure that the user has NOT already authorized the website on Facebook so that she actually sees pages on facebook.com (which is the usual case for new users) - if the user is already authorized, she's immediately redirected back to the website and there's no change in the referral, so the campaign is properly tracked.

I've tested the 2 solutions mentioned above.

  1. Remove the analytics tracking on the signup form - whose disadvantage is that I'm loosing page tracking
  2. Add facebook.com to the referral exclusion list - that result in loosing the actual referral traffic from Facebook (e.g. as a result of user shares).

Decorating links is also a non-viable solution as the user might have a look at the website before deciding to signup, so I should propagate decoration on all links.

A better solution would be to temporarily disable the referral on the signup form, but I'm unsure if this is possible in Universal Analytics.

Any suggestion? Thank you in advance!

like image 525
ecesena Avatar asked May 28 '14 23:05

ecesena


People also ask

Can you integrate Google Analytics with Facebook?

You can't add Google Analytics directly to a Facebook page like you can to a website because Facebook doesn't allow this. But you can use some other tricks to analyze your Facebook data with and without Google Analytics.

What is Facebook social in Google Analytics?

Through the 'Social Users Flow' report in Google Analytics, you can determine the paths users took through your website, from Facebook. Basically, you can determine how users browsed your website, after finding you on Facebook. This is a good report to understand the behaviour of Facebook users on your website.

Is Google Analytics free to use?

Google Analytics gives you the tools, free of charge, to understand the customer journey and improve marketing ROI.


1 Answers

I'm having the same issue. I'm still researching solutions, but one option I'm considering is this one: https://groups.google.com/forum/#!msg/google-analytics-analyticsjs/NtwQFQAZ2Oo/kh-T0c1eHCYJ Essentially, that author recommends that before you send the user to FB, you set a session variable to remind yourself "hey, next time you see this guy, be sure to overwrite his referrer". Then on every pageview, you check for that session variable. When set, you do:

ga('set', 'referrer', 'http://subdomain.site.com/facebooksigninreturn');

According to the author, that's supposed to prevent a new session from being created.

like image 124
Jim Lindstrom Avatar answered Sep 19 '22 03:09

Jim Lindstrom