Guide: Using Google Analytics for Your Subscription (SaaS) Product

Normally, when teams are looking to start to use an analytics platform for their SaaS, they usually think of others out there, such as Heap, Amplitude, or Mixpanel. While they are solid for analyzing user-product interactions, for your marketing attribution of your growth efforts Google Analytics (GA) is specially important.

Google Analytics is specially useful if you’re just starting out as it’s completely free, thus making Google Analytics (GA) much more accessible to SaaS product owners of all stages. While the structure of Google Analytics wasn’t originally created for subscription businesses, with specific setup in your implementation, Google Analytics can give you the results you need.

In this article, rather than going through the entire implementation of Google Analytics, we’ll go over what needs to be done to correctly track your SaaS product with Google Analytics.

Tracking Users and Events

Regardless of what type of SaaS business you operate, all types of information about your users (user properties or dimensions) and what actions they do within your application (events).

You can use the collected in Google Analytics to  These improvements will allow your sales pipelines to perform better and, in the end, result in more subscriptions.

Although each product is different, with different needs in terms of what will be tracked, we’ve added a list of things to get you started.

User Properties (custom dimensions)

  • User ID
  • Company Size
  • Industry
  • Occupation
  • Lifetime value
  • Subscription plan name (Free vs Paid)
  • Subscription term (Monthly or Yearly)

Events

  • Sign ups
  • Sign ins
  • User invites
  • Initial subscriptions
  • Recurring subscriptions
  • Subscription cancellations
  • Subscription refunds
  • Subscription changes
  • Invoice or report creation
  • Uploads (files, documents, images)
  • Downloads
  • Form submissions

Limits

You’ll have certain limits on how much you can track.

  • Total Events – 400
  • Total User Properties – 25

Source: https://support.google.com/analytics/answer/9267744

Recurring Subscriptions

Google Analytics platform wasn’t built with SaaS products in mind, and since revenue isn’t normally based on multiple purchases, but instead on multiple subscription changes for a user, there are some creative tweaks you’ll need to make.

As a SaaS business, the normal flow of a user that want to keep track may be:

  1. New user registrations – User signs up for a free trial or creating a free account (freemium)
  2. Initial Paid Subscription – User upgrades to a paid subscription, where they have entered their details and made a successful payment
  3. Repeating Charges – User is regularly charges for their subscription automatically

In order to successfully track recurring revenue in Google Analytics, you’ll need to satisfy the previous 3 conditions in the user flow. Since it’s a subscription, the processing of multiple payments after the initial payment events that take place over multiple sessions become difficult to track as they no longer happen with user interaction so can’t be tracked.

So how can you track these recurring payments in Google Analytics? We’ll list below each step which are required to successfully do this, and assume you use Stripe, but the same workflow would be needed for others.

Setup User ID Tracking in Google Analytics

Having User ID tracking setup will allow you to see how users behave overall, including when they use other platforms or devices. It will also simplify your data since all individual user information will merge into a single user.

You can follow the instructions below, depending on which version of Google Analytics you’re setting up

Send User ID as metadata to Stripe

When a successful subscription is created and sent to Stripe, you’ll need to send over your database User ID as metadata. Read more about metadata on the official Stripe website: https://stripe.com/docs/api/metadata.

Example:

import stripe
stripe.api_key = "sk_test_6QbCFOBG0rLBmOA4pD8p0ZdX"

stripe.Subscription.create(
	metadata={'user_id': '1234567'}
)

Send Stripe Events to Google Analytics

Once you have the metadata being sent to Stripe, you will need to have some way to get the subscription data be sent to Google Analytics. There’s a few ways on how to do this:

  1. In-house – Have your development team build an application to send the data automatically from your Stripe account to Google Analytics.
  2. Consultant / Agency – Have another company support you in building an application to send the data automatically from your Stripe account to Google Analytics.
  3. Service – Use a platform that does this already to send the data from Stripe to Google Analytics.