跳到主要内容

用户与群组

事件来自人,目录由他们发送的内容构建:匿名 id 在 identify 调用命名它的那一刻成为一个人,群组以同样的方式到达,而 cohort 是按行为或状态定义的已保存人群。

At a glance

Identity
identify names an anonymous id; write-once
Traits
$-prefixed traits are reserved; the rest are yours
Groups
group(type, key) rides the same pipeline
Cohorts
Behavioural clauses are swept; state clauses are live
Auth
Project key to send, access token to read
  • $ 前缀的特征是保留的;名为 email 的自定义属性仍是自定义的。
  • 识别只写一次:一个人第一次被命名的时刻永不移动。
  • 合并是刻意的:两个 id 只在被要求时折叠为一个人,绝不靠猜测。

工作原理

Every event carries a distinct id, and the directory folds them into people: first seen, last seen, event and session counts, and the properties their identifying events carried. Identification is an event like any other, which is why an identify accepted with a 202 is accepted for processing rather than instantly visible. A cohort then names a set of these people: behavioural clauses count events over a window and are re-evaluated by a sweep that stamps when it ran; state clauses compare current attributes and are answered live. The same cohort scopes a workbench question, targets a campaign and gates a workflow trigger.

如何访问

SurfaceOperation
RESTPOST /v1/identify · POST /v1/group (project key, accepted for processing)
GraphQLpeople, person, peopleGroups, cohorts queries · mergePeople, createCohort, updateCohort, setCohortActive, deleteCohort mutations
RealtimeNone of its own: the directory updates as events are processed
MCPNone

示例

curl "https://eu.api.prodantix.com/v1/identify" \
  -H "Authorization: Bearer $PRODANTIX_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "distinct_id": "u_8f3a", "properties": { "$email": "ada@example.com", "plan": "pro" } }'

The directory is browsed on the People screen and cohorts are authored on Cohorts.