SaaS marketing teams usually reach out to me either because they don’t get enough value out of their data or because they don’t know what data they need.

These are teams with some very talented people, but they struggle to maximize impact simply because they can’t connect their marketing activities to revenue. One problem I see very often is that their top-of-the-funnel data (e.g. ads, social, and website) is completely disconnected from what happens inside their application (e.g. purchase and sign up).

If you can’t tell which marketing activities are bringing revenue, you can’t grow.

Without a full overview and tracking of user behavior along the customer journey, there’s little alternative but to optimize for traffic. This can lead to bringing in low-quality leads, wasting money, and having a hard time reaching goals.

The Marketing Attribution eBook
Real-world data combined with expert insights in a simple eBook to give you the roadmap for scaling your marketing attribution efforts.

In this article, I’ll show you how I helped a SaaS company set up their marketing attribution using Google Analytics, Google Tag Manager, Google Data Studio, and Salesforce. After reading this and implementing what I will cover, your team will be able to answer the following questions:

  • Where do trial users and paying customers come from?
  • What marketing activity brings our most valuable customers?
  • What is the ROI of our different marketing activities?

The company I worked with was a SaaS startup. They were switching from a sales-led model, in which users could only get a license by going through sales, to a self-serve model where users could subscribe on their own.

This change in business model meant they would be much more reliant on performance marketing campaigns to acquire new users. It also meant they would not be having as many direct conversations with leads anymore (through sales), having to switch from more qualitative to more quantitative data in marketing. Without proper attribution, their plans would fail.

1. Establish your marketing data pillars

We started by deciding on what we wanted to measure. If you are also trying to grow a SaaS product, I suggest you decide on similar metrics. These are the three data pillars we decided to focus on:

  • Marketing activity: The source the user has come from and the marketing pages the user has engaged with (e.g. the homepage), which we’ll access through Google Analytics.
  • Users, sessions, and conversions: Identifying the users and sessions that have led to new sign-ups, which we’ll also access through Google Analytics.
  • Revenue: How much revenue users have generated, which we’ll access through Salesforce data.
Data pillars

2. Set up triggers on a tag management system

Tag management systems (TMS) bring two main benefits to marketing teams: independence from engineering teams, as well as governance and consistency through triggers (more on that below).

A TMS centralizes all your tags in one place. You only need to install one tag on your code. All additional tags for different channels, like Google and Facebook, are installed in the TMS. As a result, your marketing team has more freedom to implement tags without needing engineers. With more freedom, your team can experiment faster with different audiences and platforms.

Another advantage of a TMS is that it allows your marketing team to generate consistent data across all platforms. The tags will fire depending on the triggers that you choose.

Triggers on tag management

For this use case, we set up a trigger that fires whenever the user signs up for a trial. We could then use that trigger to set up a Google Analytics event, as well as individual platform (e.g. Google Ads) conversion events. With this set up, you know “sign up” is always firing at the same instant for all your tracking.

3. Migrate to Google Analytics 4

If you haven’t migrated to Google Analytics 4 (GA4) yet, as my client hadn’t, then you’re still using Universal Analytics. The problem is that Google is retiring Universal Analytics in July 2023. From then on, your Universal Analytics will no longer track new hits. If you need year-on-year data (as most seasonal businesses do) then you need to get GA4 as soon as possible.

4. Centralize your marketing pages and app under one tracking property

This step connects what is happening outside the app with what happens inside it, allowing us to track user behavior after they convert, so we can understand where revenue comes from.

A lot of SaaS companies build their websites on a CMS but their product is in a subdomain. That means they run on totally different systems. Take Messagebird, for example. Their website runs on Webflow and their app is under a subdomain.

How can they make sure that a user’s activity on marketing campaigns and on the website is connected with their activity inside their app? They need to make sure they are being tracked using the same property.

5. Identify and pass our join key for revenue attribution

To be able to calculate the ROI of our different marketing activities, we had to identify the converted users from each of our sources. You will need to do the same.

To achieve that, we passed a unique user identifier (UUID) on Google Analytics when the user signed up and/or requested a demo. On GA4, we set this UUID as an event parameter. This UUID functions as a join key to our revenue data (backend) for us to calculate how much revenue is attributed to this same user.

6. Join marketing data with revenue data

In order to calculate the ROI per marketing activity, we need to join marketing data (Google Analytics) with revenue. For this customer, the revenue data was on Salesforce, but your revenue data could live in a different place, like a MySQL database or Stripe.

We join Google Analytics and Salesforce under the UUID event parameter we’ve set up in the step above. You can see how this works below.

Google Data Studio

For this customer, we joined the two datasets as a data blend on Google Data Studio. Depending on the volume of data you have, a better solution could be to join these two data sets on a data warehouse (e.g. Snowflake) and expose it on your BI tool (e.g. Looker).

Once users are being tracked using the same properties and users have a unique user identifier, it’s time to join Google Analytics and Salesforce. We can do that by integrating the two and making sure Google Analytics passes a user’s unique identifier into Salesforce every time a user first submits a form on the website. In turn, whenever a deal is won, Salesforce will send an event back to Google Analytics.

7. Visualize metrics in Google Data Studio

For the marketing team to be able to understand the performance of their activities, results must be easy to access. So we built a marketing dashboard with sign-ups per source on Google Data Studio.

Metrics

Conclusion

My client decided to switch from a sales-led to a self-serve business model. With the right tracking in place, they could optimize their marketing campaigns to generate revenue, not traffic. They centralized the tracking of marketing pages and could successfully attribute conversions. They were also able to tell which users came from which campaigns, and that really helped them understand where to focus marketing spending.