本文介绍了应该使用平均的Firebase活动用户指标(DAU,WAU,MAU)吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图了解在当前的Firebase活动"用户指标报告中逐月报告(下面的视图图),还是自我计算并报告平均值是更好的选择>在特定时期内这些指标的每个值.

I am trying to understand whether it is better to report month-over-month on the current Firebase "Active" User metrics report (view graph below), or rather self-calculate and report the average of each of these metrics's values over a specific period.

乍一看,仪表板向您显示了2018年12月的1天,7天和28天活动用户,但实际上仅显示所选日期范围值的最后一天(在右边).很高兴知道这一点,但在我的月度分析中仅比较最后日期的值会产生误导.另一种方法是在选定期间内自行计算平均值:

At first-glance the dashboard shows you 1-day, 7-day, and 28-day active users for the month of December 2018, but it is in fact only the last day of the selected date range's values that is shown (on the right). This is great to know, but a bit misleading to compare only the last date's values for my month-over-month analysis. An alternative approach could be to self-calculate the average over the selected period:

应用于Firebase演示数据集,我得到以下数字:

Applied to the Firebase Demo data set, I got the numbers below:

Firebase仪表板:

  • 28天活跃用户:8661
  • 7天活跃用户:3874
  • 1天活跃用户:1111

我的计算平均值:

  • 28天活跃用户:8762
  • 7天活跃用户:3663
  • 1天活跃用户:1112

这里的差异很小,但是我发现我们的应用程序存在一些显着差异,该应用程序每月有数百万的活跃用户.

The delta difference is small here, but I am seeing some significant differences on our application which has millions of active users per month.

问题:

  • 如果您当前正在使用Firebase,如何报告?
  • 您要复制并粘贴所选时间段的最后一天,然后报告一个月的时间,还是对1/7/28天指标中的每一个求平均值,以更好地表示该月? li>
  • 如果对指标进行平均,能否解释一下原因?

推荐答案

要回答我自己的问题,我想先回顾一下定义,然后遍历计算.

To answer my own question I would like to first revisit the definitions, and then run over the calculations.

基于支持的 Firebase文档,我总结了定义对于以下每个指标.声明在每个指标(给定的日期范围)内仅对唯一身份用户计数是非常重要的.

Based on the supporting Firebase documents, I summarized the definitions for each of the metrics below. It is very important to state that only the unique users should be counted over each of the metrics (given selected date range).

  • 1天活跃用户:1天 活跃用户已与设备前景中的应用互动并且在最近1天的时间段内(给定的日期范围)记录了user_engagement事件.
  • 7天活跃用户:7天 活跃用户已与设备前台中的应用互动,并且在最近7天(给定的日期范围)内记录了user_engagement事件.
  • 28天活跃用户::一个28天 活跃用户已与设备前台中的应用互动,并且在过去28天(给定的日期范围)内记录了user_engagement事件.
  • 1-day active users: A 1-day unique active user has engaged with an app in the device foreground AND has logged a user_engagement event within the last 1-day period (given selected date range).
  • 7-day active users: A 7-day unique active user has engaged with an app in the device foreground AND has logged a user_engagement event within the last 7-day period (given selected date range).
  • 28-day active users: A 28-day unique active user has engaged with an app in the device foreground AND has logged a user_engagement event within the last 28-day period (given selected date range).

在下面的单元格中,您可以查看如何计算12月的指标:

In the cells below you can see how the metrics are calculated for December:

计算每个指标/受众群体的方法:

  • 通过使用Average 1-day active user metric计算特定月份的DAU.
  • 通过使用Average 7-day active user metric计算特定月份的WAU.我是通过平均12月7日,14日,21日,28日的快照来计算得出的.
  • 使用以下方法计算特定月份的MAU:Non-averaged 28-day active user metric.不平均该指标值的主要原因是,因为我只希望获得整个月的一个快照.如果我在这里使用平均值,那么我还将考虑上个月活跃的用户.
  • Calculate DAUs for a specific month by using: Average 1-day active user metric.
  • Calculate WAUs for a specific month by using: Average 7-day active user metric. I calculated this by averaging the snapshots at 7, 14, 21, 28 December.
  • Calculate MAUs for a specific month by using: Non-averaged 28-day active user metric. The main reason for not averaging this metric's value is, because I want to have only one snapshot of the entire month. If I would have used averages here I would also account for users that were active in a previous month.

AVG 1天唯一活动用户指标(Android,2018年12月)

AVG 1-day Unique Active User Metric (Android, Dec 2018)

# StandardSQL
SELECT
  ROUND(AVG(users),0) AS users
FROM
(
  SELECT
  event_date,
  COUNT(DISTINCT user_pseudo_id) AS users
FROM `<id>.events_*`
WHERE
  event_name = 'user_engagement'
  AND _TABLE_SUFFIX BETWEEN '20181201' AND '20181231'
  AND platform = "ANDROID"
GROUP BY 1
) table

# or you could also use code below, but you will have to add in the remaining days' code to query against the entire month.

-- Set your variables here
WITH timeframe AS (SELECT DATE("2018-12-01") AS start_date, DATE("2018-12-31") AS end_date)

-- Query your variables here
SELECT ROUND(AVG(users),0) AS users
FROM
(
SELECT event_date, COUNT(DISTINCT user_pseudo_id) AS users
FROM `<id>.events_*`AS z, timeframe AS t
WHERE
  event_name = 'user_engagement'
  AND _TABLE_SUFFIX > FORMAT_DATE('%Y%m%d', DATE_ADD(t.end_date, INTERVAL - 1 DAY))
  AND _TABLE_SUFFIX <= FORMAT_DATE('%Y%m%d', DATE_ADD(t.end_date, INTERVAL 0 DAY))
  AND platform = "ANDROID"
GROUP BY 1

UNION ALL

SELECT event_date, COUNT(DISTINCT user_pseudo_id) AS users
FROM `<id>.events_*`AS z, timeframe AS t
WHERE
  event_name = 'user_engagement'
  AND _TABLE_SUFFIX > FORMAT_DATE('%Y%m%d', DATE_ADD(t.end_date, INTERVAL - 2 DAY))
  AND _TABLE_SUFFIX <= FORMAT_DATE('%Y%m%d', DATE_ADD(t.end_date, INTERVAL - 1 DAY))
  AND platform = "ANDROID"
GROUP BY 1
...
...
...
...
) avg_1_day_active_users

AVG 7天唯一活动用户指标(Android,2018年12月)

AVG 7-day Unique Active User Metric (Android, Dec 2018)

-- Set your variables here
WITH timeframe AS (SELECT DATE("2018-12-01") AS start_date, DATE("2018-12-31") AS end_date)

-- Query your variables here
SELECT ROUND(AVG(users),0) AS users
FROM
(
SELECT COUNT(DISTINCT user_pseudo_id) AS users
FROM `<id>.events_*`AS z, timeframe AS t
WHERE
  event_name = 'user_engagement'
  AND _TABLE_SUFFIX > FORMAT_DATE('%Y%m%d', DATE_ADD(t.end_date, INTERVAL - 7 DAY))
  AND _TABLE_SUFFIX <= FORMAT_DATE('%Y%m%d', DATE_ADD(t.end_date, INTERVAL 0 DAY))
  AND platform = "ANDROID"

UNION ALL

SELECT COUNT(DISTINCT user_pseudo_id) AS users
FROM `<id>.events_*`AS z, timeframe AS t
WHERE
  event_name = 'user_engagement'
  AND _TABLE_SUFFIX > FORMAT_DATE('%Y%m%d', DATE_ADD(t.end_date, INTERVAL - 14 DAY))
  AND _TABLE_SUFFIX <= FORMAT_DATE('%Y%m%d', DATE_ADD(t.end_date, INTERVAL - 7 DAY))
  AND platform = "ANDROID"

UNION ALL

SELECT COUNT(DISTINCT user_pseudo_id) AS users
FROM `<id>.events_*`AS z, timeframe AS t
WHERE
  event_name = 'user_engagement'
  AND _TABLE_SUFFIX > FORMAT_DATE('%Y%m%d', DATE_ADD(t.end_date, INTERVAL - 21 DAY))
  AND _TABLE_SUFFIX <= FORMAT_DATE('%Y%m%d', DATE_ADD(t.end_date, INTERVAL - 14 DAY))
  AND platform = "ANDROID"

UNION ALL

SELECT COUNT(DISTINCT user_pseudo_id) AS users
FROM `<id>.events_*`AS z, timeframe AS t
WHERE
  event_name = 'user_engagement'
  AND _TABLE_SUFFIX > FORMAT_DATE('%Y%m%d', DATE_ADD(t.end_date, INTERVAL - 28 DAY))
  AND _TABLE_SUFFIX <= FORMAT_DATE('%Y%m%d', DATE_ADD(t.end_date, INTERVAL - 21 DAY))
  AND platform = "ANDROID"
) avg_7_day_active_users

非平均28天唯一活动用户指标(Android,2018年12月)

Non-averaged 28-day Unique Active User Metric (Android, Dec 2018)

# StandardSQL
-- Set your variables here
WITH timeframe AS (SELECT DATE("2018-12-01") AS start_date, DATE("2018-12-31") AS end_date)

-- Query your variables here
SELECT COUNT(DISTINCT user_pseudo_id) AS users
FROM `<id>.events_*`AS z, timeframe AS t
WHERE
  event_name = 'user_engagement'
  AND _TABLE_SUFFIX > FORMAT_DATE('%Y%m%d', DATE_ADD(t.end_date, INTERVAL - 28 DAY))
  AND _TABLE_SUFFIX <= FORMAT_DATE('%Y%m%d', DATE_ADD(t.end_date, INTERVAL 0 DAY))
  AND platform = "ANDROID"

旁注:

  • 我知道有些公司仍会在30天内计算其MAU.因此,您必须进行测试,看看哪种方法最适合您的公司.
  • 我对MAU计算的唯一问题是,它还没有考虑到每个月的开始日期.也许平均一天31-28天,30-28天,29-28天,28-28天...
  • 我找到了Firebase团队的示例查询也很有用,但它们的活动指标仅解决查询执行时的活动用户数(查看下面的示例):
  • I know some companies still calculate their MAUs over a 30-day period. So you will have to test and see what works best for your company.
  • The only problem I have with the MAU-calculation, is that it does not yet take into account the starting days of each month. Perhaps one could take the average of Day31 - 28days, Day30 - 28days, Day29 - 28days, Day28 - 28days ...
  • I found the Firebase Team's sample queries also helpful, but their active metrics only addresses the active user count at time when the query is executes (view example below):
SELECT
  COUNT(DISTINCT user_id)
FROM
  /* PLEASE REPLACE WITH YOUR TABLE NAME */
  `YOUR_TABLE.events_*`
WHERE
  event_name = 'user_engagement'
  /* Pick events in the last N = 20 days */
  AND event_timestamp > UNIX_MICROS(TIMESTAMP_SUB(CURRENT_TIMESTAMP, INTERVAL 20 DAY))
  /* PLEASE REPLACE WITH YOUR DESIRED DATE RANGE */
  AND _TABLE_SUFFIX BETWEEN '20180521' AND '20240131';

这篇关于应该使用平均的Firebase活动用户指标(DAU,WAU,MAU)吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 16:04