URL parameters to event properties

URL parameters to event properties

Copies chosen query parameters from $current_url into event properties.

Configuration

OptionDescription
Query parameters
Type: string
Required: True

Comma-separated query parameter names to copy into event properties.

Property name prefix
Type: string
Required: False

Text placed before each parameter name when naming the property.

Property name suffix
Type: string
Required: False

Text placed after each parameter name when naming the property.

Ignore case
Type: boolean
Required: False

Match parameter names without regard to upper or lower case.

Always store as JSON
Type: boolean
Required: False

Store every value as a JSON array, even when a parameter appears once.

Also set as user properties
Type: boolean
Required: False

Copy each value into $set so it updates the person.

Also set as initial user properties
Type: boolean
Required: False

Copy each value into $set_once as initial_ so it is set only once per person.

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": "URL parameters to event properties",
"inputs": {
"parameters": {
"value": ""
}
},
"enabled": true,
"template_id": "template-url-parameters-to-properties"
}'