【问题标题】:Mixpanel Data Export filtered by multiple properties按多个属性过滤的 Mixpanel 数据导出
【发布时间】:2014-05-12 22:28:03
【问题描述】:

我正在尝试使用他们 API 的 Mixpanel 数据导出功能。

正如预期的那样,api 要求您将请求的参数发送到 URL 中,然后返回一个 json 响应。

实际的请求方式基本如下:

data = api.request(['export'], {
    'event': ['event_name'],
    'from_date': from_date,
    'to_date': to_date,
    'where': 'properties["$property_name"]!=""'
    })

'where': 'properties["$Search Engine"]!=""'

以上只导出设置了搜索引擎的数据。除了这个之外,我如何包含另一个过滤规则? Mixpanel 文档似乎是该主题的免费示例。

我尝试了以下方法:

data = api.request(['export'], {
    'event': ['event_name'],
    'from_date': from_date,
    'to_date': to_date,
    'where': 'properties["$property_name"]!=""&properties["$second_property_name"]=="value"'
    })

但没有喜悦(响应是空白的)。

我们将不胜感激!

【问题讨论】:

    标签: python api rest mixpanel


    【解决方案1】:

    Mixpanel 数据导出 API 使用关键字 and / or 作为布尔运算符。

    它在文档中有点隐藏,但您可以在 Segmentation 部分找到几个示例:https://mixpanel.com/docs/api-documentation/data-export-api#segmentation-default

    所以你的例子会变成:

    'where': 'properties["$property_name"]!="" and properties["$second_property_name"]=="value"'
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-09-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多