Upsight logo Back to top

User Retention

Retention


users/retention

URL

http://query.kontagent.net/processed/v1/social/users/retention/<data_type>.<data_format>/?api_key=<API KEY>&<other parameters>

Data Output Types

ParameterValuesDescription
data_type
  • series
  • list

The output data type.

Tip You may use series.json works for both mobile and social. However, avoid using list.json for mobile, as you will get an error.

data_formatjsonThe format of the output data.

Required Parameters

ParameterValuesDescription
api_keyYour Upsight Analytics API key.
start_timeYYYYmmdd_HHMM formatThe start time element (day, week, month) in the time range being queried in the YYYYmmdd_HHMM format.
time_segment
  • week
  • month
  • day
The frequency of data reporting. For example, a time segment by day will return the data on a daily basis between the start and end times specified. Similarly, a time segment by hour returns the data on an hourly basis between the start and end times specified.

Optional Parameters

ParameterValuesDescription
end_timeYYYYmmdd_HHMMRequired if data_type islist. The end time element (day, week, month) in the time range being queried in the YYYYmmdd_HHMM format.
trailing_zeros
  • true
  • false

This parameter can only be used if data_type = list is selected. Default is false.

cohorts
  • 1
  • 2
  • 3
  • 4 (Default)
  • 5
  • 6
This parameter can only be used if data_type = list is selected. Default is 4.

When used with data_type=list, cohorts gives you the ability to look at multiple days/weeks/months worth of retention data. If cohort=1 (default) you will see retention metrics just for that day/week/month. If cohort=4, you will see retention metrics for 4 consecutive days/weeks/months (starting with the start_time day). The range of values for cohort is 1-6.

duration
  • 1 - 12
This parameter can only be used if data type = list is selected.

when used with data_type=list, duration allows you to choose how many days/weeks/months worth of retention data you want to see for each cohort. If duration=1, you will only get 1-day/week/month retention. If duration=6, you will get day/week/month 1-6 retention. Range of values of duration is 1-7.

offset
  • series
This parameter allows you to identify day/week/month 'n' retention (e.g., offset=1 is day-1 retention, offset=7 is day 7 retention). The allowed values are 1-7.

Code Example

Social Query URL:

http://query.kontagent.net/processed/v1/social/users/retention/list.json/?api_key=<API KEY>&start_time=20120101_0000&time_segment=day

Return:

[
[
[0, 1.0],
[1, 0.17606837606837608],
[2, 0.090598290598290596],
[3, 0.076923076923076927],
[4, 0.066666666666666666],
[5, 0.058119658119658121],
[6, 0.056410256410256411],
[7, 0.052991452991452991],
[8, 0.05128205128205128]
],
[
...
],
...
]