Using Taxi with ESP code

The majority of ESPs have their own templating language which can be used for a variety of purposes.

For example:

  • showing someone’s first name or other personal information in the email from your data

  • showing different content to different groups of people based on your data

  • looping through data and showing a different amount of content depending on the recipient e.g. different number of images based on how many products someone bought

In Taxi, there are different ways to handle these depending on what you are trying to achieve.

This article goes through all the approaches you can use to include ESP specific code in your emails and when you would use them.

Personalisation

Personalisation in Taxi enables you to include ESP code in your emails without needing any technical knowledge of the exact syntax.

You can read more about this feature here.

When to use

Use this feature when you have individual pieces of data or information you want to show which are unique to each recipient, such as first name.

Other things to know

You can include as much or as little code in personalisation fields as you need. Sometimes it will only be a variable which can look like %%First Name%%, #{{first_name}}, <% firstname %> (unique for each ESP).

Other times you will need to include more logic as well as the personalisation variable, for example, to show a default value when a first name isn’t known.

If you use multiple ESPs you can define exactly which code is used for each one, so you can be certain you’ll have the right code in your email no matter where you export to.

Segmentation

This feature means you can include conditional logic, such as an if statement, in your email to show different content to different groups of people without having to manually add the code into every email.

Find out more about segmentation here.

When to use

Use this feature when you are targeting different groups of recipients in your email and want to show each group some different content

Other things to know

Sometimes when using conditional logic you will need to include some code at the top of the HTML, for example, to declare some variables. With segments sets and single segments, you can do this so you don’t need to have this in the EDS or add it manually in each email.

Email Design System

Sometimes the features described above don’t cover everything you could do with ESP code. However, there is still no need to manually add or edit code after exporting from Taxi as there are ways to use your EDS to help manage this.

Code that is included in every email

If you have code that is needed in the HTML of every email you send you can include this in your Email Design System. You can also make sure that it doesn't appear in any emails by using escape tags.

Alternatively, you can have a hidden field and make the default value whatever code is needed in your HTML. If you use a field, you will be able to amend the code if needed in Taxi, without having to download the EDS and edit the HTML.

Loops

Most ESPs templating language enable you to repeat blocks of code as many times as needed for each recipient. For example, if one customer buys two products they will have two rows in their receipt email. If another customer buys five products they will have five rows in their receipt email.

The code used to achieve this looks different for each ESP, but you can include it in your EDS in the relevant modules and use escape tags to make sure it doesn’t impact the preview in Taxi.

Last updated