Actions40
- AI Actions
- Business Actions
- Calculate Actions
- Code Actions
- Convert Actions
- Crypto Actions
- Generate Actions
- Operator Actions
- PDF Actions
- Storage Actions
Operator → UTM
AI-generatedOverview
This node provides UTM (Urchin Tracking Module) utilities under the "Operator" resource with the "UTM" operation. It allows users to either build a URL with appended UTM parameters for tracking marketing campaigns or parse existing UTM parameters from a given URL. This is useful in digital marketing workflows for campaign attribution, analytics, and reporting.
Common scenarios:
- Automatically generating campaign URLs with UTM tags for newsletters, ads, or social posts.
- Extracting UTM data from incoming URLs for analytics or CRM enrichment.
Practical examples:
- Building a URL like
https://example.com?utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale. - Parsing
utm_source,utm_medium, etc., from a tracked link received via webhook.
Properties
| Name | Meaning |
|---|---|
| Build or Parse UTM? | Choose between: - Build a URL: Add UTM parameters to a base URL. - Parse UTM From Url: Extract UTM parameters from a URL. |
| Url | The target URL to which UTM parameters will be added (build), or from which UTM parameters will be extracted (parse). |
| UTM Source | (Build only) Value for the utm_source parameter (e.g., newsletter, google). |
| UTM Medium | (Build only) Value for the utm_medium parameter (e.g., email, cpc). |
| UTM Campaign | (Build only) Value for the utm_campaign parameter (e.g., spring_sale). |
| UTM Content | (Build only) Value for the utm_content parameter (e.g., banner_ad, footer_link). |
Output
- When building a URL:
- The output JSON contains the resulting URL with the specified UTM parameters appended.
- When parsing a URL:
- The output JSON includes the extracted UTM parameters (
utm_source,utm_medium,utm_campaign,utm_content) as fields if present in the input URL.
- The output JSON includes the extracted UTM parameters (
Example output when building:
{
"url": "https://example.com?utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale&utm_content=banner"
}
Example output when parsing:
{
"utm_source": "newsletter",
"utm_medium": "email",
"utm_campaign": "spring_sale",
"utm_content": "banner"
}
Dependencies
- Requires a valid codeKitApi credential configured in n8n.
- No additional environment variables are needed for this operation.
Troubleshooting
Common issues:
- Missing required fields: If "Url" is not provided, the node will throw an error.
- Invalid URL format: Supplying a malformed URL may result in errors or unexpected outputs.
- Empty UTM values: If UTM fields are left blank during "Build", they will not be included in the final URL.
Error messages:
"Cannot read property '...' of undefined": Likely due to missing required input. Ensure all necessary fields are filled."Invalid URL": Check that the provided URL is correctly formatted.