Menu
 

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 Email & Actions > Email > URL Parameters. By default, they’re disabled. You’ll see this box:

URL parameters disabled

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_name, 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, of course, add any other UTM or custom parameters you like, or add some more liquid.

What happens when I enable?

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

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.

URL parameters disabled

Adding and removing parameters

Edit your parameters by clicking the top-right of the table:

Editing

You’ll be taken to an edit view, where you can add and remove these as you see fit. 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 name, you can use the Liquid truncate filter to make it shorter, like this:

{{ campaign.name | truncate: 15, "" }}

This would truncate your campaign name in the URL to fifteen characters.

FAQ

How does this relate to link tracking?

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.

Can I use liquid here?

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

Tag Output
{{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 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
{{message.id}} The numerical ID associated with the specific email the link belongs to.
{{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, urban_airship_action, attribute_update_action
{{customer.id}} Whatever you're using to uniquely identify your customer — usually numeric*.
* 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.
Can I set these per-message?

Right now, you enable and set these globally. If you’d like to disable or enable them for a given link in an email, you can switch to Code mode, and add the class disable-url-params.

Editing

Feedback?

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