The problem
We are currently looking to replace a email marketing platform. One of the key features we use in the current one, that plunk is missing, is a strong templating system. We sometimes have customer attributes that drive some logic inside the campaign we are sending so the email being sent will have some customization.
I can give 2 concrete examples:
- Multilanguage support. We have a custom field to let us know the language of the customer, then in the email we embed logic so that if language == 'en' => sentence in english, if language == "es", then spanish text, etc...
- Pricing customization: maybe we want to give different offers to different customers and we want to do so based not in an attribute that the customer itself has, but in a derivative.
- Promo customization: maybe we want to show monthly offer to certain type of users whereas we want to have another to a different segment
For some of these things it is true we could just segment usrers in dynamic lists and send different emails, but when you mix promo customization along with multilanguage for example, it makes things harder and combinatorics explode. Is easier to just keep it in a single campaign and measure results.
What other marketing platforms do
Other marketing platforms have support for this. For example:
Expected solution
For starters, I would expect plunk to have support for some sort of language conditionals/loops/filters/... in some way. Currently having variables is great but not enough for us.
Given that plunk is already using {{variable}} I would just suggest using a templating language that is compatible with those. Given that your project is typescript/js I would suggest:
- https://handlebarsjs.com/ <-- well known, basic functionality, can be pre-compiled for faster execution (sendgrid/mailgun/...)
- https://liquidjs.com/index.html <-- apparently well supported on well-known platforms, according to Claude used on netlify/shopify/zendesk/...
- jinja-like family. I haven't explored.
I don't have experience to compare and in the end there are different tradeoffs. Since you need to evaluate the logic for each email address to be sent, it looks like it would be CPU intensive if sending hundreds of thousands of emails. Not a clue on whether CPU performance will suffer, maybe network is the bottleneck. Anyway handlebars seems like a strong contender since it can be compiled and probably the performance would be 10x or 100x that of liquidjs (it looks like liquidjs does not support this) whereas liquidjs seems more expressive. Haven't made any test to make this claim and not too familiar with both anyway, but if one is compiled and just interprets data whereas the other needs to re-parse the email every time, rendering is going to take more time (or so I guess).
Liquidjs seems more expressive than handlebars. Both are backwards compatible with current variables. There are probably other options, these are just the ones I would think on first.
The problem
We are currently looking to replace a email marketing platform. One of the key features we use in the current one, that plunk is missing, is a strong templating system. We sometimes have customer attributes that drive some logic inside the campaign we are sending so the email being sent will have some customization.
I can give 2 concrete examples:
For some of these things it is true we could just segment usrers in dynamic lists and send different emails, but when you mix promo customization along with multilanguage for example, it makes things harder and combinatorics explode. Is easier to just keep it in a single campaign and measure results.
What other marketing platforms do
Other marketing platforms have support for this. For example:
Expected solution
For starters, I would expect plunk to have support for some sort of language conditionals/loops/filters/... in some way. Currently having variables is great but not enough for us.
Given that plunk is already using {{variable}} I would just suggest using a templating language that is compatible with those. Given that your project is typescript/js I would suggest:
I don't have experience to compare and in the end there are different tradeoffs. Since you need to evaluate the logic for each email address to be sent, it looks like it would be CPU intensive if sending hundreds of thousands of emails. Not a clue on whether CPU performance will suffer, maybe network is the bottleneck. Anyway handlebars seems like a strong contender since it can be compiled and probably the performance would be 10x or 100x that of liquidjs (it looks like liquidjs does not support this) whereas liquidjs seems more expressive. Haven't made any test to make this claim and not too familiar with both anyway, but if one is compiled and just interprets data whereas the other needs to re-parse the email every time, rendering is going to take more time (or so I guess).
Liquidjs seems more expressive than handlebars. Both are backwards compatible with current variables. There are probably other options, these are just the ones I would think on first.