Customized Returning Visitors with Google Analytics

Google Analytics offers a KPI for “returning visitors” but what if you would like to be more specific about the meaning of “returning”? Actually this figure is customizable with basic API requests and a very simple idea – at least for two consecutive time spans.

The idea

returning visitors

Let’s assume we want to know how many visitors from calender week 2013-1 (Dec 31 2012 until Jan 6 2013) returned to the web-site in calender week 2013-2 (Jan 7 2013 until Jan 13 2013). I’ll refer to calender week 2013-1 as T1, to 2013-2 as T2 and to both combined as T1+T2. The function v maps the time span onto the number of visitors then – so v(T1) = 5 means in calender week 2013-1 Analytics counted 5 unique visitors. Then the number of visitors in T2 who also visited in T1 is:

“Number visitors from T1 who came back in T2” = v(T1) + v(T2) – v(T1+T2)

Think of it like this: We take v(T1+T2) people and place v(T1) from it under T1, the rest must have visited in T2 and the difference v(T2) – (v(T1+T2) – v(T1)) can only be taken from T1. I recommend staring on the exemplifying picture until the penny drops.

Implementing the idea

I created a Job using Pentaho Kettle that fetches this data from Google Analytics API for my web-site and this is the not that cheerful but promising result:

Clipboard02

I excluded visitors from Munich because that’s mostly me. So at the present the share of people coming back on a weekly basis fluctuates around 4%. More would be nice but I am working on it already. I am going to publish the Kettle job with explanations for this little project in a soon to come article.