Integrating Google Analytics

The Google Analytics module gives you detailed funnel analytics for each of your order forms. Once you’ve enabled the module, SPP will start sending page view and conversion events to GA.

Basic setup

Turn on ecommerce tracking to show SPP sales in your Analytics account. Go to Admin > View > Ecommerce Settings and click Enable Ecommerce.

Set up cross-domain tracking (Tag Manager)

When a customer navigates from your website (example.com) to your order form on SPP (clients.example.com or example.spp.io), we want to attribute actions and purchases to the same visitor.

To set up Tag Manager to measure user interactions across multiple domains open your Universal Analytics Tag and enable Cross-Domain Tracking as shown below:

Cross-domain tracking (ga.js)

Modify the tracking code on your website by replacing this:

ga('create', 'UA-XXXXXXX-Y');

With this:

ga('create', 'UA-XXXXXXX-Y', 'auto', {'allowLinker': true});
ga('require', 'linker');
ga('linker:autoLink', ['clients.example.com', 'example.spp.io']);

Replace UA-XXXXXXX with your own analytics ID, clients.example.com with your custom SPP domain if you have one, and example.spp.io with your default SPP domain.

Create a conversion goal

To visualize the conversion funnel in Google Analytics you’ll need to set up a conversion goal.

  1. In Google Analytics go to Admin > Views > Goals
  2. Click + New Goal
  3. Choose Custom and click Continue
  4. Enter the following values and click Continue:
    1. Name: Complete purchase
    2. Type: Destination
  5. Enter the following values and click Save:
    1. Destination: (Regular Expression) /receipt/(.*)
    2. Funnel: On
      1. Step 1:
        1. Name: View orderform
        2. Screen/Page: /order/(.*)
        3. Required: Yes
      2. Step 2:
        1. Name: Submit orderform
        2. Screen/Page: /submit/(.*)

Form conversion tracking

You can create form-specific conversion goals by repeating the steps above and using your form ID instead of the wildcard selector (.*) in funnel steps.

For example, if your order form’s URL is https://clients.example.com/order/912BB206 then your conversion goal’s destination is /receipt/(.*)?orderform=912BB206.

Updated over a month ago

Thanks for your feedback 🙏

Was this helpful?