0-CodeKit icon

0-CodeKit

A toolbox of no-code utilities

Overview

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 or parse existing UTM parameters from a given URL. This is useful for marketing, analytics, and campaign tracking scenarios where you need to generate trackable links or extract campaign data from URLs.

Practical examples:

  • Build a URL: Automatically append UTM parameters to a landing page link before sending it in an email campaign.
  • Parse UTM: Extract UTM campaign information from incoming traffic URLs for reporting or segmentation.

Properties

Name Meaning
Build or Parse UTM? Choose between:
- Build a URL
- Parse UTM From Url
Url The target URL to which UTM parameters will be added, or from which they will be parsed.
UTM Source (When building) Value for utm_source parameter (e.g., newsletter, google).
UTM Medium (When building) Value for utm_medium parameter (e.g., email, cpc).
UTM Campaign (When building) Value for utm_campaign parameter (e.g., spring_sale).
UTM Content (When building) Value for utm_content parameter (e.g., banner_ad, text_link).

Output

  • When building a URL:
    The output contains the original URL with the specified UTM parameters appended as query parameters.
  • When parsing a URL:
    The output includes the extracted UTM parameters (utm_source, utm_medium, utm_campaign, utm_content) as fields in the JSON object.

Example output when building:

{
  "url": "https://example.com/?utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale&utm_content=banner_ad"
}

Example output when parsing:

{
  "utm_source": "newsletter",
  "utm_medium": "email",
  "utm_campaign": "spring_sale",
  "utm_content": "banner_ad"
}

Dependencies

  • Requires a credential named codeKitApi to be configured in n8n.
  • No external services are required for this specific operation, but the node may use an internal or external API via the provided credentials.

Troubleshooting

  • Missing or invalid URL: If the "Url" property is empty or not a valid URL, the node may throw an error. Ensure you provide a proper URL.
  • Missing credentials: If the codeKitApi credential is not set up, the node will fail to execute.
  • Empty UTM values: If UTM fields are left blank when building a URL, those parameters may be omitted or included as empty in the resulting URL.

Common error messages:

  • "Cannot read property '...' of undefined": Likely due to missing input properties. Double-check all required fields.
  • "Invalid URL": The provided URL is malformed. Provide a valid URL string.

Links and References

Discussion