Collapse Menu
Docs Home
Extensibility Options
Contact Support

Google Universal Analytics

Overview

Set up Google Analytics integration with your FastSpring Store.

 Important

If you use Google Tag Manager to manage Google Analytics, do not integrate Google Analytics with your FastSpring Storefront. Instead, follow instructions to integrate Google Tag Manager.

Set up Google Analytics in the FastSpring App and configure Google Analytics settings for time zone, ecommerce, cross-domain tracking, and referral exclusions.

Prerequisites

Set up Google Analytics integration for all Storefronts

  1. In the FastSpring App, navigate to Integrations > Extensions > Google Analytics.
  2. Click Setup
  3. Enter your Google Analytics Tracking ID in the Google Analytics Property ID field and click Enable.

Set up custom Google Analytics integration for individual Storefronts

Only configure custom Google Analytics integration for individual Storefronts if you need to use different IDs for different Storefronts. Otherwise, configure Google Analytics integration for all Storefronts following the steps above.
  1. In the FastSpring App, navigate to Storefront you want to modify and click Settings.
  2. Within the Storefront Settings, click Analytics Integration in the left menu.
  3. In the Google Analytics Integration Behavior drop-down, select Use custom Google Analytics property ID for this storefront.
  4. Enter your Google Analytics Tracking ID in the Google Analytics > Custom Google Analytics property ID for this storefront field and click Save at the top right-hand corner of the page.

 Tip

If you experience data issues, use Google tools to Troubleshoot (not set) data in your reports or Troubleshoot tag setup and no-data issues or Chrome Extensions Google Analytics Debugger and Tag Assistant.

Ad blocking tools may cause as many as 10% to 15% of transactions to not be reported to Google Analytics. However, ad blockers also similarly impact the traffic reported to Google analytics. Therefore, relative analyses such as conversion rates are not affected while absolute numbers such as visitors and pageviews are affected. Google Measurement Protocol is a server-side tracking alternative to browser-based customer interaction tracking.

Configure your Google Analytics settings

Time Zone

Align the time zone used by FastSpring (GMT +0) with the time zone used by your Google Analytics account to make it easier to compare reports from both sources. Navigate to your your Google Analytics View Settings and set the Time zone country or territory to United Kingdom and GMT +00:00.

Ecommerce

  1. Go to Ecomerce Settings for each Google Analytics view in which you want to see data (see Google Analytics instructions to enable ecommerce for a view).
  2. Select On for Enable Ecommerce.
  3. Select On for Enable Enhanced Ecommerce Reporting.
  4. Create the following checkout funnel steps:
    • Payment Option Selected
    • Name Entered
    • Email Entered
    • Payment Data Entered
    • "Buy Now" Button Clicked
  5. Click Save.

Cross-Domain Tracking for Web Storefronts

Cross-domain tracking ensures that tracking is not lost between your site and FastSpring store. Do not complete this step if you are using Google Tag Manager.

Copy and paste the following code in the Google Analytics code placed on your website, replacing both occurrences of 'yourcompany' in the code with the base URL for your Web Storefront:

  ga('require', 'linker');

  ga('linker:autoLink', ['yourcompany.onfastspring.com','yourcompany.test.onfastspring.com']);

Example of Google Analytics linker plugin code for use on your website
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga';);

  ga('create', 'UA-93623912-1', 'auto');
  ga('require', 'linker');
  ga('linker:autoLink', ['yourcompany.onfastspring.com','yourcompany.test.onfastspring.com']);
  ga('send', 'pageview');
</script>

Cross-Domain Tracking for Store Builder Library

When using Store Builder Library or a Popup Storefront, include the following attribute in the script that loads the FastSpring library:

data-decorate-callback="decorateURL"
Example of loading the FastSpring library with the data-decorate attribute included
<script
    id="fsc-api"
    src="https://d1f8f9xcsvx3ha.cloudfront.net/sbl/0.8.3/fastspring-builder.min.js"
    type="text/javascript"
    data-storefront="yourexamplestore.onfastspring.com/popup-yourexamplestore"
    data-decorate-callback="decorateURL">
</script>
Copy and paste the following code into your page:

<script>

    function decorateURL(url) {

var linkerParam = null;

if (typeof ga === 'function' && ga) {

                ga(function()  {

                                var trackers = ga.getAll();

                                linkerParam = trackers[0].get('linkerParam');

});

}

                return (linkerParam ? url + '?' + linkerParam : url);

    }

</script>

Set up Referral Exclusions in your Google Analytics account

Prevent issues with tracking being lost when customers are redirected or referred to other domains. 

Follow Google Analytics instructions to set up referral exclusions and add the following domains to the Referral Exclusion list:

  • onfastspring.com
  • <storename>.onfastspring.com (where <storename> is the name of your Storefront, e.g. yourexamplestore.onfastspring.com)
  • paypal.com
  • sofort.com

Try FastSpring

Get a free account and see why FastSpring is the ecommerce partner of choice for software providers around the world. Try our full-service ecommerce solution today to unlock revenue growth for your online company.