Google Measurement Protocol

Last modified November 10, 2016

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

Details about Google Measurement Protocol (GMP) and documentation can be found 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.  More information about passing order tags is available 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 webhooks, you will need to 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 will include the order tags containing the client ID, which you can use to update your records with order information, and complete the process by sending the tracking request for the client ID from your server.  More information about webhooks can be found in our Webhooks article.

Tip

You can optionally subscribe to the  return.created webhook to tie return / refund information to the tracking client ID.  Subscription life-cycle tracking can also be tied to the tracking client ID by subscribing to the  subscription.activatedsubscription.deactivated, and  subscription.canceled webhooks, 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, and by bypassing the browser, you can bypass ad blocking software and ensure that tracking and reporting occur for all customers.

Google Measurement Protocol tracking Copy