File DA-036 View as Markdown
PostHog
With PostHog on your site, every event carries da_class and the other da_* fields, and so does every identified person. Filter your insights to humans, or watch what AI agents do. Nothing to add in code.
What PostHog gets
posthog.register({ da_class, da_agent, da_score, da_bucket, da_rec, da_verified, da_behavior, da_behavior_risk, da_authorization });
posthog.setPersonProperties({ /* the same fields */ }); // only for identified visitors
register adds the fields to every later event. setPersonProperties puts them on the person, but only once the visitor is identified, by posthog.identify() or doubleagent.identify(). For an anonymous visitor it would create a person profile, which PostHog bills for. Needs analytics consent. Field values: Verdict.
Use it
- Humans only: add the filter
da_class=humanto an insight. - Leave bots out everywhere: in Settings › Project › Filter out internal and test users, add the event
property filter da_class is not bot. Entries there describe the traffic to keep, so write it as a negative. Each insight then has the filter as a switch.
- Agents: break any insight down by
da_agent, filtered toda_class=agent. For identified users, a cohort
of persons where da_class = agent works too.
- Session replays: filter recordings on the event property
da_classto watch only bots or only agents.
Check it worked
Open your site, then in PostHog go to Activity and open your latest event. Its properties should include da_class.
Next: Amplitude or How integrations work.