User Agent Populator

User Agent Populator

Enhances events with user agent details. User Agent plugin allows you to populate events with the $browser, $browser_version for PostHog Clients that don't typically populate these properties

Configuration

OptionDescription
Can override existing browser related properties of event?
Type: string
Required: False

If the ingested event already have $browser $browser_version properties in combination with $useragent the $browser, $browser_version properties will be re-populated with the value of $useragent

Automatically read segment_userAgent property, automatically sent by Segment via analytics.js?
Type: choice
Required: False

Segment's analytics.js library automatically sends a useragent property that Posthog sees as segment_userAgent. Enabling this causes this plugin to parse that property

Using our REST API you can create this transformation like so:

Terminal
# Create a new destination
curl --location 'https://us.i.posthog.com/api/environments/:project_id/hog_functions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <POSTHOG_PERSONAL_API_KEY>' \
--data '{
"type": "transformation",
"name": "User Agent Populator",
"inputs": {},
"enabled": true,
"template_id": "plugin-user-agent-plugin"
}'