Link tracking improvements

Read

New liquid, and custom URL parameters

by Ivana McConnell on Aug 18 2017

This feature is available for accounts on the new Google Cloud infrastructure.

Today’s product update includes two features that have been requested many times by our customers, and that we’re exceedingly pleased to deliver! The improvements are two-fold, and begin with:

1. New liquid variables!

The Liquid templating language is available in Customer.io to personalize your messaging, allowing you to merge data such as customer and event attributes into your messages, as well as use logic tags.

But what if you wanted to get a particular campaign name to use it in a message, or use the campaign ID for analytics tracking? What about using a specific event’s timestamp in order to trigger messages later on?

Today, we’re rolling out some liquid that we hope makes this far easier. Say hello to these new tags and their outputs:

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
{{message.subject}} If your message has a subject (or if it’s different to the message name) this tag will echo it.
{{event_timestamp}} The UNIX timestamp for when a particular event was performed. Keep in mind that this is different from {{now}}!

As well as two new filters:

The random number filter does exactly as it says! For example:

{% random LIMIT %} generates a random number between 0 and LIMIT.

Meanwhile, to_json converts an object into a json string. So, for example, if you’d like all your customer data in a JSON variable, you’d use something like:

{{ customer | to_json }}

We’ve updated our Github documentation to include more comprehensive information on these.

2. URL Parameters

In addition to new Liquid, you can now also enable and set custom URL parameters for your Customer.io workspace! Once enabled, those parameters are appended to all links in your emails! Just head to your workspace’s email settings, and click the URL Parameters tab to enable or edit them:

Editing URL parameters
Editing existing URL parameters

We start you off with four defaults: utm_source, utm_medium, utm_name, and utm_content. We use our new liquid parameters above as defaults for the latter three. You’re free to edit or delete them, or add custom parameters of your own. Once you save, they’re applied to all email links going forward!

We’ve written some documentation for this, to help you get started. Now you can better measure the efficacy of your emails with either UTM parameters or any custom values you choose.

Need more information?

We have more comprehensive liquid documentation on Github, and on URL parameters at our knowledge base. That said, if you’ve got any questions, feedback, or need a hand, we’re here for you at win@customer.io!

Share this post

Did you enjoy this article? Spread the word