A/B Testing

DataVault customers may utilize the "app subversion" parameter to group their customers and subsequently report on the differences via DataVault queries.

Providing the App Subversion Value

Note: The app subversion value must be an integer.

Example DataVault Query

The app_subversion value will be appended to app_version, so querying requires parsing app_version for the integer after the last . in the version string, e.g. an app_version of 1.0.0.2 has an app_subversion of 2.

/* Calculates 7 day retention rates (see https://help.tenjin.io/t/how-is-tenjin-retention-calculated/24)
 * Groups by country, app_version, and app_subversion
 */
SELECT 
  country
, app_version as app_version_original
,  REGEXP_SUBSTR(app_version, '^([^.]*\\.){2}[^.]*') AS app_version -- first three integers
,  REGEXP_SUBSTR(app_version, '^[^.]*\\.[^.]*\\.[^.]*\\.([^.]*)', 0, 1, 'e') as app_subversion -- last integer if there are more than 3
,  COUNT(distinct coalesce(advertising_id, developer_device_id)) AS tracked_installs
,  COUNT(distinct CASE WHEN date_diff('sec',acquired_at,created_at)/86400 = 7 THEN coalesce(advertising_id, developer_device_id) end) AS d7_users
,  COUNT(distinct CASE WHEN date_diff('sec',acquired_at,created_at)/86400 = 7 THEN coalesce(advertising_id, developer_device_id) end)/COUNT(distinct coalesce(advertising_id, developer_device_id))::DOUBLE PRECISION AS d7_rr
FROM events e 
WHERE 
  e.app_id = '@APP_ID'
  AND acquired_at >= '2019-06-01' AND acquired_at < '2019-06-03' 
  AND created_at >= '2019-06-01'
  AND e.event = 'open'
GROUP BY 1,2,3,4
ORDER BY 1,2,3,4 ASC;

Example DataVault Query Result

country app_version_original app_version app_subversion tracked_installs d7_users d7_rr
US 1.0.0.1 1.0.0 1 10 2 0.2
US 1.0.0.2 1.0.0 2 20 2 0.1

results matching ""

    No results matching ""