Adding URL parameters to links
UpdatedAdding URL parameters to your links enables you to better track and analyze customers’ interactions with the messages you send from Customer.io. You can set up templated URL parameters and automatically add them to links in your emails.
How it works
While Customer.io supports link tracking, you might want to add URL parameters to links to track clicks from specific campaigns, messages, or other factors.
You can manually add URL parameters to links in messages, but this can be tedious and error-prone. You probably have a repeatable set of parameters that you want to use for links in different messages.
That’s where our URL parameters feature comes in. It makes it easy to automatically append a templated set of URL parameters to links in your messages.
- email: When you enable URL parameters, we automatically append them to all links in your emails. You don’t need to use the
cio_linkliquidA syntax that supports variables, letting you personalize messages for your audience. For example, if you want to reference a person’s first name, you might use the variable{{customer.first_name}}. tag. - SMS and WhatsApp: URL parameters aren’t automatically appended. You must use the
cio_linktag to add parameters to links in these messages. - Push and in-app: Your SDK integration handles link tracking. You can use
cio_linkif you want to add URL parameters to links in these messages.
{% cio_link url:"https://example.com" %}
Enable URL parameters
Go to Workspace Settings > URL Parameters to enable and set up URL parameters. When you enable URL parameters, they’re automatically appended to all links in your emails. For SMS and WhatsApp messages, you must use the cio_link liquid tag to add URL parameters to links.


Default parameters
Our default URL parameters are commonly used properties in analytics platforms like Google Analytics. The values help you tie clicks back to the messages and campaigns your audience interacts with.
| Parameter | Default value | Description |
|---|---|---|
utm_source | customer.io | The source of the link. |
utm_medium | {{message.type}} | The source “medium” for the link the user clicked, like email_action. |
utm_campaign | {{campaign.name}} | The campaign the message (and link) belonged to. |
utm_content | {{message.name}} | The name of the message that contained the link. |
Disable campaign.name if you use URL parameters outside of campaigns
utm_campaign set to campaign.name and try to use cio_link to include URL parameters on links in a broadcast, newsletter, or transactional message, your message will fail.Default URL parameters in action
For example, imagine you have a campaign and message with the following details.
- Campaign name: Retention Campaign 1 [Marketing] [Internal]
- Email name: Hello World Email
With our default URL parameters, you’d add a link like this: {% cio_link url:"https://example.com" %}.
And we automatically append the URL parameters in your rendered email, like this:
https://example.com/?utm_content=Hello+World+Email&utm_medium=email_action&utm_name=Retention+Campaign+1+%5BMarketing%5D+%5BInternal%5D&utm_source=customer.io
Using URL parameters in SMS and WhatsApp messages
URL parameters aren’t automatically appended to links in SMS and WhatsApp messages. To add URL parameters in these channels, you must wrap your links in the cio_link tag:
{% cio_link url:"https://example.com" %}
URL parameters can make links significantly longer. If you use URL parameters (or Customer.io’s link tracking feature) in these kinds of messages, make sure that you enable link shortening so that your links fit in your messages.
How do I check that my URL parameters work?
In an email, you can click Review Links to see your URL parameters in action.


Add URL parameters to a link
For emails, URL parameters are automatically appended to all links when the feature is enabled—you don’t need to do anything extra.
For SMS and WhatsApp messages, use the cio_link tag with the url parameter to add URL parameters to a link:
{% cio_link url:"https://example.com" %}
You can also use the cio_link tag in emails if you want explicit control over URL parameters on specific links—for example, to disable URL parameters on a particular link.
Add or remove URL parameters
In your URL parameter settings, click Edit Parameters to add, remove, or edit your URL parameters. Any changes you make apply to links using the cio_link tag immediately.


You can shorten long campaign or newsletter names
{{ campaign.name | truncate: 15, "" }}. This example truncates your campaign name to 15 characters.Disable URL parameters for a link
In emails, URL parameters are appended to all links automatically. To turn off URL parameters for a specific link, use the cio_link tag with url_params:false.
{% cio_link url:"https://example.com" url_params:false %}
If you use our drag-and-drop editor, you can add the disable-url-params class to any item that acts as a link—links, buttons, images, etc.
URL parameters and link tracking
Link tracking helps you understand which links your audience clicks and the percentage of your audience that clicks each link.
URL parameters can help you track performance and engagement outside of Customer.io—in platforms like Google Analytics, for example. They also give you more control over the data you track—down to the campaign and message level.
Liquid in URL parameters
Here’s a list of common liquid values you might use in your URL parameters.
| Tag | Output |
|---|---|
{{layout.id}} | The numerical ID associated with the email layout you've used. **Only available for emails made with the code or rich text editors.** |
{{layout.name}} | The name you've assigned to the email layout you've used. **Only available for emails made with the code or rich text editors.** |
{{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*. |
Your analytics provider (like Google) may prohibit you from sending personal information or have specific guidelines for tracking; make sure you’re aware of any restrictions.
