使用Keen IO在给定时间段内创建会话长度的直方图 [英] Create a histogram of session length in a given time period using Keen IO

查看:92
本文介绍了使用Keen IO在给定时间段内创建会话长度的直方图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在尝试在给定时间段内建立会话长度的直方图.当前,我们有sess:start和sess:end事件,其中包含会话ID和用户ID.我想知道计算此数据的最佳方法是什么?可以使用渠道api来实现吗?

We are trying to build a histogram of session length in a given time period. Currently, we have sess:start and sess:end events which contains the session id and user id. I am wondering what's the best way to compute this data? Can this be achieve using the funnel api?

推荐答案

是否已签出 Keen IO的文档中的食谱"部分?这是有关会话长度"的直方图食谱部分的摘录,该摘录可能真的很有帮助.

Have you checkout out the recipes section in Keen IO's docs? Here is an excerpt from the section on histogram recipes for Session Length that might be really helpful.

摘录

要为会话长度创建直方图,如上图所示, 您可以对事件集合进行计数分析以完成 会话(例如session_end).沿x轴,您将有以下细分 在会话中耗费的时间,沿着y轴,您将 符合给定会话长度群组的会话百分比.

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.

注意:此配方包含D3直方图配方,即 在文档中进一步解释.

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: []
    }
});

更多信息

  • Keen IO - Analytics for Developers
  • Keen IO - Documentation
  • Code excerpt: Keen IO - Recipes for Histograms

这篇关于使用Keen IO在给定时间段内创建会话长度的直方图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆