Back

Social Media + Google Analytics = Network Your Way To Success!

Read on to learn more...

By Miva | January 23, 2012
Person with a mobile phone

Share

  

Want to read this blog offline?

No worries, download the PDF version now and enjoy your reading later...

Download PDF

Today’s blog post comes to us from Miva Merchant Account Manager, Kimberly Hodel

In the past, we’ve shown you how to add Facebook Like and Send buttons to your Miva Merchant store, and just recently, we spotlighted a blog post from 2010 about how to make a custom Twitter feed for your website.

Well, today, we’re here to take it one step further!

Now that we’ve shown you how to use social media in conjunction with your store, the next thing you want to do is track those visitors. You want to know how your efforts are paying off, and if you’ve gone viral yet, right?  We thought so. Welcome to Google Analytics Social Engagement Reports!

From here, you can track the actions on your site related to social networking. By devoting time to some extra setup, you’ll be able to view what products receive the most likes, sends, and tweets. This information can then be used to get an inside perspective of what drives your customers.

Getting Started

First things first: in order to use Google Analytics, you’ll need to make sure you’ve set up an account and implemented the GA tracking code on your Miva Merchant Store:

  • Go to Google Analytics
  • Follow Google’s steps on how to create a new account (Note: You don’t have to use a Gmail account – you can use any email account. If you’re setting this up for your company, it might be good to use a company account to create the user profile.)
  • We’ve made integrating your GA with your Miva Merchant store quick and easy with a FREE module from our partners at Kemper Strategic! That’s right, folks-FREE, but only if you download directly from Miva Merchant.
  • Once you’ve created your GA account and have added the tracking code to your store, you’ll need to wait a few hours before GA starts reporting your data.

Now that we have the data collecting power of GA working on your site, it’s time to start tracking your site’s social interactions.

Tracking Social Interactions

Now that we have the data collecting power of GA working on your site, it’s time to start tracking your site’s social interactions.

Today, we’ll focus on Facebook and Twitter.  (If you’re using G+, the functionality for tracking social interaction is already integrated – no extra steps required.)

How it works: by implementing the social interaction tracking code on to your website, you allow GA to gather and report on how your social media buttons are performing. This feature is not available in the old version of Google Analytics, so make sure you’re using the new one.  (For now, you can switch back and forth between the old version of GA and the new version, so don’t worry about being “locked in” to one version.)

Alright, here’s where we get down ‘n codey.

Facebook: Tracking Likes, Unlikes, And Sends

To record Facebook Likes with Google Analytics, first subscribe to Facebook’s edge.create event and create a callback function to execute the Google Analytics tracking code:

 FB.Event.subscribe('edge.create', function(targetUrl) {
  _gaq.push(['_trackSocial', 'facebook', 'like', targetUrl]);
});

One of the best ways to track your current popularity is by tracking likes.  The above code enables the data to be sent to GA whenever a user likes your page.

The Facebook API’s also let you subscribe to unlikes.  Sometimes, it’s just as important to know not only what excites your customers, but also what turns them away:

FB.Event.subscribe('edge.remove', function(targetUrl) {
  _gaq.push(['_trackSocial', 'facebook', 'unlike', targetUrl]);
});

Lastly, you can also subscribe to sends.  This way, you’ll know exactly which products your customers love so much that they felt compelled to share them with friends:

FB.Event.subscribe('message.send', function(targetUrl) {
  _gaq.push(['_trackSocial', 'facebook', 'send', targetUrl]);
});

Twitter: Track Your Tweets

Tracking tweets with GA requires adding code to your page that features the callback function as well:

 twttr.events.bind('tweet', function(event) {
  if (event) {
    var targetUrl;
    if (event.target && event.target.nodeName == 'IFRAME') {
      targetUrl = extractParamFromUri(event.target.src, 'url');
    }
    _gaq.push(['_trackSocial', 'twitter', 'tweet', targetUrl]);
  }
});

By binding the callback to the Tweet event, GA is able to funnel in the data each time a visitor clicks the tweet button.

The Reports: Standard Reporting, Audience, Social

The information gathered will be reflected in the Audience section of your Standard Reporting tab and can be viewed as part of the following reports:

Engagement Report

Here, you can compare metrics between those visitors who did and did not include social actions. Did people who clicked the like button have higher conversion rates?  You can make the report more powerful by combining your new knowledge of social source and action. For instance, compare whether those visitors who send on Facebook spend more or less time on your site than the visitors who tweet.  This gives you a better idea of which buttons are important to your customers and it shows you where your following is strongest.

Action Report

This report shows you the number of social actions (likes, sends, tweets) for each source (Facebook, Twitter) in one convenient report.  Track if you receive more likes or tweets, or track to see if your G+ button ever gets used.  Find out which one of your products gets the most sends. Note: on this report, you can view things by social action, social source, or a combination of the two.

Pages Report

Compare which pages (and products) are causing a stir in the social community. This report shows you which pages of content are generating the highest number of social actions and on which social networks. (Note: on this report, Social Entity is the page where the action occurred.)

Using the above code and monitoring your visitors’ actions with the aforementioned reports, you can finally get a concrete idea of how social media is working for YOUR business!

If you’re interested in having this code implemented on your site but you’d rather have our Professional Services Team do it for you, please don’t hesitate to ask! Contact our sales team at 858-731-4109.

If you liked this article and would like to learn more about how to use Google Analytics, come see me at the annual Miva Merchant Conference March 7-10 in La Jolla, CA. I’ll be presenting two courses on Thursday and Friday (March 8 & 9), on Google Analytics 101 and 201.

Back to top

Author's Bio

Miva

Miva offers a flexible and adaptable ecommerce platform that evolves with businesses and allows them to drive sales, maximize average order value, cut overhead costs, and increase revenue. Miva has been helping businesses realize their ecommerce potential for over 20 years and empowering retail, wholesale, and direct-to-consumer sellers across all industries to transform their business through ecommerce.

More Posts Like This

Stay in the Loop

Sign up to receive the latest in ecommerce news, articles, whitepapers, and more.

OR CALL 800.608.MIVA

  • Facebook icon
  • Twitter icon
  • Instagram icon
  • LinkedIn icon