Tracking Social Media Conversions Using Google Analytics

Notice: Undefined variable: post_id in /home/foundco/public_html/wp-content/themes/pivot-child/inc/content-post-single-sidebar.php on line 48

Monitoring your social traffic conversions is essential if you maintain any sort of content and social media strategy. It can take time to build your online presence to a level that brings in revenue, but there are certainly cases where great returns are made. Social Media data is now fully integrated into Google Analytics so you can track the ROI of each action and social media traffic source on your content and the traffic from your social properties themselves.

Social Ecosystem

Tracking Social Actions

Analytics can track items like file downloads, movie plays, and anything else you can think of. To do this you would set up a custom event. Social Media tracking works in a similar manner, but in this case an event is considered a ‘social action‘. What do you class as a social action? A social action can be shares, votes, posts, reshares, comments and bookmarks, for example. So, a Social action is a special kind of event.

To find these statistics in Google Analytics, navigate to Traffic Sources > Social > Social Plugins.  Normal events are located in Content > Events.

Data Hub Providers

Google allows social network developers to integrate their activity streams into Social Analytics reports via their social data hub. Current data hub partners are reddit, Google+, Delicious, Digg and are indicated in Analytics by a symbol (shown below). This means that Google +1’s and their ilk can be tracked easily out of the box, but other social network such as Facebook and Twitter require some additional code to be implemented.

Social Data Hub Partner

Code Examples

The code is pretty similar for tracking both normal events and social events.

For social: _gaq.push(['_trackSocial', network, socialAction, opt_target, opt_pagePath]);

For events: _gaq.push(['_trackEvent', category, action, opt_label, opt_value, opt_noninteraction]);

Basically the difference is _trackSocial and _trackEvent. You will may need to implement this code for every social network you want to track that is not a data hub provider.

All social buttons use a callback method which is triggered when the social action is effective.  We do this to be more accurate. A visitor can click on Twitter’s button from your website, but you should not track this social action based on the “on click” event because the visitor can close the popup without tweeting. This would result in incorrect statistics. You have to use the callback function provider by Twitter which is triggered when the tweet is posted.

Let’s see an example integrating Facebook’s like button. A very basic implementation for Facebook for instance would take the following steps:

Insert the Facebook JavaScript SDK asynchronously:

<div id="fb-root"></div>
<script type="text/javascript">
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); = id; js.async = true;
js.src = "//";
ref.parentNode.insertBefore(js, ref);

Insert Facebook like button:

<fb:like send="true" width="450" show_faces="false" />

Add the tracking code:

<script type="text/javascript">
window.fbAsyncInit = function() {
FB.Event.subscribe('edge.create', function(targetUrl) {
_gaq.push(['_trackSocial', 'Facebook', 'Like', targetUrl]);

For more info on how to do this – check out the Facebook documentation, and also Google’s Twitter integration example.

You should aim to keep your code as compact as possible, and ideally load social buttons asynchronously to reduce any performance impact.

But having implemented this code, you should be able to see assisted social conversions, so you can see the return that is coming from your social channels.

Social Media Conversions

How to Determine Social ROI – Infographic

Below is a great infographic sourced from InventHelp.  This shows how social media can be tracked to show how it can drive significant ROI for some major brands. Take special note of the ‘social value’ section, which shows a visual representation of how the social event data correlates with sales. This is essential for retail sites who have an extensive  social media strategy in place to monitor how their campaigns are performing.

Understanding how each of your online channels interact will give important information on adjusting your future strategy.

facebook twitter inforgraphic

Special thanks to David, who is like a one-man Spanish football team of web development.