简体   繁体   中英

Integrating Facebook into Google analytics

I want to add the 'Log in with Facebook' option to my website, however I'm unsure how to integrate the information gained when someone logs into my website with Facebook with my current Google Analytics.

Is it possible to link up a visit in Google Analytics with a user who has logged into the site with Facebook to enable me to see things like age, gender etc?

Any help you can give me on this would be much appreciated.

Thanks,

Ben

First of all you should check out this Google document . It explains, how you set a custom unique user id via google analytics.

Further you've to send an event to google analytics (eg 'fb_login') via the callback function of your facebook login function.

您可能必须通过重定向或框架来执行此操作。

Google Analytics does nolt track individual users, it provides anonymized data. So at the top level, no you cannot do this. However, there are a few more things avaiable to you. One: Facebook provides facebook insights, their own tracking suite, that will give you demographic information on the users of a facebook app or fan page. You site will effectively become a facebook app when you use their user authenication, so you will be able to get insights tracking on you site. At the present moment, facebook insights and google analyitcs do not itegrate or share data. Facebook insight also provides anonymized data, so you will not be able to identify an individual through the tracking. The final option is, now that you are tracking users through login, you can implement your own tracking info on your site to see what individual users are doing, and attempt to track their preferences. Its also entirely legal (in the United States at least) to buy access to marketing data and use use your registered user name pool to get additional information.

If you wanted, you could set up a "funnel" in Google.

When a user logs in through Facebook, you could send them to a specific page and then track their progress from there...

http://www.google.com/support/analytics/bin/answer.py?answer=55515

So using this you could get the percentage of users who log in through Facebook... etc.

But to collect information other than that, you would have to get the correct permissions documented here eg. user_birthday (to get the user's Birthday) and query the Graph API from there, thus implementing your own tracking of users.

You can query the Graph API using the various SDKs that Facebook provide explained here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM