Replace the language from the URL with a custom value
Configuration
Option | Description |
---|---|
Pattern Type: string Required: True | Ininitalized with |
Match group Type: string Required: True | Used in: |
Property Type: string Required: True | Name of the event property we will store the matched value in |
Replacement pattern Type: string Required: True | Initialized with |
Replacement key Type: string Required: True | Where to store the updated path. Keep as |
Replacement value Type: string Required: True |
|
Using our REST API you can create this transformation like so:
Terminal
# Create a new destinationcurl --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": "Language URL stripper","inputs": {"pattern": {"value": ""},"matchGroup": {"value": ""},"property": {"value": ""},"replacePattern": {"value": ""},"replaceKey": {"value": ""},"replaceValue": {"value": ""}},"enabled": true,"template_id": "plugin-language-url-splitter-app"}'