Advanced email personalization using Mailjet’s API
Find out how to use dynamic content with Mailjet's API. Our template language will make it easy for you and your recipients will receive customized emails.
In our previous post in this series we explained what personalization is and provided some useful tips on how and when to best add personalization to your campaigns. We also showed you how to apply standard personalization either manually or using our awesome email builder - Passport. If you missed it be sure to check out our previous article here.
In this article, we are going to dive even deeper into the world of the personalization. Do you want to know how to get to the next level? ? Keep reading and you will see the magic of the advanced personalization, which will allow you to create the perfect email for everyone.
Table of content
Behavior website tracking
Table of content
What is advanced email personalization?
Advanced personalization is the easiest way to customize your emails with data that it is collected by your CRM or any other tool you are using to collect your customer’s information. At the moment, this type of personalization e can only be used for transactional emails at Mailjet and by using our template language.
While advanced personalization allows you to do everything we covered in standard personalization, it goes well beyond that.. Not only can you customize [first name] and other basic variables, with advanced personalization,you can customize the content of your email as well, allowing you to send fully personalized emails.. We’ll show you a little later on how exactly you can do this but first to do any kind of personalization you will need personal data for your clients to use.
What data can you use to personalize your email?
The most basic method of collecting information is through a subscription widget You can ask your customers and prospect any number of qualifying questions as they are subscribing to your emails, or opening an account. Starting with their name and email of course, all the way to questions that are going to help you provide a truly personal experience in your campaigns.
For example, if you are selling tickets for events, you could ask “What type of music do you like?” or “What type of movies do you like to watch?” or maybe “Do you prefer live music or live theater?”. get a better idea what to propose to each customer.
But are there other ways to collect data from your customers without asking them additional questions all the time? Yes, you can collect the data for advanced personalization using behavioral website tracking or integrations.
Behavior website tracking
Using behavior website tracking you would have the ability to collect more data than you would ever need about your website visitors using conversion rate optimization (CRO) tools.
User behavior are the activities that your visitors are doing after they land on your site. It could be clicks, scrolling through pages, reading blog posts, taking quizzes, and anything else you think will be useful to you. This could be really helpful at any time of the year,or example if you are tracking that Mike is browsing for items for his wife Laura and his 5 year old boy Jake, you can send him an email with suggestions for the perfect presents for his family.
Another good option would be to use integrations. Get subscriber data such as past orders, total money spent, location, purchase data,and more, by integrating your email marketing tool with your CRM or e-commerce platform. There are a lot of integrations that could do all the work for you and you will just have to create the basic template, all the rest will be done automatically. So, at the end your recipient will get a perfect personalized email. For example if you are using our integration with Mautic, you could create a preference center using their how-to article.
Okay, now we have all the data that we need for our emails. Let’s see how to use it with our advanced personalization option.
How do you use advanced personalization?
When it comes to personalized content, how you can decide which part of the content to be shown to specific targets? When the emails speak to what the subscriber wants to read about, your customers are much more likely to engage with them. Hence, you need to be sure that you offer email content that are targeted and relevant to the recipient. Now that you have all the data and segments set, create emails that are most suited and targeted for each individual subscriber.
Dynamic content is something that you can easily do with the our advanced personalization or the so called template language via our API. You can easily mix up the simple and the advanced personalization in one template, so you would have one beautiful email at the end.
What is the difference between both types? As we saw, standard personalization is taking the information from the data you provided while uploading your list at Mailjet, so we already have this information on our side.
But advanced personalization is actually asking your systems about the information that we should display in the email. In the API call you are going to set up the properties and configure the path to the destination from where the API call should take them.
There is a slight difference also in the way the both type of personalizations are being set up. If you are creating your template in Passport to use the standard personalization, you can use the way described in our previous article, or manually by typing:
The advanced personalization could be set up by manually typing the following syntax:
The way you should define those properties in your API calls, depends on the API version you are using.
In Send API v3.1 you should do it with the following piece of code:
In Send API v3 the code is:
In the API call you can set up the path to the destination from which the variable should be taken. Our system will call this destination and replace the property with the value your system sends us.
Using dynamic content to personalize emails
One of the useful features of the template language is the dynamic content. Using conditions and loops, you can show part of your content only to the recipients you want.
You won’t recommend Mike buy his wife Laura men’s shoes right? Or his son a kitchen dining set?
We know that you can create such dynamic content using HTML without any issue, but now this is possible with Passport as well. Simply drag and drop the template language section wherever you want within the template, like shown below:
You can create any condition, or loop where the content can be shown to each of your segments. You can also use any information that you have saved in your CRM or database. For example age, gender, city, or interests. If you are using behavioral website tracking, this could also be used as source of information.
Another option would be to segment a whole section using Passport. To do this, you will need to select the section you want, and in the upper left corner you will have the option to add a property and segment based on it.
Click on “Add condition” and configure the right option for your specific use case. You can choose whether the property should be equal to a specific term, or greater than a value, or less than any value you choose.
You can find everything you need on how to use the dynamic content with our template language in this article.
Personalizing the content and copy of the email boosts engagement and loyalty. Sending tailor-made and relevant content increases the click-through rates of your emails. By dynamically changing content, you will be able to send the most relevant emails to every subscriber. They will see offers and products that they are more likely to be interested in, thereby increasing the likelihood of a purchase.
What can you add as dynamic content? Almost anything! Here are some ideas to get you started:
VIP Loyalty section - categorize your subscribers based on their purchases and send specially tailored offers and discounts to them. This will help your brand engage customers stronger and drive revenue.
Recommendations - when you send recommendations based on a recent purchase, there is an increased chance of them purchasing the recommended products.
Wish Lists - you have an item that a customer added in their wish list? Add this as a reminder in the next email you are sending them. They might still want it.
Abandoned Carts - someone left behind an item in their cart? Remind them about how awesome that product is, hey they may still want it. You can see how to code abandoned cart emails using MJML in our tutorial.
Birthday/Anniversary discounts - what better way to celebrate a birthday than by providing them a discount? You can do the same when someone has been with you for a month, a year, or any anniversary worth celebrating.
The best part is that all of this can easily be done with our email builder Passport! And you will only need to define the variables you used for the advanced personalization in your API call.
You can create one template that full of variables, but everyone of your subscribers will receive an email that is perfectly customized for them. Don’t waste your time with different templates for all your customers You can easily have one template that will adapt to the customer. With the strategies listed above, you can set up a winning personalized email strategy for your business. Your customers receive dozens of emails everyday, so your email needs to stand out. Personalization can do this for you! Try it out and see how your emails can build stronger relationships between your brand and your customers.
How to set up template error management and why we need it
Testing your email templates is tough. Who wants to be checking thousands of code lines for 50 different templates?...