Conditional Content In Your Emails
While preparing your campaigns for your subscribers, it’s a good idea to send your subscribers specific personalized messages based on certain criteria (for example, gender, age group, location, etc.). In other words, if a criteria matches a certain condition, such as Gender being “Female,” you can provide a unique message in such situation.
This allows you to fine-tune your custom messages to users, and provide a much more personalized experience. This dynamic, personalized feature in the system allows you to connect better with your subscribers.
To add Conditional Content to your message, click the “Insert Conditional Content” link on the Message Editor.
Clicking this link will open a window for you to supply your conditions.
Choose a specific Field option (on the first Drop-down) to base the Conditional Content on.
Once you’ve chosen the Field to base the Conditional Content on, you can then choose the operator for the Conditional Content (2nd Drop-down). This could be Equals (Is), Does Not Equal (Is Not, Contains), etc.
Lastly, you fill in the condition that needs to be matched (3rd field) for certain content to display.
For example, here, we’ve chosen to customize the message based on the ERJA-Gender field. This means we will have a different message for Female & Non-Female subscribers.
When we hit the “Insert” button, some logic appears in the body of the message:
%IF $FIRSTNAME == 'Jim'% Insert Content Here %ELSE% Insert Alternative Content Here %/IF%
We are now free to edit the individual message that appears if a user’s gender is Female, or if their gender is not Female.
Notice the text that says, “Insert Content Here.” This is where you supply your message for Female Subscribers. The section that says, “Insert Alternative Content Here” is where your message goes for users that are not Female. Below is an example.
%IF $PLUS_GENDER == 'Female'% Hi Ma'am, This is a message for you! %ELSE% Hi, This is your message! %/IF%
In the above example, we only had 2 conditions, Female and not Female. However, Conditional Content is not limited to only 2 conditions. You can practically have as many conditions as you want. The 2 condition example above does not take into account your Male subscribers. Basically, it groups together subscribers who have both Male value and No value. In order to have specific messages to Female and Male subscribers (and subscribers with no Gender value), we would need to have conditions for both Female and Male subscribers. To do this, we would just need to add an ELSEIF condition in the middle of our original logic. Below is an example of Conditional Content logic that has specific messages for subscribers who are Female, Male, & Everybody else.
%IF $PLUS_GENDER == 'Female'% Hi Ma'am, This is a message for you! %ELSEIF $PLUS_GENDER == 'Male'% Hi Sir, A message just for you! %ELSE% Hi, This is your message! %/IF%
Be very careful not to modify or move the control tags. These tags include any text inside a percentage sign:
%IF $PLUS_GENDER == 'Female'%
If you modify or move these tags, your conditional content will not render properly.