Tracking funnels in Google Analytics – Part III
In my last two posts I described my research for finding the best way for tracking and presenting funnels in Google Analytics. I found that the current options provided by GA, and additional solutions such as John’s solution – which is excellent, do not address two major issues:
- The average user on my site converts within 2-3 visits
- There is a significance to the order of events
The fact that Google Analytics focuses on visits, rather than visitors, makes things even harder for me. Google Analytics’ goal and funnel features let you define goals per visit, and the fact that you can have up to 20 goals per profile allows you to build a horizontal funnel. However, with no reference to the order of the events, it is more like a “goal table” than a funnel.
This is why I decided to come up with my own solution, taking into account one main guideline: I want to use the “out of the box” Google Analytics features as much as possible, implementing the minimum coding necessary. I could not avoid coding all together, but I did not want a solution that involved exporting the data using API calls and processing it externally, or adding an external DB to manage the funnels.
The fake pageview I sent for each step in the funnel is a fake URL, which contains – besides the current step – an aggregation of all the steps prior to this one. Therefore, if we have the following funnel:
then for the first step (the landing page) I would send “landing page”, for the Sign Up step I would send “landing page->sign up”, and so on.
To make it simple, each step along the funnel is represented by a character:
Therefore, if a user signs up, a pageview will be sent to GA with the following URL: “/unique-event/AB”, and if the user activates, then a pageview will be sent with the following URL: “/unique-event/ABC”.
and one of our users used the following path: ABGC, then we know that this user received the email promotion before activation. On the other hand, this user: ABCG, received the email after activation.
/* The next line defines the following funnels: ABC - Landing Page > Sign Up > Activation ADBC - Landing Page > Subscribe > Sign Up -> Activation AEBC - Landing Page > Plan Page > Sign Up -> Activation BC - Sign Up > Activation BFC - Sign Up > Newsletter > Activation BGC - Sign Up > Email Promotion > Activation */ var funnels = ["ABC","ADBC","AEBC","BC","BFC","BGC"];
Once you set the funnels in the tracking script, the code will automatically look for matches in the user’s path. Every time it finds a new match, it will send a fake pageview. This code only reports the first match, and does not send duplicate page views. Therefore, if we set three funnels: ABC, ADBC and AC, then the following page views will be sent to GA:
As mentioned, the code will only send the information to GA the first time a user performs something that matches one of the funnels or a subset of the funnel. I wrote the code in such a manner as I was interested in each unique number, not the total number (for example, I wanted to know the amount of unique users who had purchased something, not the total amount of purchases)
var funnels = ["ABC","ADBC","AC"];
then we need 9 goals in total:
- 3 goals for “ABC”: A, AB and ABC
- 4 goals for “ADBC”: A, AD, ADB and ADC
- 2 goals for “AC”: A and AC
Since all 3 funnels have the same first step (A), you can save 2 goals and reuse the same goal for all 3 funnels.
You can name the goals whatever you like. Don’t worry too much about duplicating names, as you will later create a custom designed report for each funnel, which means that “ABC” will have its own report or tab in a report.
Your goal list should look something like this:
You can see that I have two “Sign Up” goals, but each one has a different path (“AB” for the first funnel: ABC, and “ADB” for the second funnel: ADBC).
Now all you have to do is create a custom designed report for each of the funnels. You can either create one report with tabs (each tab displaying a different funnel), or one report per funnel.
Following is a report that I created for my basic funnel and its variations. This report has three tabs, the first one showing the total amount of activations (landing page -> sign up -> activation).
The second and third tabs are nuances on the basic activation funnel. Following is a report of the activations performed by users who passed through the “Price Plan” page:
You can see that only a third of the Sign Ups were performed through the “Price Plan” page (29 out of 75). However, you can also see that almost all of the Sign Ups from direct traffic were performed through this page (21 out of 22).
This is from the first tab (the basic funnel):
And this is from the second tab (Price Plan page):
Based on these numbers, you might consider adding the Price Plan table to your landing page, in case of direct traffic…
This is just dummy data that I prepared for this post, and I wish that in real life we had such clear statistic significance. However, I think it is obvious that you can gain a lot from breaking your funnels down and examining each nuance.
You can work without custom designed reports, but if you have too many funnels, the built-in reports might look messy, and don’t forget that the GA conversion rates are per visit, not visitor.
One more very cool feature in my code is that this solution uses a custom variable for storing the navigation path for each user. This custom variable can be later used to segment and investigate each funnel and variation. I will talk about this more in my following post.
One last note: This solution should not affect your additional goals and funnel setups. If you exclude all calls to /unique-events from your current profiles, and only include them in a separate profile (or create a different account for it), you can actually achieve separate profiles which are for funnel analysis alone.