Adding URL parameters to links

Adding URL parameters to your emails’ links enables you to better track and analyze customers’ interactions with the messages you send from Customer.io. From your email settings, you can enable and set custom URL parameters. Then, once enabled, those parameters are appended to all links in your emails.

How to view your URL parameters

URL parameters are set on a per-Workspace basis. You do this in Workspace Settings > URL Parameters. By default, they’re disabled. You’ll see the following:

URL Paramters show as Disabled besides the title. There is a button to enable on the right.
URL Paramters show as Disabled besides the title. There is a button to enable on the right.

Defaults

We create four best-practice defaults for you, to let you know which Customer.io campaign and message the link is associated with:

  1. utm_source, which by default is set to customer.io
  2. utm_medium, which by default is set to {{message.type}} This would be something like email_action
  3. utm_campaign, which by default is set to {{campaign.name}}
  4. utm_content, which by default is set to {{message.name}}

These are common parameter names used for tracking in Google Analytics, with values set from Customer.io Liquid variables. You can edit or delete these, add any other UTM or custom parameters you like, or add some more liquid.

What happens when I enable?

Once you click the button to enable parameters, they’re appended to every link, across campaigns.

image.png
image.png

How do I check they’re working?

In your emails, click the Review Links button in the composer to see your URL parameters in action.

image.png
image.png

Adding and removing parameters

Edit your parameters by clicking the Edit Parameters link at the right of the table. You’ll be taken to an edit view, where you can add and remove these as you see fit:

image.png
image.png

The changes you save are applied to all emails going forward! It’s possible to disable them for a single link, however.

To guide you in your changes, here’s an example of a link URL that might be created with the following information and the above defaults:

  • Campaign name: Retention Campaign 1 [Marketing] [Internal]
  • Email name: Hello World Email

http://example.com/?utm_content=Hello+World+Email&utm_medium=email_action&utm_name=Retention+Campaign+1+%5BMarketing%5D+%5BInternal%5D&utm_source=customer.io

 Tip: If you have a really long campaign or newsletter name, you can use the Liquid truncate filter to make it shorter, like this:
{{ campaign.name | truncate: 15, "" }}
This would truncate your campaign or newsletter name in the URL to fifteen characters.

Link tracking in Customer.io is used to track general click percentages, as well as let you know which links specifically are being clicked. URL parameters are separate from that and allow you to set more custom options to track email performance and engagement.

Liquid

Can I use liquid here?

Yes! To a point. The Liquid tags available to you here are:

TagOutput
{{layout.id}}The numerical ID associated with the email layout you've used.
{{layout.name}}The name you've assigned to the email layout you've used.
{{campaign.id}}Your campaign's numerical ID. This can be found in your campaign URL. For example, the campaign ID here is 2000: https://fly2.customer.io/env/12345/v2/campaigns/2000/overview
{{campaign.name}}This tag will output the name you've given your campaign or newsletter in the Customer.io interface. For example: "Q2 Anvil Onboarding Campaign \\\\\[Coyotes]"
{{campaign.type}}This returns whether or not your campaign is behavioral (segment triggered), transactional (event triggered), or a newsletter
{{delivery_id}}A URL-compatible base64 string that identifies a specific message created for an end-user. This is generated when the message is drafted or sent but will be set to "unsent" in test messages and composer previews.
{{message.id}}The numerical ID associated with a message action in the workflow— i.e. an SMS action might have a {{message.id}} of 200 while every SMS it generates will have a different {{delivery_id}}.
{{message.name}}The name you give your message in the workflow. E.g. "Welcome to ACME!"
{{message.type}}This refers to a particular message's type. Possible values are: email_action, twilio_action, slack_action, webhook_action, attribute_update_action
{{customer.id}}Whatever you're using to uniquely identify your customer — usually numeric*.

 Note: Your analytics provider (Google, for example) may prohibit you from sending personal information or have specific guidelines for tracking; make sure you’re aware of any restrictions.

Disable Params

Can I set these per-message?

Right now, you enable and set parameters globally. If you’d like to prevent URL parameters from being added to specific links within emails, you can switch to Code mode in our Rich Text editor or use the Code editor and add class="disable-url-params" to the link’s anchor element, like this:

<a href="http://mydomain.com" class="disable-url-params">CLICK HERE</a>

image.png
image.png

If you’re using our drag-and-drop editor, you can disable URL parameters on text links by highlighting the text and then clicking Edit Link. From there you can click on the Custom Attributes section and add disable-url-params to the class section.

Disable URL parameters in drag-and-drop text link
Disable URL parameters in drag-and-drop text link

You can also disable URL parameters on Buttons and Images in the drag-and-drop editor. You can do this by clicking on the content block and then scrolling the Content Properties menu down to the Attributes section. There you can add a custom class attribute and give it a value of disable-url-params.

Disable URL parameters in drag-and-drop in other content blocks
Disable URL parameters in drag-and-drop in other content blocks

 Need to disable URL parameters and link tracking on the same link?

You can add both the disable-url-params and untracked classes to the same class attribute in the drag-and-drop editor. Just be sure to leave a space between the two class names.

See Link Tracking for help disabling link tracking.

Feedback?

If you have any questions or feedback on this feature, please let us know!

Copied to clipboard!
  Contents
Is this page helpful?