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

What is the problem and why Google Analytics


Faced with the fact that several SasS projects did not have normal analytics in order to:


  • Watch in the context of each traffic segment, as users move through the funnel, for example, placing an order.
  • Consider LTV and CAC, from traffic channels, advertising campaigns, in simple words, how much they spent on attracting the user and how much revenue he brought during the year.
  • To consider the return rate, that is, whether the attracted users remain with us or leaving after a while, whether the channel gives an increase in regular customers.

As a rule, Google Analytics, ROIStat, Metric, Amplitude were used, but none of the tools was fully integrated. Google Analytics (hereafter GA) chose to solve the problems above, it is far from ideal, but it is quite realistic and not so expensive to solve basic tasks.


pros


  • Able to receive external data, for example, you can send transactions to it using POST requests
  • Give data to visualization systems DataStudio, Power BI
  • Many background information
  • Easily integrates with all Google services.
  • Free
  • Stores data for 50 months

Minuses


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

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


Since it is difficult to fit all the material in one article, I will divide it into several parts, besides it’s not a fact that the community needs this information and the problem exists.


The implementation of all stages requires an average level of Google Analytics, in one article it will not be possible to cover all the necessary skills, but it is easily googled.


Let's start with building a funnel.


Why do I need a funnel


The simplest example of a funnel is a funnel in the online store of household appliances.

I went to the site> I put in the basket> I went to the basket> Design: delivery> Design: contact details> Design: payment method and payment


A good report is one from which actions will follow.


  • Visitors from Murmansk have low conversion rates at the delivery stage, because the current logistics company has a high tariff> you need to look for alternatives.
  • Put in the basket, but do not continue to design, as the basket is on the left of the designer's idea> change the position of the basket to the right.

Designing a funnel and sending events


At the output, we want to see the conversion from one stage of the funnel to another and quantitative indicators, for example.



The stages of the funnel can be inconsistent and variable, imagine that we design a funnel for a service like Avito.


Opened constructor> Created advertisement> Registration > Tariff selection> Transaction


Register > Balance Replenishment> Opened Designer> Created Ad> Applied 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.


Opened constructor> Created ad> Chose tariff> Payment


Conversely, first, who replenishes the balance, and then creates an ad.


Added balance > Opened constructor> Created ad> Applied tariff


To do this, at each stage of the funnel, we need to send an event to Google Analytics, from which we will be able to make up the funnels, as it is convenient for us, so consider what these events are and how to send them.


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


How to send events to Google Analytics


Send events to the GTM data layer


There are many ways, but the most reliable and correct is sending through the data layer (data layer). The data layer is just a transit 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, add the event name to the data layer;

'name' - actually, the name of the event;


So, we need to initiate this expression at each moment of the funnel and substitute the name of events, for example, we want to send events at the moment when the user opens the ad designer.


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

Or at the moment when the user filled out and confirmed the ad in the constructor.


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

To test whether the events come true, you can in GTM debug mode, we will not go into it, as you can easily google it.



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



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


Create a trigger in GTM of the Custom event type and specify ad_submit in the Event name field , this is exactly the value that we specified when sending an event on the site.


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



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



The funnel category and the ad_submit action are arbitrary, it is by them that we will identify the event in GA. We specify our previously created trigger as a trigger. Filled ad .



After saving the tag, expand it to production, click on the Publish button and test: when filling in the announcement, an event should come to the GA report called Real time> Events (Real time> Events)



We carry out a similar cycle for other events, that is, funnel stages that we want to track.


How to build a funnel in GA


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


We create segments in GA, each segment is equal to one event, for example, we create a segment for the event Opened Editor , since it will be the first in the sequence.


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



Next, + New segment (New segment) and set the parameters of the segment



Tab the Sequence (Sequence) the Include (Insert) Users Offline (Members), who Any For user Interaction (Any interactions) corresponds to the event E vent the Category funnel exactly matches the AND the Event exactly matches the Category openAdsEditor


In simple words, we single out users who interacted with our event.


Next, do the second stage of the funnel, for this we copy the first segment.



And inside we add the event of the second stage of the funnel Filled in the ad . Since we need to take into account only those users Filled in an ad that the editor had previously opened, then we add the previous event of the funnel as step one. Opened the editor and Filled in the ad as step 2 .



That is, the second stage of the funnel Filled in an ad, we get only those users who have passed the first stage. The editor has opened.


What to see in the report



Changes in the funnel in the context of days, weeks or months.



The funnel in the context of the general indicators of the report or in the context of its parameters, and in this case the Traffic Channels.


By slightly modifying the dispatch of events, you can add, for example, the chosen theme of an ad to look at which topics are worse placed ads, but more on that in the following articles.


Everything, was the information helpful? What are alternative solutions?


Also popular now: