• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

How to set up Google Analytics Ecommerce Tracking for BC

Explorer ,
Sep 29, 2012 Sep 29, 2012

Copy link to clipboard

Copied

I've successfully added ecommerce tracking for Google Analytics to my Business Catalyst sites. I haven't found any [free] definitive guides out there, so I thought I'd share.

Business Catalyst files

For the tracking script, the Business Catalyst file you need to have opened is /Layouts/OnlineShop/order_receipt-US.html.

However, you also need to add the Google analytics script - with out the ecommerce modification - to all the pages on your site. I recommend putting in the <head> of your page templates.

Google Analytics Ecommerce Tracking

To start tracking Business Catalyst ecommerce transactions with Google Analytics, here are the steps you need to take.

  1. Log into Google Analytics and navigate to the profile settings page for the Business Catalyst site. Under "Ecommerce Settings" select "Yes, this is an E-Commerce Site".
    google-analytics-1.png
  2. While still in analytics, go to the "Tracking Code" tab under your profile. Don't grab the code from the Standard tab. Instead, select "Advanced". 
    • When someone goes through the cart on a Business Catalyst site, the domain switches to *.worldsecuresystems.com. So you need to select "Multiple top-level domains".
    • I would also select the check boxes for AdWords campaigns, DoubleClick data and Track online ad campaigns from other providers
    • The script Google shows you on this page is what you should put on all your page templates.
      google-analytics-2.png
  3. Now you're ready to grab that code and modify it for ecommerce tracking.
    • The code given in Google Analytics should go on all the pages of your website. The easiest way to accomplish that is to put it on all your templates. However, there's one more step.
    • You then need to modify the code for your receipt page as shown below. Finally, place that modified code on the /Layouts/OnlineShop/order_receipt-US.html page. Here's what it should look like modified. [You'll need to close the script tags, of course.]
          
                  
              script type="text/javascript"
              var _gaq = _gaq || [];
              _gaq.push(['_setAccount', 'UA-*******-*']);  // your Google Analytics profile id
              _gaq.push(['_setDomainName', 'example.com']); // your domain name - not *.worldsecuresystems.com, but the domain you've chosen for your site
              _gaq.push(['_setAllowLinker', true]);
              _gaq.push(['_trackPageview']);
              _gaq.push(['_addTrans', "{tag_orderid}", // Order ID
                         "", // Affiliation
                         "{tag_amount}", // Total
                         "", // Tax
                         "", // Shipping
                         "", // City
                         "", // State
                         "" // Country
                        ]);
              _gaq.push(['_trackTrans']);
              
              (function() {
                  var ga = document.createElement('script');
                  ga.type = 'text/javascript';
                  ga.async = true;
                  ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
                  var s = document.getElementsByTagName('script')[0];
                  s.parentNode.insertBefore(ga, s);
              })();
          /script

Result

You won't see all the details about the purchase in Google Analytics. That's because Business Catalyst does not pass all the needed variables to the order receipt page. [Perhaps that's a feature request.]

However, it's still valuable to know the order ID and revenue in Google Analytics - knowing which sources drive your revenue is critical. It's also pretty easy to grab the order ID [under Ecommerce > Transactions in Google Analytics] and look in your Business Catalyst site for the order. Here's a screenshot of the results I saw on the first day. 

Ecommerce Overview   Google Analytics.png

TOPICS
Documentation

Views

21.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Oct 24, 2012 Oct 24, 2012

Google Analytics could collect the following if Business Catalyst passed it to the order_receipt-US.html page.

  • order ID - necessary to associate item with transaction
  • SKU/code - required
  • product name - necessary to associate revenue with product
  • category or variation
  • unit price - required
  • quantity - required
  • affiliation or store name
  • total - required
  • tax
  • shipping cost
  • shipping city
  • shipping state or province
  • shipping country

These two articles should get Business Catalyst developers a long way toward enabling

...

Votes

Translate

Translate
Mentor ,
Oct 01, 2012 Oct 01, 2012

Copy link to clipboard

Copied

I love this article, J! Is it OK if a convert it to a document? Please post your site here so that I can link it on the bottom and give you a proper credit for it.

Thanks for sharing your knowledge with the community!

-m

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 01, 2012 Oct 01, 2012

Copy link to clipboard

Copied

Thanks. You can link to http://brockms.com/. But I'd want to make it a bit more thorough before you turn it into a document. Would that be something I send you in a message?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Oct 01, 2012 Oct 01, 2012

Copy link to clipboard

Copied

Yes. Please PM me once you're happy with it.

Cheers,

-mario

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 03, 2012 Nov 03, 2012

Copy link to clipboard

Copied

Justin, I'd like to get you a hand with this doco. I've got a few tips I can share.

For example if you put the {tag_amount} into a variable you can re-use it for things like event tracking.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 06, 2012 Nov 06, 2012

Copy link to clipboard

Copied

Thanks Justin! You are a super star for sharing this. Just what I was looking for

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 10, 2012 Oct 10, 2012

Copy link to clipboard

Copied

Fantastic - Thanks for your efforts brockms - was doing my head in.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 16, 2012 Oct 16, 2012

Copy link to clipboard

Copied

How/Where do I access/open this page:

/Layouts/OnlineShop/order_receipt-US.html

Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Oct 16, 2012 Oct 16, 2012

Copy link to clipboard

Copied

You can either navigate in the BC backend:

Site Manager > Module Templates > Online Shop Layouts > Recipt - Buy

or through Dreamweaver

Root > Layouts > OnlineShop > order_receipt-US.html

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 17, 2012 Oct 17, 2012

Copy link to clipboard

Copied

Thank you!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 06, 2012 Nov 06, 2012

Copy link to clipboard

Copied

Just wanted to check - I've only got the tracking code in the default template so do I paste the full code again in the Receipt-Buy section (even though it uses the default template) or is it ok to just at the below to the default template?

  _gaq.push(['_addTrans', "{tag_orderid}", // Order ID

                   "", // Affiliation

                   "{tag_amount}", // Total

                   "", // Tax

                   "", // Shipping

                   "", // City

                   "", // State

                   "" // Country

                  ]);

        _gaq.push(['_trackTrans']);

Sorry if a silly question

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 24, 2012 Oct 24, 2012

Copy link to clipboard

Copied

Justin, thanks a lot for sharing.

You mentioned That's because Business Catalyst does not pass all the needed variables to the order receipt page

Would you please list what else BC should make available in order to make it possible to produce the desired GA reports? We will look at adding those.

And what are the reports you're usually looking at in GA for your BC sites?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 24, 2012 Oct 24, 2012

Copy link to clipboard

Copied

Google Analytics could collect the following if Business Catalyst passed it to the order_receipt-US.html page.

  • order ID - necessary to associate item with transaction
  • SKU/code - required
  • product name - necessary to associate revenue with product
  • category or variation
  • unit price - required
  • quantity - required
  • affiliation or store name
  • total - required
  • tax
  • shipping cost
  • shipping city
  • shipping state or province
  • shipping country

These two articles should get Business Catalyst developers a long way toward enabling this

It would be nice if this were a simple site setting option in the admin console. I built a WordPress store once, for instance, that only required my Google Analytics profile id (the 'UA-*******-*' number). Once I entered it, analytics worked site wide and transactions showed up, too.

In Google Analytics, I look at a number of reports. I'll use the reports under the Advertising tab to evaluate my return on ad spend. I also use the reports under the Conversions tab to work backwards from purchases and completed goals to sources or site changes that impacted them.

business-catalyst-google-analytics.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 24, 2012 Oct 24, 2012

Copy link to clipboard

Copied

Thanks Justin.

We're aiming to make GA fully work with BC as easily as providing your profile id, and the information you provided here helps us in this direction.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 24, 2012 Oct 24, 2012

Copy link to clipboard

Copied

That's wonderful! Thank you and let me know if I can help in any other way.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 03, 2012 Nov 03, 2012

Copy link to clipboard

Copied

Marius,

What's missing is the transactional data for each product.

We have to do a massive cookie workaround to pass each of the products purchased across so we can get a complete picture of the order processed. Not just the total.

Like Justin said, you've got access to google's dev code so it's pretty self explanatory what we need.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 30, 2013 Apr 30, 2013

Copy link to clipboard

Copied

DOESN'T WORK??  it stops tracking when it goes to the world secure systems. No listing of any pages when they go to that site. I double checked everything, the code is on all pages, and on the receipt page it should be correct.

BTW the code listed shows doubleclick.net versus google.com (but neither I think works).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 04, 2013 Aug 04, 2013

Copy link to clipboard

Copied

This guide will help you get around the *.worldsecuresystem.com problem

http://www.itbusiness.com.au/_blog/Blog/post/Business_Catalyst_vs_Google_Analytics_Cross_Domain_Trac...

- Jonathan from http://www.olct.co/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jan 20, 2014 Jan 20, 2014

Copy link to clipboard

Copied

If anyone is interested with cross domain revenue tracking for products with BC's ecommerce module drop me a line. gary@itbusiness.com.au

Currently you can only track the complete order but I've developed a method to now also track individual products as well.

Screen Shot 2014-01-21 at 3.06.49 pm.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 21, 2014 Jan 21, 2014

Copy link to clipboard

Copied

We would all like to know that, Gary.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jan 21, 2014 Jan 21, 2014

Copy link to clipboard

Copied

Yeah .. I'm working on trying to standardise the process to make it easier to install as it's a bit more complicated than a cut and paste job; And if not installed correctly it will break the ordering process which is why I'm hesitant to write up a tutorial. But I'll definately look at putting up some notes on my website when I'm confident of a DIY install!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 04, 2014 Feb 04, 2014

Copy link to clipboard

Copied

Awesome Post sir..my eCommerce tracking is working perfectly in the analytic..but why it is showing  (direct) / (none) under  SOURCE / MEDIUM in my Google Analytic Dashboard and also if you can let me know the exact Thanks Page after successful payment please.

Please See the screen shot :

Ecommerce Overview   Google Analytics.png

Thanks !

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 04, 2014 Feb 04, 2014

Copy link to clipboard

Copied

You're showing (direct) / (none) under Source/Medium because the purchases that have been made so far came through direct traffic.

As other sources send you converting traffic, you'll see other Source/Medium combinations:

  • Google / Organic
  • Google / Paid
  • example.com / referral

... and so on.

Here's Google's article on how to make sense of traffic sources: https://support.google.com/analytics/answer/1033173

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 04, 2014 Feb 04, 2014

Copy link to clipboard

Copied

But other sources are seen under BC Dashboard and not under Google Analytics..Any suggestions please?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 04, 2014 Feb 04, 2014

Copy link to clipboard

Copied

I've noticed a discrepancy between the two analytics before, as well. I tend to trust Google Analytics more because I've had more experience with it. Plus, I'm pessimistic, and Google shows fewer visits. 🙂

But in terms of your specific stats, make sure your date range only includes the time Google Analytics has been installed. Then make sure the Business Catalyst report only includes sources that resulted in purchases. Other than that, I'd need to look over your shoulder with a screen sharing tool to be of any use.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines