Enterprise Ecommerce

How to Track Visitors and Sales from Facebook with Google Analytics

Mitchell Harper / 2 min read

Earlier this week we released BigCommerce 5.6 and the most popular feature is SocialShop, our new (free) Facebook application which lets you get your products in front of Facebook’s 400 million active users by adding a “Shop” tab to your fan page. Here’s a quick video I put together if you haven’t see it yet:

We’re big believers that Facebook has become the first true social platform, and we’re doing everything we can to help you take advantage of that – both to attract new customers to your BigCommerce store and also to build relationships with your existing customers.

In this post I’ll demonstrate how you can use Google Analytics to track visitors and sales from Facebook, and more specifically from your BigCommerce SocialShop.

The first thing you’ll want to do is signup for a free Google Analytics account, which you can do here. Google Analytics is a simple service that allows you to track visitors to your website. You can also setup goals to track certain actions on your website such as newsletter signups, orders, etc, but I’ll save that for another post.

The process of signing up for Google Analytics is very straight forward but if you’d like step-by-step videos then take a look at the Google Analytics YouTube channel here.

After setting up your Google Analytics account you’ll be given some tracking code to add to your website. To add the tracking code to your BigCommerce store, login and click the Settings -> Analytics Settings menu. You’ll see this screen:

Tick the “Google Analytics” option and hit save. You’ll see a new tab next to the “General Settings” tab. Click on it and paste your Google Analytics tracking code into the text box then hit save:

Google Analytics tracking is now integrated into your BigCommerce store. All traffic to your website will now be tracked and can be viewed and filtered through Google Analytics.

Please note: If you want to track the dollar value of orders (highly recommended), then make sure you turn on ecommerce tracking in Google Analytics. BigCommerce will then automatically pass order data back so it can be tracked.

That’s all it takes to setting up Google Analytics tracking. To see traffic and orders from Facebook, login to Google Analytics, click “View Report” next to your website and then click “Traffic Sources” on the left:

Under “Top Traffic Sources” click the “view full report” link and type “facebook” into the search box at the bottom of the screen and click go:

You’ll now be able to see the number of visitors who arrived at your store from Facebook. You can filter traffic by all sorts of metrics, but again, I’ll save that for another post.

To track orders, click the ecommerce tab on the left menu and again, type “facebook” into the search box under the “Top Revenue Sources” section. If you find you’re attracting a significant portion of new customers from Facebook, you might want to think about experimenting with Facebook Ads to drive traffic to your BigCommerce SocialShop on Facebook. Here’s a great article about Facebook Ads if you want to learn more.


Mitchell Harper

Mitchell Harper

Mitch is the co-founder of Bigcommerce. He loves helping small businesses succeed through the use of simple software and regularly keynotes on topics including e-commerce, entrepreneurship, Saas and mostly importantly, how to build a great company culture. Today he runs the company alongside co-founder Eddie and our 300+ person team with offices in Sydney, San Francisco and Austin. He can be emailed at [email protected]

View all posts by Mitchell Harper
Leave a Comment

9 comments on “How to Track Visitors and Sales from Facebook with Google Analytics

  1. Seneca Schurbon on

    I was wondering if there is a way to track orders that come as a result of social shop, as opposed to my regular store?

  2. Brianne Brewer
    Brianne Brewer on


    Check out Referral Candy or Curebit for your incentive program needs :)

    Thank you!


  3. Alan on

    Hi Mitchell,

    I’m looking to introduce an incentive program where store credits are awarded to those that generate a sale(s) by sharing my products. So I need to be able to see who shared (originated) a sale – linked to the sale itself.

    Can this be done?


  4. Rigoberto Boldery on

    Pretty nice post. I simply stumbled upon your blog and wished to say that Ive truly loved browsing your blog posts. In any case I will be subscribing on your feed and I am hoping you write again very soon!

  5. Mitchell Harper
  6. Drew Zhu on

    Hi Mitchell,

    You said, “If you want to track the dollar value of orders (highly recommended), then make sure you turn on ecommerce tracking in Google Analytics. BigCommerce will then automatically pass order data back so it can be tracked.”, and my GA set up correctly reflected this statement as I can see the value, quantity, product, etc when an order is placed. However, it just stopped working around July 20th. Did anything change? Now all the other pages are still tracked, and BC order page reflects sales, but GA no longer record it.

    var _gaq = _gaq || [];
    _gaq.push([‘_setAccount’, ‘MY-GA-NUMBER’]);

    (function() {
    var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true;
    ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘.google-analytics.com/ga.js’;
    var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s);


  7. Mitchell Harper
    Mitchell Harper on

    Hi Steve. If they only have one affiliate on Facebook then integrating Google Analytics into their BigCommerce store and looking at traffic and sales that list Facebook.com as the referrer would do the trick.

  8. Steve on

    Very informative post, thanks. I was wondering if there is a way to track an affiliate through a Facebook fan page for a brick & mortar client that I have. They are in the process of swicthing over to BigCommerce now and employ me to help with SEO and social marketing.

    Obviously, if I were responsible for the Facebook activity, we should see that in the tracking as described above. However, without an affiliate ID being passed, the commissions and accounting would all to be done manually, a big pain.

Leave a Reply

Your email address will not be published. Required fields are marked *

Less Development. More Marketing.

Let us future-proof your backend. You focus on building your brand.