Replace the language from the URL with a custom value
Configuration
| Option | Description | 
|---|---|
PatternType: string Required: True  | Ininitalized with   | 
Match groupType: string Required: True  | Used in:   | 
PropertyType: string Required: True  | Name of the event property we will store the matched value in  | 
Replacement patternType: string Required: True  | Initialized with   | 
Replacement keyType: string Required: True  | Where to store the updated path. Keep as   | 
Replacement valueType: 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"}'
