This is a simple method of finding out which user is logged into which social network while he is visitn your website:
There are 2 Major steps:
Here are few sub steps:
Sub Steps:
Next we add the following code to the bottom of the page before the </body> tag, ensuring you replce the appID in the Facebook code with that AppID you created above
Setting up Google Analytics
Custom segments are really easy to setup, and can give a keen insight into your analytics when used well.
Viewing the data in analytics
Select those you are interested in and "All Visits" if you also wish to compare against all the traffic, and hit Apply.
There are 2 Major steps:
- Setup an empty Facebook app. Its free
- Install the Javascript code onto the page
Here are few sub steps:
Sub Steps:
- Login to Facebook.
- Go to the Facebook Developers page: https://developers.facebook.com/apps
- Press "Create New App" in the top right corner.
- For "App Display Name" enter anything you want; I used "TomTrack". Check the box to agree to the FB Policies and on to the next page.
- The next stage is pretty easy, just enter your domain in both the "App Domain" and "Website" sections
- Hit "Save Changes" .
- Grab the App ID from the top of the page and save it ready for the next section.
Install Javascript Code :you need to add this snippet of Javascript to the top of your page in the <head> section; this function will do the recording to analytics for us (this is for the asynchronous version of google analytics so if you are using the old version you need to remove it)
Next we add the following code to the bottom of the page before the </body> tag, ensuring you replce the appID in the Facebook code with that AppID you created above
Setting up Google Analytics
Custom segments are really easy to setup, and can give a keen insight into your analytics when used well.
- Click "Advanced Segments" at the top of your analytics screen (once you're into the relevant profile), and hit "+ New Custom Segment" at the bottom right of the drop down.
- You'll be prompted to select a name for your segment and to select which facets to base it on. We'll be using the Custom Variable slots that the Javascript tracking code uses. Analytics allows 5 Custom Variable slots, and the code above uses 4 of these (1 = Google, 2 = Google+, 3 = Twitter, and 4=Facebook) [side note: I think you could cram all these into 1 slot possibly]. We'll make a segment for each; here is how I setup my Twitter segment:
- Hit "Save Segment" and you're done. Now repeat this for each of the other variables. Ensure you are selecting "Custom Variable (Value xx)" and not "Custom Variable (Key xx)".
- You're done and are ready to play with some data.
Viewing the data in analytics
Select those you are interested in and "All Visits" if you also wish to compare against all the traffic, and hit Apply.
No comments:
Post a Comment