Collapse Menu
Docs Home
Extensibility Options
Contact Support

Google Measurement Protocol

Overview

This article discusses using Google Measurement Protocol as an alternative to browser-based user interaction tracking.

Browser-based user interaction tracking can potentially be blocked by ad blocking software installed on customer's computers. As an alternative, you may consider using Google Measurement Protocol to track user interactions on the back-end (i.e., on your own server).

You can find details about Google Measurement Protocol (GMP) and documentation at https://developers.google.com/analytics/devguides/collection/protocol/v1/.

When using GMP to track user interactions on the back-end, your server must generate a "client ID" for each customer who lands on your website and persist that ID, so it is tracked throughout your site. For more information, please see https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#cid.

When the customer initiates a purchase, you can pass the client ID to FastSpring along with any other order data, as an order tag. You can find more information about passing order tags in our article Passing and capturing custom order tags and product attributes.

If you do not already subscribe to the order.completedorder.failed, and order.canceled server webhook events, you should do that, and create a script to parse the posts sent by FastSpring for each order. Upon order completion, the JSON order data sent via the webhooks includes the order tags containing the client ID. You can use the client ID to update your records with order information. You can complete the process by sending the tracking request for the client ID from your server. You can find more information about webhooks in our About Webhooks article.

 Tip

You can optionally subscribe to the return.created webhook event to tie return/refund information to the tracking client ID. Subscription lifecycle tracking can also be tied to the tracking client ID by subscribing to the subscription.activatedsubscription.deactivated, and subscription.canceled webhook events, all of which include order tags for the order that created the subscription.

In this way, the customer's web browser is not directly involved in the tracking process. By bypassing the browser, you can bypass ad blocking software and ensure that tracking and reporting occur for all customers.

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.