gpt4 book ai didi

analytics - 使用 Keen IO 创建给定时间段内 session 长度的直方图

转载 作者:行者123 更新时间:2023-12-02 07:27:19 25 4
gpt4 key购买 nike

我们正在尝试构建给定时间段内 session 长度的直方图。目前,我们有 sess:start 和 sess:end 事件,其中包含 session ID 和用户 ID。我想知道计算这些数据的最佳方法是什么?这可以使用漏斗 API 实现吗?

最佳答案

你检查过recipes section in Keen IO's docs了吗? ?以下是 session 长度直方图配方部分的摘录,可能非常有用。

摘录

To create a histogram for session lengths, like the one shown above, you can run a count analysis on an event collection for completed sessions (e.g. session_end). Along the x-axis you’ll have segments of time lapsed in a session, and along the y-axis you’ll have the percentage of sessions that fit into a given session length cohort.

Note: this recipe incorporates the D3 histogram recipe, which is explained further in the documentation.

histogram('chart-1', {
segment_length: 60, // In seconds
data_points: 10, // i.e. There will be 10 bars on our chart
analysis_type: 'count',
query_parameters: {
event_collection: 'session_end',
timeframe: timeframe,
filters: []
}
});

更多信息

关于analytics - 使用 Keen IO 创建给定时间段内 session 长度的直方图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26619758/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com