Visitor Retention Analysis using Calculated Metric Function

Pradeep jaiswal
4 min readAug 26, 2021

--

After getting inspired by Adam Greco blog & Piermarco Burrafato article, I decided to play around and try to recreate the result using a powerful calculated metric function in Adobe Analytics.

I would consider a visitor retention cycle 6 months time range instead of 24 months, which can be extended to any number of months as desired by the business requirement.

Before we start, let's understand the user metric definitions. New users are the acquired unique users this month. Repeat users are returned users from the last six months. Retained users are the users this month who were also users last month. Resurrected users are repeat users this month that are not retained from last month but from some month prior to it.

Monthly Active Users = New users + Retained users + Resurrected users

Repeat Users = Retained users + Resurrected users

Step 1: Create date ranges for ‘monthly’ and ‘6 month’ time ranges for each month

Here is an example of time range builder for ‘Two months ago’ and ‘6 months prior to 4 months ago’

Step 2: Create segments for ‘monthly user’, ‘monthly new user’ for each month

Here is an example of segment builder for ‘Monthly user (3 months ago)’, ‘New user (Last month)’

Step 3: Create segments for ‘monthly repeat user’, ‘monthly retained user’ for each month

Here is an example of segment builder for ‘Repeat user (4 months ago)’ and ‘Retained user (2 months ago)’

There are two ways to create these segments.

Option 1 : Segment definition without ‘month selector’.

When two date range are having inclusive AND operation, the visitor counts are carried over to both of the month ranges.

Option 2 : Segment definition with ‘month selector’ time range as HIT container.

To exclude the visitor counts for earlier months, select ‘month selector’ time range as HIT container.

This option is better, if you want to represent visitor count for each month in separate column.

Step 4: Create ‘New user’ metric

Use nested If function in metric builder, and put ‘Month number’ criteria in each logical condition. Every false container would have IF-True-False logic for next month.

Step 5: Create ‘Repeat user’ & ‘Retained user’ metric,

Just replace the yellow highlighted ‘New user’ monthly segments with ‘Repeat user’ & ‘Retain user’ monthly segments created in step 3. Segment definition in option 1 is having less number of components and operational logic, so it would be faster to process. And good news is both of the segment definition returns the same result from calculated metric function.

I used ‘Save as’ method instead of rebuilding the entire metric.

Step 6: Create ‘Resurrected user’ metric

Resurrected users (metric)= Repeat users (metric) — Retained users (metric)

Optionally I have created additional metric which is aggregation of ‘New user’ & ‘Repeat user’ metric, the total count should match with Monthly Unique visitor column.

Step 7: Create metric table

These numbers should match with segments table created in step 3.

Note these custom component definition is focused for monthly based analysis. Therefore if you plan to use, smaller scale for your retention cycle such as a week, a day. For that, you would have to replace monthly time ranges with weekly or day wise time ranges.

I will be happy to help, if you have any question…

If you are a #AdobeAnalytics enthusiast, do join our Linkedin group AdobeAnalyticsProfessionalAndRecruiters .

There is Adobe Analytics Implementation Whatsapp group

I have also written about,

Customer engagement analysis using SQL

Anomaly Detection in Non-programming way using Excel

SQL Murder Mystery an interactive game

--

--

Pradeep jaiswal

Adobe Analytics Enthusiast 📊|Data Analytics 🔢|RPA Enterprise QA Tech Lead 🤖 https://www.linkedin.com/in/pradeep2020/