How to Setup Google Analytics for Your SaaS App

by Ludovic Thomas 10 comments.

✉️ Sign up for Updates







Based on our in-house research, and our personal experience, we’ve seen that a lot of Software-as-a-Service (SaaS) businesses setup Google Analytics on their Website, then they move on. They add a blog, a subdomain with another service, and the data gets tangled up and becomes hard to exploit.

Google Analytics may not be the best platform to analyze activation, retention or monetization, but it has a lot of great features, and it can be setup in minutes.

There’s limited down-side to setting up Google Analytics in your App or on your Website, well… when integrated properly.

I wrote the following guide to help you setup Google Analytics in your App and on your Website. It’s based on our current setup at Highlights, and my previous experiences at LANDR, a SaaS product, and Greencopper. It should help you get setup in no time!

How to Setup Google Analytics

The first thing you want to do is to go to the Admin section of your Google Analytics account. From there, select your account.

How to Setup Google Analytics for Your SaaS App - Google Analytics Admin Panel
Google Analytics – Admin Panel

An account can have several “Property”. And properties can contain one or multiple “View”:

  • A “Property” is used fo a specific project (it can regroup a Website, a mobile app, a blog, etc). It’s where you get your tracking code.
  • A “View” filters information based on several properties. It’s what you select in Google Analytics from the dashboard view. By default, a single – unfiltered – view is created for a property.

It’s good practice to create 2 properties for a company that has both Staging and Production environments. It helps keep the Production data clean (no bad events, pageviews, or outdated setups).

For Highlights, we use 2 distinct tracking codes. One for Prod, and another one for Staging.

How to Setup Google Analytics for Your SaaS App - Different Tracking Codes
Google Analytics SaaS – Tracking Codes

How to Filter Your SaaS App Data

Once you have a Production property, you can split your traffic using several “Views”. At Highlights, there are 4 views that we use:

  • App → For
  • App – Users Only → To exclusively track the authenticated users of
  • Website → For
  • Website + App → To track all sessions and users in a single bucket.

These views allow us to analyze in isolation the Website and Blog pages (“Website” view), the events from our App users (“App – Users Only” view), or the conversion from the Website to the App (“Website + App” view).

Unfortunately, when you create a new view, you can’t bring back the historical data; the view won’t contain any data.

How to Setup Google Analytics for Your SaaS App - Google Analytics Views
Views – Highlights

Once your views are created, you can add filters. A filter is a set of rules that will limit, or exclude some traffic / events / users from being sent to this view. For example, for Highlights we exclude our main office’s IP address, and only include the traffic from the “” hostname for the “Website” View (Filter “Predefined” > “Traffic to the hostname” > “Equal to”).

How to Setup Google Analytics for Your SaaS App - Google Analytics Filters
Google Analytics SaaS – Filters

When setting up filters, you can click on the “Verify this filter” link to check if the filtering is working. Google Analytics will indicate the percentage of users or pageviews impacted by the filter.

Here’s the configuration of the filter for the view “Website”. It only contains the traffic from “”.

How to Setup Google Analytics for Your SaaS App - Website Filter
Website Filter – Highlights

And below is the configuration of the filter for the view “App” that only includes the App traffic on “”.

How to Setup Google Analytics for Your SaaS App - App Filter
App Filter – Highlights

How to Integrate Google Analytics in Your App

The easiest way to setup Google Analytics on your Website and in your App is by adding the Javascript tracking code of a property to your web pages (at the bottom). It’s the easiest way, but also the least flexible.

How to Setup Google Analytics SaaS App – Highlights Tracking Code
Javascript Tracking Code – Highlights

For Highlights, we use Google Tag Manager. GTM allows us to add events and different analytics tracking codes (Intercom, Drift, Amplitude, etc) without even opening the code editor.

It makes it easy to collect data from multiple tracking pixels with a single tag (the Google Tag Manager tag). It also provides a certain level of quality control for our analytics, which is useful when we’re making a lot of changes to the product.

Although Google Tag Manager can be used by anyone within the team to add tags and events, it needs to be set up by a developer (or a data specialist).

An interesting alternative to GTM is Segment. Segment also makes it easy to import and send to multiple integrations like Google Analytics. It has great features like data playback.

The main downside for Segment is that it’s costly, and that the price increases when you get more users and data. As a bootstrapped startup, we just can’t afford it yet. :-).

You can decide to start with Google Analytics as your main analytics platform making it more valuable with goals, and when your team feels like conducting deeper analysis, or runs into limitations (the free version of GA is limited to 10M hits per month, GA uses data sampling, GA has no support, etc), you can consider transitioning to another analytics platform.

Analytics tools like Amplitude, Hotjar or Heap all have advantages when compared to a Google Analytics SaaS implementation. We’ll cover these alternatives in another post. Sign up to our newsletter to make sure you don’t miss out.

What’s Your Website’s Traffic Score?

Find out how well your site traffic performs against your competitors with a free audit.

Scan Now

Ludovic Thomas
Ludovic is a two-time startup founder (Greencopper and Highlights), and enjoy creating cutting edge products with passionate teams. At Highlights, Ludovic is responsible for the product.


  1. Thanks! Awesome step by step on the integration. Would be great if you also went into what data is being tracked and how it helps to see the bigger picture.

  2. Great, was wondering whether to create two properties ( and another one for the marketing site Will stick to one property and different views.

  3. I am glad to find it. There are so many developers working on this part but this is one of the best innovative post ever. Thanks for such post.

  4. Agree, great post! Question: since goals (conversion events) are defined at the View level in Google Analytics, does it screw up your attribution analysis between your Website view and your App view? Do you use cross-domain tracking? Do you use Smart Goals?

  5. Thanks Jon.

    In fact, there are 3 views with 3 different goals (conversion from blog posts to home page for the “Website” view, conversion from signup to app objectives for the “App” view”, and conversion from blog posts to signup for the “Website + App” view). Each one is different and is not impacting the others.

    It can be people with different roles in the company who will configure and check conversions (Marketing managers for “Website” view, Product owners for “App” view, and both for “Website + App” view).

    We use a subdomain, for the app, so we use generic subdomain tracking (, but not cross-domain tracking.

    We do not use Smart Goals, as we do not use Google Ads for now.

  6. Hi, I have a question concerning google analytics code. Is it enough to implement tracking code on the website (WordPress) or it os required to implement it in both – website and app code?

  7. Hi Tomasz, you need to ensure the Google Analytics tracking code is set on both website and app.

  8. Thanks for an awesome and helpfull post. Can you perhaps elaborate on how similar setup can be done with fb pixel and LinkedIn insight tag? Is it even possible to e.g. track conversion from web to app with these tools? Thanks in advance

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.