How to add UTM parameters correctly?

If your website page URL is generated through a request parameter, for example, www.example.com/?page=12345, then the UTM parameter must be added to the existing URL through the prefix &. For our example, it will look like this: www.example.com/?page=12345&utm_source=google&utm_medium=cpc&utm_campaign=new_sale

Using special characters in UTM values

Special characters such as !, @, #, $, %, &, and others may seem innocuous when included in UTM tag values, but they can lead to significant issues in your tracking systems. These characters often disrupt how URLs are processed and interpreted by analytics platforms, resulting in system errors, data discrepancies, or even complete loss of critical campaign insights.

Special characters are often reserved for specific functions in URLs. For instance:

  • The & symbol is used to separate parameters.
  • The = sign is used to assign values to parameters.
  • The % sign is used for encoding.

Including these characters within UTM values without encoding them can confuse the URL parser, causing specific parameters to be ignored or misread.

Best Practices to Avoid These Issues

  1. Stick to Alphanumeric Characters: Use only letters (a-z), numbers (0-9), and dashes (-) or underscores (_) in UTM values. These characters are universally supported and prevent errors.
  2. Encode Special Characters: If including special characters is unavoidable, use a URL encoding tool (e.g., Google's Campaign URL Builder). Encoding ensures that special characters are converted into a safe format for URL processing. For example:
    • A space becomes %20.
    • An ampersand (&) becomes %26.
  3. Test Your URLs: Before deploying campaigns, test your UTM-tagged URLs in a browser and analytics platform to confirm that they work as intended and track correctly.
  4. Establish Naming Conventions: Create and enforce standardized UTM parameters for all team members. This consistency reduces the likelihood of errors and ensures cleaner data.

 

❌ Incorrect ✅ Correct
https://www.example.com/?utm_source=email_campaign&utm_medium=email&cpc&utm_campaign=sale https://www.example.com/?utm_source=email_campaign&utm_medium=email&utm_campaign=sale
https://www.example.com/?utm_source=email_campaign&utm_medium=email&utm_campaign=15$sale https://www.example.com/?utm_source=email_campaign&utm_medium=email&utm_campaign=sale
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.