Content Personalization on CleverTap

Created by Ankit Kumar Kumar Singh, Modified on Mon, 3 Jun, 2024 at 7:22 PM by Ankit Kumar Kumar Singh

Overview

You can personalize the message for every user based on specific user property (in both live and PB campaigns) or event property (only in live behaviour campaigns) values. For more information on user profile properties and events (dynamic replacements), refer to User Properties and Events dictionary

https://docs.google.com/spreadsheets/d/1adOr1eK8uUb85J1U5mQlf7ne6tXvM86rRhUhNEkzpcI/edit#gid=1883152009

Inline Personalization

To invoke the personalization menu, type the @ or the {{}} symbol in the title or the text fields while creating a message.

You can also add dynamic replacements in the title and body. Notice a preview as displayed below.




Liquid Tags

Liquid tags offer great flexibility while composing personalized messages. Liquid tags allow adding logic using a scripting language, which can be leveraged to change the look and feel of your message. Following is an example to send personalized coupon codes based on the type of membership:



To find more details on Personalized Content and Liquid tag: https://docs.google.com/presentation/d/1nQnmTI_P4ZNx_79mzIi6q9MupTGEAG6Qg-EzM0Qq3hM/edit?usp=sharing

******************************************************************************************************************************************************************************************************************

Date Formatting using Liquid

We have the capability on CleverTap which allows us date formatting as per our requirement. Please go through the solution suggested below:

1> Required Date format: 06 October, 2015  

Liquid Script: {{date | "%d %B, %Y"}}

Example: {{ Profile.PAYTM_first_transaction_date_new | default:"21-04-2023" | date:"%d %B, %Y"}}

WhatsApp Image 2023-04-21 at 15.40.03.jpeg

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

2> Required Date format: 06 October 

Liquid Script: {{date | "%d %B"}}

Example: {{ Profile.PAYTM_first_transaction_date_new | default:"21-04-2023" | date:"%d %B"}}

WhatsApp Image 2023-04-21 at 15.34.58 (1).jpeg

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

3> Required Date format: 06 Oct   


Liquid Script: {{date | "%d %b"}}

Example: {{ Profile.PAYTM_first_transaction_date_new | default:"21-04-2023" | date:"%d %b"}}

WhatsApp Image 2023-04-21 at 15.58.53.jpeg

Note: To use the above mentioned liquid filters, 

  • User property should be in date format. 
  • Event property should be in the format $D_epochseconds


******************************************************************************************************************************************************************************************************************

How to create different copies of Push Notification from same recurring campaign

We can use liquid syntax capabilities to create a different Push templates from one recurring campaign in 1 run:

Liquid syntax logic to be used above is as follows

{% assign day = "now" | date: "%d" %}
{% if day== "07" %} Today is 07 April
{% elsif day == "14"%} Today is 14 April
{% elsif day== "21"%} Today is 21 April
{% elsif day == "28" %} Today is 28 April
{% else %} Default Variant
{% endif %}

Output:

Alternate Solution: Creating different Push copies from same campaign for each day of the week

Liquid syntax logic to be used is as follows:

{% assign day = "now" | date: "%a" %}
{% if day== "Mon" %} Today is Monday
{% elsif day == "Tue"%} Today is Tuesday
{% elsif day== "Wed"%} Today is Wednesday
{% elsif day == "Thu" %} Today is Thursday

{% elsif day== "Fri"%} Today is Friday
{% elsif day == "Sat" %} Today is Saturday
{% else %} Default Variant
{% endif %}

Output:

Note: These campaigns were run on Friday, 28 April 2023

  • If the above syntax is used, CleverTap will trigger notification wrt day of the week. Hence, on every run there will be a new template.


  • Campaign creators are suggested to use either of the two syntaxes based on their requirement. For campaigns running once/ week, syntax 1 works better while for campaigns running more than once/ week syntax 2 should be used.


  • Teams should make effective utilization of the liquid syntax as this solution helps us optimize on the following resources:

    • Lesser journeys will be created as we can create multiple push templates from one campaign.

    • No “date of month”/ “day of week user” property is required to build the logic suggested above.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article