AptlyStar

PostHog

产品分析和功能管理

PostHog 工具将强大的产品分析、功能标志管理、实验和用户行为洞察直接集成到您的智能工作流中。专为现代团队设计,它使您能够实时捕获、分析和利用用户数据,从而帮助您构建更好的产品、了解用户参与度并提高转化率。

使用 PostHog 工具,您可以:

  • 跟踪和分析事件:使用 posthog_capture_event 和 posthog_batch_events 操作记录单个或多个用户操作、页面浏览或自定义事件以进行深入分析。
  • 探索事件数据:使用 posthog_list_events 操作检索和列出历史或实时事件以进行高级事件分析。
  • 了解用户:利用 posthog_list_persons、posthog_get_person 和 posthog_delete_person 操作管理用户档案、获取详细的用户洞察或根据需要删除用户。
  • 获取可操作的产品洞察:通过 posthog_list_insights、posthog_get_insight 和 posthog_create_insight 操作可视化用户旅程、功能使用情况和参与度。
  • 安全地管理和推出功能:使用 posthog_list_feature_flags、posthog_get_feature_flag、posthog_create_feature_flag、posthog_update_feature_flag 和 posthog_delete_feature_flag 等操作大规模切换功能并运行 A/B 或多变量测试。
  • 细分和定位受众:使用 posthog_list_cohorts、posthog_get_cohort 和 posthog_create_cohort 构建、列出或管理群组。
  • 收集直接反馈:通过 posthog_list_surveys、posthog_get_survey、posthog_create_survey 和 posthog_update_survey 设计、部署和分析调查。
  • 监控用户体验:通过 posthog_list_session_recordings 和 posthog_get_session_recording 操作访问和分析会话记录。
  • 与团队协作:组织仪表板(posthog_list_dashboards、posthog_get_dashboard),创建和注释洞察和事件,并在 PostHog 中管理项目和组织。

无论您是想实施全面的产品分析、优化用户引导流程、完善产品路线图,还是基于实际使用数据自动化决策,PostHog 工具都能通过高级分析和产品内实验为您的代理和工作流程提供支持——这一切都在一个统一的平台上完成。

在寻找具有隐私保护、可扩展性和灵活部署选项的真正产品分析工具吗?PostHog 已被全球快速发展的团队和企业所信赖。

使用说明

将 PostHog 集成到您的工作流程中。跟踪事件、管理功能标志、分析用户行为、运行实验、创建调查问卷并访问会话录制。

工具

posthog_capture_event

在 PostHog 中捕获单个事件。使用此功能跟踪用户操作、页面浏览或自定义事件。

输入

参数类型必需描述
projectApiKeystring是PostHog 项目 API 密钥 (用于事件摄取的公共令牌)
regionstring否PostHog 区域:us (默认) 或 eu
eventstring是要捕获的事件名称 (例如,"page_view","button_clicked")
distinctIdstring是用户或设备的唯一标识符。可以是用户 ID、设备 ID 或匿名 ID
propertiesstring否事件属性的 JSON 字符串 (例如,{"button_name": "signup", "page": "homepage"})
timestampstring否事件发生时的 ISO 8601 时间戳。如果未提供,则使用当前时间

输出

参数类型描述
statusstring指示事件是否成功捕获的状态消息

posthog_batch_events

在 PostHog 中一次捕获多个事件。使用此功能进行批量事件摄取以提高性能。

输入

参数类型必需描述
projectApiKeystring是PostHog 项目 API 密钥(用于事件摄取的公共令牌)
regionstring否PostHog 区域:us(默认)或 eu
batchstring是要捕获的事件的 JSON 数组。每个事件应包含:event、distinct_id,以及可选的 properties 和 timestamp。例如:[{"event": "page_view", "distinct_id": "user123", "properties": {"page": "/"}}]

输出

参数类型描述
statusstring状态消息,指示批量是否成功捕获
eventsProcessednumber批处理中处理的事件数量

posthog_list_events

列出 PostHog 中的事件。注意:此端点已被弃用,但为了向后兼容仍然保留。对于生产环境,建议使用带有 HogQL 的查询端点。

输入

参数类型必需描述
personalApiKeystring是PostHog 个人 API 密钥(用于认证的 API 访问)
regionstring否PostHog 区域:us(默认)或 eu
projectIdstring是PostHog 项目 ID
limitnumber否要返回的事件数量(默认:100,最大:100)
offsetnumber否分页时要跳过的事件数量
eventstring否按特定事件名称过滤
distinctIdstring否按特定 distinct_id 过滤
beforestring否ISO 8601 时间戳 - 仅返回此时间之前的事件
afterstring否ISO 8601 时间戳 - 仅返回此时间之后的事件

输出

参数类型描述
events数组包含其属性和元数据的事件列表

posthog_list_persons

列出 PostHog 中的人员(用户)。返回包含其属性和唯一 ID 的用户档案。

输入

参数类型必需描述
personalApiKey字符串是PostHog 个人 API 密钥(用于认证的 API 访问)
region字符串否PostHog 区域:us(默认)或 eu
projectId字符串是PostHog 项目 ID
limit数字否返回的人员数量(默认:100,最大:100)
offset数字否分页时跳过的人员数量
search字符串否通过电子邮件、姓名或唯一 ID 搜索人员
distinctId字符串否按特定的唯一 ID 过滤

输出

参数类型描述
persons数组包含其属性和标识符的人员列表

posthog_get_person

通过 ID 或 UUID 获取 PostHog 中特定人员的详细信息。

输入

参数类型必需描述
personalApiKey字符串是PostHog 个人 API 密钥(用于认证的 API 访问)
region字符串否PostHog 区域:us(默认)或 eu
projectId字符串是PostHog 项目 ID
personId字符串是要检索的人员 ID 或 UUID

输出

参数类型描述
personobject包含属性和标识符的人员详细信息

posthog_delete_person

从 PostHog 中删除一个人员。这将移除所有相关的事件和数据。请谨慎使用。

输入

参数类型必需描述
personalApiKeystring是PostHog 个人 API 密钥(用于认证的 API 访问)
regionstring否PostHog 区域:us(默认)或 eu
projectIdstring是PostHog 项目 ID
personIdstring是要删除的人员 ID 或 UUID

输出

参数类型描述
statusstring状态消息,指示人员是否成功删除

posthog_query

在 PostHog 中执行 HogQL 查询。HogQL 是 PostHog

输入

参数类型必需描述
personalApiKeystring是PostHog 个人 API 密钥(用于认证的 API 访问)
regionstring否PostHog 区域:us(默认)或 eu
projectIdstring是PostHog 项目 ID
querystring是要执行的 HogQL 查询。例如:{"kind": "HogQLQuery", "query": "SELECT event, count() FROM events WHERE timestamp > now() - INTERVAL 1 DAY GROUP BY event"}
Examplestring否无描述
valuesstring否参数化查询的可选 JSON 字符串参数值。例如:{"user_id": "123"}
Examplestring否无描述

输出

参数类型描述
resultsarray查询结果作为行数组

posthog_list_insights

列出 PostHog 项目中的所有洞察。返回洞察配置、过滤器和元数据。

输入

参数类型必需描述
apiKeystring是PostHog 个人 API 密钥
projectIdstring是PostHog 项目 ID
regionstring否PostHog 云区域:"us" 或 "eu" (默认值:"us")
limitnumber否每页返回的结果数量(默认值:100)
offsetnumber否分页时跳过的结果数量

输出

参数类型描述
countnumber项目中洞察的总数
nextstring下一页结果的 URL
previousstring上一页结果的 URL
resultsarray包含其配置和元数据的洞察列表

posthog_get_insight

通过 ID 从 PostHog 获取特定洞察。返回详细的洞察配置、过滤器和元数据。

输入

参数类型必需描述
apiKeystring是PostHog 个人 API 密钥
projectIdstring是PostHog 项目 ID
insightIdstring是要检索的洞察 ID
regionstring否PostHog 云区域:"us" 或 "eu" (默认值:"us")

输出

参数类型描述
idnumber洞察的唯一标识符
namestring洞察的名称
descriptionstring洞察的描述
filtersobject洞察的过滤器配置
queryobject洞察的查询配置
created_atstring洞察创建时的 ISO 时间戳
created_byobject创建洞察的用户
last_modified_atstring洞察最后修改时的 ISO 时间戳
last_modified_byobject最后修改洞察的用户
savedboolean洞察是否已保存
dashboardsarray此洞察出现在的仪表板 ID
tagsarray与洞察相关的标签
favoritedboolean洞察是否被标记为收藏

posthog_create_insight

在 PostHog 中创建一个新的洞察。需要提供洞察名称和配置过滤器或查询。

输入

参数类型是否必需描述
apiKeystring是PostHog 个人 API 密钥
projectIdstring是PostHog 项目 ID
regionstring否PostHog 云区域:"us" 或 "eu" (默认:"us")
namestring否洞察的名称 (可选 - 如果未提供,PostHog 将生成一个派生名称)
descriptionstring否洞察的描述
filtersstring否洞察的过滤器配置的 JSON 字符串
querystring否洞察的查询配置的 JSON 字符串
dashboardsstring否要将此洞察添加到的仪表板 ID 的逗号分隔列表
tagsstring否洞察的标签的逗号分隔列表

输出

参数类型描述
idnumber创建的洞察的唯一标识符
namestring洞察的名称
descriptionstring洞察的描述
filtersobject洞察的过滤器配置
queryobject洞察的查询配置
created_atstring洞察创建时的 ISO 时间戳
created_byobject创建洞察的用户
last_modified_atstring洞察最后修改时的 ISO 时间戳
savedboolean洞察是否已保存
dashboardsarray此洞察显示的仪表板 ID 列表
tagsarray与洞察相关的标签

posthog_list_dashboards

列出 PostHog 项目中的所有仪表板。返回仪表板配置、图块和元数据。

输入

参数类型必需描述
apiKeystring是PostHog 个人 API 密钥
projectIdstring是PostHog 项目 ID
regionstring否PostHog 云区域:"us" 或 "eu" (默认值:"us")
limitnumber否每页返回的结果数量 (默认值:100)
offsetnumber否分页时跳过的结果数量

输出

参数类型描述
countnumber项目中仪表板的总数
nextstring下一页结果的 URL
previousstring上一页结果的 URL
resultsarray包含其配置和元数据的仪表板列表

posthog_get_dashboard

通过 ID 从 PostHog 获取特定仪表板。返回详细的仪表板配置、组件和元数据。

输入

参数类型必需描述
apiKeystring是PostHog 个人 API 密钥
projectIdstring是PostHog 项目 ID
dashboardIdstring是要检索的仪表板 ID
regionstring否PostHog 云区域:"us" 或 "eu" (默认值:"us")

输出

参数类型描述
idnumber仪表板的唯一标识符
namestring仪表板名称
descriptionstring仪表板描述
pinnedboolean仪表板是否已固定
created_atstring仪表板创建时的 ISO 时间戳
created_byobject创建仪表板的用户
last_modified_atstring仪表板最后修改时的 ISO 时间戳
last_modified_byobject最后修改仪表板的用户
tilesarray仪表板上的组件/小部件及其配置
filtersobject应用于仪表板的全局过滤器
tagsarray与仪表板关联的标签
restriction_levelnumber仪表板的访问限制级别

posthog_list_actions

列出 PostHog 项目中的所有操作。返回操作定义、步骤和元数据。

输入

参数类型必需描述
apiKeystring是PostHog 个人 API 密钥
projectIdstring是PostHog 项目 ID
regionstring否PostHog 云区域:"us" 或 "eu" (默认值:"us")
limitnumber否每页返回的结果数量 (默认值:100)
offsetnumber否分页时跳过的结果数量

输出

参数类型描述
countnumber项目中的操作总数
nextstring下一页结果的 URL
previousstring上一页结果的 URL
resultsarray包含其定义和元数据的操作列表

posthog_list_cohorts

列出 PostHog 项目中的所有群组。返回群组定义、过滤器和用户计数。

输入

参数类型必需描述
apiKeystring是PostHog 个人 API 密钥
projectIdstring是PostHog 项目 ID
regionstring否PostHog 云区域:"us" 或 "eu" (默认值:"us")
limitnumber否每页返回的结果数量 (默认值:100)
offsetnumber否分页时跳过的结果数量

输出

参数类型描述
countnumber项目中群组的总数
nextstring下一页结果的 URL
previousstring上一页结果的 URL
resultsarray包含定义和元数据的群组列表

posthog_get_cohort

通过 ID 从 PostHog 获取特定群组。返回详细的群组定义、筛选器和用户数量。

输入

参数类型必需描述
apiKeystring是PostHog 个人 API 密钥
projectIdstring是PostHog 项目 ID
cohortIdstring是要检索的群组 ID
regionstring否PostHog 云区域:"us" 或 "eu" (默认:"us")

输出

参数类型描述
idnumber群组的唯一标识符
namestring群组名称
descriptionstring群组描述
groupsarray定义群组的组
deletedboolean群组是否已被删除
filtersobject群组的筛选器配置
queryobject群组的查询配置
created_atstring群组创建时的 ISO 时间戳
created_byobject创建群组的用户
is_calculatingboolean群组是否正在计算中
last_calculationstring上次计算的 ISO 时间戳
errors_calculatingnumber计算过程中发生的错误数量
countnumber群组中的用户数量
is_staticboolean群组是否为静态群组
versionnumber群组的版本号

posthog_create_cohort

在 PostHog 中创建一个新的群组。需要提供群组名称以及过滤器或查询配置。

输入

参数类型必需描述
apiKeystring是PostHog 个人 API 密钥
projectIdstring是PostHog 项目 ID
regionstring否PostHog 云区域:"us" 或 "eu" (默认值:"us")
namestring否群组名称 (可选 - 如果未提供,PostHog 将使用 "未命名群组")
descriptionstring否群组描述
filtersstring否群组过滤器配置的 JSON 字符串
querystring否群组查询配置的 JSON 字符串
is_staticboolean否群组是否为静态 (默认值:false)
groupsstring否定义群组的组的 JSON 字符串

输出

参数类型描述
idnumber创建的群组的唯一标识符
namestring群组名称
descriptionstring群组描述
groupsarray定义群组的组
deletedboolean群组是否已被删除
filtersobject群组的过滤器配置
queryobject群组的查询配置
created_atstring群组创建时的 ISO 时间戳
created_byobject创建群组的用户
is_calculatingboolean群组是否正在计算中
countnumber群组中的用户数量
is_staticboolean群组是否为静态
versionnumber群组的版本号

posthog_list_annotations

列出 PostHog 项目中的所有注释。返回注释内容、时间戳和相关的洞察。

输入

参数类型必需描述
apiKeystring是PostHog 个人 API 密钥
projectIdstring是PostHog 项目 ID
regionstring否PostHog 云区域:"us" 或 "eu" (默认值:"us")
limitnumber否每页返回的结果数量(默认值:100)
offsetnumber否分页时跳过的结果数量

输出

参数类型描述
countnumber项目中注释的总数
nextstring下一页结果的 URL
previousstring上一页结果的 URL
resultsarray包含注释内容和元数据的注释列表

posthog_create_annotation

在 PostHog 中创建一个新注释。在图表上用日期和描述标记重要事件。

输入

参数类型必需描述
apiKeystring是PostHog 个人 API 密钥
projectIdstring是PostHog 项目 ID
regionstring否PostHog 云区域:"us" 或 "eu" (默认值:"us")
contentstring是注释的内容/文本
date_markerstring是标记注释适用时间的 ISO 时间戳(例如:"2024-01-15T10:00:00Z")
scopestring否注释的范围:"project" 或 "dashboard_item" (默认值:"project")
dashboard_itemstring否要将此注释附加到的仪表板项的 ID
insight_short_idstring否要将此注释附加到的洞察的短 ID

输出

参数类型描述
idnumber创建的注释的唯一标识符
contentstring注释的内容/文本
date_markerstring注释适用时的 ISO 时间戳
created_atstring注释创建时的 ISO 时间戳
updated_atstring注释最后更新时的 ISO 时间戳
created_byobject创建注释的用户
dashboard_itemnumber此注释附加到的仪表板项的 ID
insight_short_idstring此注释附加到的洞察的短 ID
insight_namestring此注释附加到的洞察的名称
scopestring注释的范围 (项目或仪表板项)
deletedboolean注释是否被删除

posthog_list_feature_flags

列出 PostHog 项目中的所有功能标志

输入

参数类型必需描述
projectIdstring是PostHog 项目 ID
regionstring是PostHog 云区域:us 或 eu
apiKeystring是PostHog 个人 API 密钥
limitnumber否要返回的结果数量
offsetnumber否要跳过的结果数量

输出

参数类型描述
resultsarray功能标志列表

posthog_get_feature_flag

获取特定功能标志的详细信息

输入

参数类型必需描述
projectIdstring是PostHog 项目 ID
flagIdstring是功能标志 ID
regionstring是PostHog 云区域:us 或 eu
apiKeystring是PostHog 个人 API 密钥

输出

参数类型描述
flagobject功能标志详细信息

posthog_create_feature_flag

在 PostHog 中创建一个新的功能标志

输入

参数类型必需描述
projectIdstring是PostHog 项目 ID
regionstring是PostHog 云区域:us 或 eu
apiKeystring是PostHog 个人 API 密钥
namestring否功能标志名称(可选 - 可以为空)
keystring是功能标志键(唯一标识符)
filtersstring否功能标志过滤器(JSON 字符串)
activeboolean否标志是否激活(默认:true)
ensureExperienceContinuityboolean否是否确保体验连续性(默认:false)
rolloutPercentagenumber否发布百分比(0-100)

输出

参数类型描述
flagobject创建的功能标志

posthog_update_feature_flag

更新 PostHog 中现有的功能标志

输入

参数类型必需描述
projectIdstring是PostHog 项目 ID
flagIdstring是功能标志 ID
regionstring是PostHog 云区域:us 或 eu
apiKeystring是PostHog 个人 API 密钥
namestring否功能标志名称
keystring否功能标志键(唯一标识符)
filtersstring否功能标志过滤器(JSON 字符串)
activeboolean否标志是否激活
ensureExperienceContinuityboolean否是否确保体验连续性
rolloutPercentagenumber否发布百分比(0-100)

输出

参数类型描述
flagobject更新的功能标志

posthog_delete_feature_flag

从 PostHog 中删除功能标志

输入

参数类型必需描述
projectIdstring是PostHog 项目 ID
flagIdstring是要删除的功能标志 ID
regionstring是PostHog 云区域:us 或 eu
apiKeystring是PostHog 个人 API 密钥

输出

参数类型描述
successboolean是否删除成功
messagestring确认消息

posthog_evaluate_flags

为特定用户或群组评估功能标志。这是一个使用项目 API 密钥的公共端点。

输入

参数类型必需描述
regionstring是PostHog 云区域:us 或 eu
projectApiKeystring是PostHog 项目 API 密钥(不是个人 API 密钥)
distinctIdstring是要评估标志的用户的唯一 ID
groupsstring否以 JSON 字符串形式表示的群组(例如,{"company": "company_id_in_your_db"})
personPropertiesstring否以 JSON 字符串形式表示的人员属性
groupPropertiesstring否以 JSON 字符串形式表示的群组属性

输出

参数类型描述
featureFlagsobject功能标志评估(键值对,其中值为布尔值或字符串变体)
featureFlagPayloadsobject附加到功能标志的额外负载
errorsWhileComputingFlagsboolean计算标志时是否存在错误

posthog_list_experiments

列出 PostHog 项目中的所有实验

输入

参数类型必需描述
projectIdstring是PostHog 项目 ID
regionstring是PostHog 云区域:us 或 eu
apiKeystring是PostHog 个人 API 密钥
limitnumber否要返回的结果数量
offsetnumber否要跳过的结果数量

输出

参数类型描述
resultsarray实验列表

posthog_get_experiment

获取特定实验的详细信息

输入

参数类型必需描述
projectIdstring是PostHog 项目 ID
experimentIdstring是实验 ID
regionstring是PostHog 云区域:us 或 eu
apiKeystring是PostHog 个人 API 密钥

输出

参数类型描述
experimentobject实验详情

posthog_create_experiment

在 PostHog 中创建一个新实验

输入

参数类型必需描述
projectIdstring是PostHog 项目 ID
regionstring是PostHog 云区域:us 或 eu
apiKeystring是PostHog 个人 API 密钥
namestring否实验名称(可选)
descriptionstring否实验描述
featureFlagKeystring是用于实验的功能标志键
parametersstring否实验参数(JSON 字符串)
filtersstring否实验过滤器(JSON 字符串)
variantsstring否实验变体(JSON 字符串)
startDatestring否实验开始日期(ISO 格式)
endDatestring否实验结束日期(ISO 格式)

输出

参数类型描述
experimentobject创建的实验

posthog_list_surveys

列出 PostHog 项目中的所有调查。调查允许您收集用户的反馈。

输入

参数类型必需描述
apiKeystring是PostHog 个人 API 密钥
projectIdstring是PostHog 项目 ID
regionstring否PostHog 云区域:us 或 eu (默认:us)
limitnumber否返回结果数量 (默认:100)
offsetnumber否分页时跳过的结果数量

输出

参数类型描述
surveysarray项目中的调查列表

posthog_get_survey

通过 ID 获取 PostHog 中特定调查的详细信息。

输入

参数类型必需描述
apiKeystring是PostHog 个人 API 密钥
projectIdstring是PostHog 项目 ID
surveyIdstring是要检索的调查 ID
regionstring否PostHog 云区域:us 或 eu (默认:us)

输出

参数类型描述
surveyobject调查详情

posthog_create_survey

在 PostHog 中创建一个新调查。支持的问题类型包括:基础(开放式)、链接、评分和多选。

输入

参数类型必需描述
apiKeystring是PostHog 个人 API 密钥
projectIdstring是PostHog 项目 ID
regionstring否PostHog 云区域:us 或 eu (默认:us)
namestring否调查名称(可选)
descriptionstring否调查描述
typestring否调查类型:popover(应用内)或 api(自定义实现)(默认:popover)
questionsstring是调查问题数组的 JSON 字符串。每个问题必须包含类型(open/link/rating/multiple_choice)和问题文本。评分问题可以包含 scale(1-10)、lowerBoundLabel、upperBoundLabel。多选问题需要 choices 数组。链接问题可以包含 buttonText。
startDatestring否ISO 8601 格式的调查开始日期
endDatestring否ISO 8601 格式的调查结束日期
appearancestring否外观配置的 JSON 字符串(颜色、位置等)
conditionsstring否显示条件的 JSON 字符串(URL 匹配等)
targetingFlagFiltersstring否用于定位的功能标志过滤器的 JSON 字符串
linkedFlagIdstring否要链接到此调查的功能标志 ID
responsesLimitnumber否要收集的最大响应数

输出

参数类型描述
surveyobject创建的调查详情

posthog_update_survey

更新 PostHog 中的现有调查。可以修改问题、外观、条件和其他设置。

输入

参数类型是否必需描述
apiKeystring是PostHog 个人 API 密钥
projectIdstring是PostHog 项目 ID
surveyIdstring是要更新的调查 ID
regionstring否PostHog 云区域:us 或 eu (默认:us)
namestring否调查名称
descriptionstring否调查描述
typestring否调查类型:popover 或 api
questionsstring否调查问题数组的 JSON 字符串。每个问题必须包含类型 (open/link/rating/multiple_choice) 和问题文本。
startDatestring否ISO 8601 格式的调查开始日期
endDatestring否ISO 8601 格式的调查结束日期
appearancestring否外观配置的 JSON 字符串 (颜色、位置等)
conditionsstring否显示条件的 JSON 字符串 (URL 匹配等)
targetingFlagFiltersstring否用于定位的功能标志过滤器的 JSON 字符串
linkedFlagIdstring否要链接到此调查的功能标志 ID
responsesLimitnumber否要收集的最大响应数
archivedboolean否归档或取消归档调查

输出

参数类型描述
surveyobject更新的调查详情

posthog_list_session_recordings

列出 PostHog 项目中的会话录制。会话录制捕获用户与您的应用程序的交互。

输入

参数类型必需描述
apiKeystring是PostHog 个人 API 密钥
projectIdstring是PostHog 项目 ID
regionstring否PostHog 云区域:us 或 eu (默认:us)
limitnumber否返回结果数量 (默认:50)
offsetnumber否分页时跳过的结果数量

输出

参数类型描述
recordingsarray会话录制列表

posthog_get_session_recording

通过 ID 获取 PostHog 中特定会话录制的详细信息。

输入

参数类型必需描述
apiKeystring是PostHog 个人 API 密钥
projectIdstring是PostHog 项目 ID
recordingIdstring是要检索的会话录制 ID
regionstring否PostHog 云区域:us 或 eu (默认:us)

输出

参数类型描述
recordingobject会话录制详情

posthog_list_recording_playlists

列出 PostHog 项目中的会话录制播放列表。播放列表允许您组织和策划会话录制。

输入

参数类型必需描述
apiKeystring是PostHog 个人 API 密钥
projectIdstring是PostHog 项目 ID
regionstring否PostHog 云区域:us 或 eu (默认:us)
limitnumber否返回结果数量 (默认:100)
offsetnumber否分页时跳过的结果数量

输出

参数类型描述
playlistsarray会话录制播放列表

posthog_list_event_definitions

列出 PostHog 项目中的所有事件定义。事件定义表示带有描述、标签和使用统计信息等元数据的跟踪事件。

输入

参数类型必需描述
projectIdstring是PostHog 项目 ID
regionstring是PostHog 云区域:us 或 eu
apiKeystring是PostHog 个人 API 密钥
limitnumber否每页返回的结果数量 (默认:100)
offsetnumber否返回结果的起始索引
searchstring否按名称筛选事件定义的搜索词

输出

参数类型描述
countnumber事件定义的总数
nextstring下一页结果的 URL
previousstring上一页结果的 URL
resultsarray事件定义列表

posthog_get_event_definition

获取 PostHog 中特定事件定义的详细信息。返回关于该事件的全面信息,包括元数据、使用统计和验证状态。

输入

参数类型必需描述
projectIdstring是PostHog 项目 ID
eventDefinitionIdstring是要检索的事件定义 ID
regionstring是PostHog 云区域:us 或 eu
apiKeystring是PostHog 个人 API 密钥

输出

参数类型描述
idstring事件定义的唯一标识符
namestring事件名称
descriptionstring事件描述
tagsarray与事件关联的标签
volume_30_daynumber最近 30 天内接收到的事件数量
query_usage_30_daynumber最近 30 天内查询此事件的次数
created_atstring事件创建时的 ISO 时间戳
last_seen_atstring事件最后一次被看到时的 ISO 时间戳
updated_atstring事件更新时的 ISO 时间戳
updated_byobject最后更新事件的用户
verifiedboolean事件是否已被验证
verified_atstring事件被验证时的 ISO 时间戳
verified_bystring验证事件的用户

posthog_update_event_definition

更新 PostHog 中的事件定义。可以修改描述、标签和验证状态,以保持事件模式的清晰。

输入

参数类型必需描述
projectIdstring是PostHog 项目 ID
eventDefinitionIdstring是要更新的事件定义 ID
regionstring是PostHog 云区域:us 或 eu
apiKeystring是PostHog 个人 API 密钥
descriptionstring否事件的更新描述
tagsstring否与事件关联的逗号分隔标签列表
verifiedboolean否是否将事件标记为已验证

输出

参数类型描述
idstring事件定义的唯一标识符
namestring事件名称
descriptionstring更新后的事件描述
tagsarray更新后的与事件关联的标签
volume_30_daynumber最近 30 天内接收到的事件数量
query_usage_30_daynumber最近 30 天内查询此事件的次数
created_atstring事件创建时的 ISO 时间戳
last_seen_atstring事件最后一次被看到时的 ISO 时间戳
updated_atstring事件更新时的 ISO 时间戳
updated_byobject最后更新事件的用户
verifiedboolean事件是否已验证
verified_atstring事件验证时的 ISO 时间戳
verified_bystring验证事件的用户

posthog_list_property_definitions

列出 PostHog 项目中的所有属性定义。属性定义表示带有元数据(如描述、标签、类型和使用统计信息)的跟踪属性。

输入

参数类型必需描述
projectIdstring是PostHog 项目 ID
regionstring是PostHog 云区域:us 或 eu
apiKeystring是PostHog 个人 API 密钥
limitnumber否每页返回的结果数量 (默认值:100)
offsetnumber否返回结果的初始索引
searchstring否按名称筛选属性定义的搜索词
typestring否按属性类型筛选:event、person 或 group

输出

参数类型描述
countnumber属性定义的总数
nextstring下一页结果的 URL
previousstring上一页结果的 URL
resultsarray属性定义列表

posthog_get_property_definition

获取 PostHog 中特定属性定义的详细信息。返回有关该属性的全面信息,包括元数据、类型、使用统计信息和验证状态。

输入

参数类型必需描述
projectIdstring是PostHog 项目 ID
propertyDefinitionIdstring是要检索的属性定义 ID
regionstring是PostHog 云区域:us 或 eu
apiKeystring是PostHog 个人 API 密钥

输出

参数类型描述
idstring属性定义的唯一标识符
namestring属性名称
descriptionstring属性描述
tagsarray与属性关联的标签
is_numericalboolean属性是否为数值型
is_seen_on_filtered_eventsboolean属性是否出现在筛选事件中
property_typestring属性的数据类型
typestring属性类型:事件、人员或组
volume_30_daynumber属性在过去 30 天内被查看的次数
query_usage_30_daynumber属性在过去 30 天内被查询的次数
created_atstring属性创建时的 ISO 时间戳
updated_atstring属性更新时的 ISO 时间戳
updated_byobject最后更新属性的用户
verifiedboolean属性是否已验证
verified_atstring属性验证时的 ISO 时间戳
verified_bystring验证属性的用户
examplestring属性的示例值

posthog_update_property_definition

更新 PostHog 中的属性定义。可以修改描述、标签、属性类型和验证状态,以保持属性架构的整洁。

输入

参数类型必需描述
projectIdstring是PostHog 项目 ID
propertyDefinitionIdstring是要更新的属性定义 ID
regionstring是PostHog 云区域:us 或 eu
apiKeystring是PostHog 个人 API 密钥
descriptionstring否属性的更新描述
tagsstring否要与属性关联的逗号分隔标签列表
verifiedboolean否是否将属性标记为已验证
property_typestring否属性的数据类型(例如:String、Numeric、Boolean、DateTime 等)

输出

参数类型描述
idstring属性定义的唯一标识符
namestring属性名称
descriptionstring更新后的属性描述
tagsarray与属性关联的更新标签
is_numericalboolean属性是否为数值型
is_seen_on_filtered_eventsboolean属性是否出现在过滤的事件中
property_typestring属性的数据类型
typestring属性类型:事件、人员或组
volume_30_daynumber属性在过去 30 天内被看到的次数
query_usage_30_daynumber属性在过去 30 天内被查询的次数
created_atstring属性创建时的 ISO 时间戳
updated_atstring属性更新时的 ISO 时间戳
updated_byobject最后更新属性的用户
verifiedboolean属性是否已被验证
verified_atstring属性验证时的 ISO 时间戳
verified_bystring验证属性的用户
examplestring属性的示例值

posthog_list_projects

列出组织中的所有项目。返回包括 ID、名称、API 令牌和设置在内的项目详细信息。可用于获取其他端点所需的项目 ID。

输入

参数类型必需描述
apiKeystring是PostHog 个人 API 密钥
regionstring否云区域:us 或 eu (默认:us)

输出

参数类型描述
projectsarray包含其配置和设置的项目列表

posthog_get_project

通过 ID 获取特定项目的详细信息。返回全面的项目配置、设置和功能标志。

输入

参数类型必需描述
projectIdstring是项目 ID (数字 ID 或 UUID)
apiKeystring是PostHog 个人 API 密钥
regionstring否云区域:us 或 eu (默认:us)

输出

参数类型描述
projectobject包含所有配置设置的详细项目信息

posthog_list_organizations

列出用户有权限访问的所有组织。返回组织详细信息,包括名称、slug、成员级别和可用的产品功能。

输入

参数类型必需描述
apiKeystring是PostHog 个人 API 密钥
regionstring否云区域:us 或 eu (默认:us)

输出

参数类型描述
organizations数组包含其设置和功能的组织列表

On this page

使用说明
工具
posthog_capture_event
输入
输出
posthog_batch_events
输入
输出
posthog_list_events
输入
输出
posthog_list_persons
输入
输出
posthog_get_person
输入
输出
posthog_delete_person
输入
输出
posthog_query
输入
输出
posthog_list_insights
输入
输出
posthog_get_insight
输入
输出
posthog_create_insight
输入
输出
posthog_list_dashboards
输入
输出
posthog_get_dashboard
输入
输出
posthog_list_actions
输入
输出
posthog_list_cohorts
输入
输出
posthog_get_cohort
输入
输出
posthog_create_cohort
输入
输出
posthog_list_annotations
输入
输出
posthog_create_annotation
输入
输出
posthog_list_feature_flags
输入
输出
posthog_get_feature_flag
输入
输出
posthog_create_feature_flag
输入
输出
posthog_update_feature_flag
输入
输出
posthog_delete_feature_flag
输入
输出
posthog_evaluate_flags
输入
输出
posthog_list_experiments
输入
输出
posthog_get_experiment
输入
输出
posthog_create_experiment
输入
输出
posthog_list_surveys
输入
输出
posthog_get_survey
输入
输出
posthog_create_survey
输入
输出
posthog_update_survey
输入
输出
posthog_list_session_recordings
输入
输出
posthog_get_session_recording
输入
输出
posthog_list_recording_playlists
输入
输出
posthog_list_event_definitions
输入
输出
posthog_get_event_definition
输入
输出
posthog_update_event_definition
输入
输出
posthog_list_property_definitions
输入
输出
posthog_get_property_definition
输入
输出
posthog_update_property_definition
输入
输出
posthog_list_projects
输入
输出
posthog_get_project
输入
输出
posthog_list_organizations
输入
输出