Pavel Koryakin , 2 ноября 2018

How to do web analytics for SaaS through Google Analytics: introducing and tracking funnels

I found that in several SasS projects, proper analytics were not set up to track and maintain funnels. To solve these problems, we chose Google Analytics.

What is the problem, and why Google Analytics?

I found that several SasS projects did not have proper analytics set up to:

  • See how users move through the funnel for each traffic segment, for example, to place an order.
  • Measure LTV and CAC by traffic channels, advertising campaigns – in simple words, how much we spend to attract a user and how much revenue they bring during a year.
  • Calculate the customer retention rate, that is, whether the attracted users remain with us or leave after a while, whether the channel grows in number of regular customers.

As a rule, the tools of choice were Google Analytics, ROIStat, Metric, Amplitude, but none of the tools were fully integrated. I chose Google Analytics (hereafter GA) for the task. It is far from perfect, but it is quite capable and not so expensive for basic tasks.

Pros

  • GA can receive external data, for example, you can send transactions to it using POST requests
  • GA can output data to visualization systems DataStudio, Power BI
  • Manuals and tutorials are readily available
  • Easily integrates with all Google services
  • Free
  • Stores data for up to 50 months

Cons

  • When you select a timeframe that contains 1 million sessions, the report will be based on only 100 thousand sessions, because for any report over 500 thousand sessions, data is sampled
  • Data and reports are pulled from cookies (browsers, devices), and not users, therefore, over the course of a year one user may be presented in GA as 10 different users and it is impossible to glue them together within GA (doable, but too many crutches).
  • High entry threshold due to complicated interface

Let's look at the solution of each problem from technical implementation to online report, which can be opened and viewed in a couple of minutes.

Since it is hard to fit all the info into one article, I will divide it into several parts, besides it’s not a given that the community needs all this information and faces the same problem.

The implementation of all steps requires a mid-level command of Google Analytics. One article cannot possibly cover all the necessary skills but they can be easily googled.

Let's start by building the funnel.

What for is the funnel?

The simplest example of a funnel is a an online appliance store.


Go to Website > Put Goods into Cart > Go to Cart > Check-out: Shipping > Check-out: Contact Details > Check-out: Payment Method and Payment


A good report is one from which actions can follow.


  • For users from Murmansk, we have low conversion rates at the delivery step, because the current logistics company has a high shipping fee > we need to look for alternatives.
  • Users put the goods in the cart but do not proceed to check-out because the designer had an idea to put the cart on the left > We move the cart to the right.

Designing the funnel and sending events

As the outcome, we want to see conversion from one step of the funnel to another and quantitative indicators, for example:

Web analytics for SaaS through Google Analytics

The steps of the funnel can be out of sequence and variable. Imagine we are designing a funnel for a private advertisement service like Avito.


Open Ads Editor > Create Ad > Sign In > Select Tariff > Transaction



Sign In > Top up Balance > Open Ads Editor > Create Ad > Apply Tariff


In this case, we would like to be able to manually create funnels on the go and not be tied to a specific sequence. For example, we want to see users who first create an ad and then pay.


Open Ads Editor > Create Ad > Select Tariff > Payment


Conversely, we want to see those who first top up the balance and then create an ad.


Top up balance > Open Ads Editor > Create Ad > Apply Tariff


To do this, at each step of the funnel, we need to send an event to Google Analytics, from which we will be able to make the funnels as we need. So, let's take a look at these events and how to send them.

I strongly recommend using Google Tag Manager (hereinafter GTM), this is a layer between the website and the counters. For example, you can set up an event once and send it via GTM to Analytics, Metric and so on.

How to send events to Google Analytics

We send events to the GTM data layer

There are many ways, but the most reliable and correct way is through the data layer. The data layer is just a transit layer between the site and the counters.

To send, we must initiate the following javascript expression.



window.dataLayer = window.dataLayer || [];
  dataLayer.push({
    'event': 'name'
  });

Let's take a closer look at each line.

window.dataLayer = window.dataLayer || [];— check if there is already a data layer created; if not, then create a new one.

dataLayer.push({ 'event': 'name’}); — at the right time, we add the event name to the data layer;

'name' — the name of the event itself;

So, we need to initiate this expression at each point of the funnel and substitute the event names. For example, we want to send events whenever the user opens the Ads Editor.



window.dataLayer = window.dataLayer || [];
  dataLayer.push({
    'event': 'openAdsEditor'
  });

Or when the user filled in and confirmed the ad in the Ads Editor.



window.dataLayer = window.dataLayer || [];
  dataLayer.push({
    'event': 'ad_submit'
  });

You can test whether the events go through in GTM debug mode. We will not go into this, as you can easily google it..

Web analytics for SaaS through Google Analytics

Now we need to extract the events from the data layer and send them to GA


Extract the event from the data layer and send it to Google Analytics

We create a  Custom event trigger in GTM and specify  ad_submit in the Event name field, this is the value that we specified when sending the event at the website.

Further, this trigger will launch the tag, which in turn sends the event to Google Analytics.

Web analytics for SaaS through Google Analytics

Next, we create a tag in which we specify the following values.

Web analytics for SaaS through Google Analytics

Category funnel and action ad_submit are arbitrary, we will use them to identify the event in GA. We specify our previously created trigger Create Ad.

Web analytics for SaaS through Google Analytics

After saving the tag, we deploy it to production, click on Publish button and test: every time a user fills in an ad, an event should appear in the GA report called Real time > Events

Web analytics for SaaS through Google Analytics

We follow the same cycle for other events, that is, funnel steps that we want to track.

How to build a funnel in GA

Suppose we sent all the events and need to build a funnel out of them.

We create segments in GA. Each segment corresponds to one event. For example, we create a segment for the event Open Ads Editor, since it will be the first in the sequence

To do this, we select any report in GA, for example Channels, and click +Add Segment

Web analytics for SaaS through Google Analyticss

Next + New segment (Новый сегмент) and we set the segment parameters

Web analytics for SaaS through Google Analytics

In tab Sequence Include Users whose Any user interaction matches the event Event Category exactly matches funnel AND Event Category exactly matches openAdsEditor

In plain language, we single out users who interacted with our event.

Next, we make the second step of the funnel. For this, we copy the first segment.

Web analytics for SaaS through Google Analytics

There we add the event of the second step of the funnel Create Ad. Since we need to count only those Create Ad users who previously opened the editor, we add the previous funnel event Open Ads Editor as step 1 and add Create Ad as step 2.

Web analytics for SaaS through Google Analytics

That is, in the funnel second step Create Ad, we only get those users who have passed the first step Open Ads Editor.

What to look for in the report

Web analytics for SaaS through Google Analytics

Changes in the funnel over days, weeks or months.

Web analytics for SaaS through Google Analytics

The funnel with general report indicators or with breakdown by parameters, in this case traffic Channels.

By slightly modifying the sending of events, we can add, for example, specific ad subjects to see which subjects don't get many ads created. But more on that in future articles..

Subscribe to Facebook, so you don't miss new articles!
Best articles
Similar articles
9 Case Studies of Online Store Google Ads Automated Bidding Strategies: from 4-fold Revenue Growth to Drop to Zero
9 Case Studies of Online Store Google Ads Automated Bidding Strategies: from 4-fold Revenue Growth to Drop to Zero
We look at successful and failed cases of our clients to understand when automated bidding strategies can boost ROAS by 30%, increase orders and revenue by 4 times, reduce the cost per lead by 2.3 times or conversely sink all indicators.
Impact of Google Ads Withdrawal from Russia on Contextual Advertising in E-Commerce: So Far Not So Bad. But that’s for now. NEWS
Impact of Google Ads Withdrawal from Russia on Contextual Advertising in E-Commerce: So Far Not So Bad. But that’s for now.
It seemed that after Google’s withdrawal, the advertising market in Russia should collapse. But so far, not everything is so definite: some of our projects enjoy revenue growth. In this article we are looking into why this is so and which tools work best now.
Integration of the client and the agency HOWTO
Integration of the client and the agency
In the article we will tell you about our integration setup between the client and the agency, and how communications are built.
How to do web analytics for SaaS through Google Analytics: introducing and tracking funnels HOWTO
How to do web analytics for SaaS through Google Analytics: introducing and tracking funnels
I found that in several SasS projects, proper analytics were not set up to track and maintain funnels. To solve these problems, we chose Google Analytics.
Free End-to-End Analytics in 20 minutes: Google Sheets + Google Analytics + Zapier HOWTO
Free End-to-End Analytics in 20 minutes: Google Sheets + Google Analytics + Zapier
Hi! We have figured out an end-to-end analytics solution for small companies. This article is meant for all internet marketing professionals.
Script for substitution of content on the site through UTM tags HOWTO
Script for substitution of content on the site through UTM tags
How to set up a dynamic replacement of almost any element on the site. Just using a simple script and Google Tag Manager.
to read our blog

Get your Google Ads audit

After you leave a request: interview ~15 minutes → guest audit access ~15 minutes → audit within 2-4 days → proposal approval → first iteration start. In our experience, it is realistic to get the process rolling in 2-3 days.

Project manager Alex
Alex

Project manager



Write to — info@1jamagency.com or skype —