User Agent Populator

User Agent Populator

Reads the user agent from the event and sets $browser, $browser_version, $os, $device and $device_type from it.

Configuration

OptionDescription
Override existing properties
Type: boolean
Required: False

Replace $browser, $os and device properties even when the event already has them.

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": "template-user-agent"
}'