Personalizing email content based on user profile variable
SOLVE
Hi there,
Just reaching out to see if anyone can advise on how to personalize email content. The Smart Content feature becomes unwieldy when there's numerous variables, so I'm hoping there's an alternative.
On our B2C platform we use personalization tokens to insert user profile data - something like:
Are you currently using personalization tokens to insert personalized email content? Or are you using Smart Content to show different block of text with your the personalized values written manually? Inserting personalization tokens from the email editor toolbar is the first solution here.
If you are looking to avoid using this feature you could just enter the corresponding contact HUBL variables (which is all the insert personalization token toolbar feature is doing for you)
Are you currently using personalization tokens to insert personalized email content? Or are you using Smart Content to show different block of text with your the personalized values written manually? Inserting personalization tokens from the email editor toolbar is the first solution here.
If you are looking to avoid using this feature you could just enter the corresponding contact HUBL variables (which is all the insert personalization token toolbar feature is doing for you)
This looks correct....with the exception of the // in your img src url, there should just be a single forward slash before the contact variable, https://website.com//{{ contact.variable }}.png.
{% if contact.variable %} is checking to see if a contact property with an internal name of variable (in practice this would be something like contact.firstname or the actual internal name of your contact property) is defined. If the property variable has a value it should output your first image tag and if it has no value it should default to your second image tag.
What is happening when you use this code?
Matthew Shepherd
Freelance HubSpot Consultant CRM Consultant | SEO Specialist
Personalizing email content based on user profile variable
SOLVE
Thanks so much, Matthew! It appears the merge values are working as exptected. I need the inserted value to be converted to lowercase, however. I tried this but it doesn't seeem to be working. Any ideas?
I forgot you were implementing this in an email template where filters on personalization variables aren't supported:
"Please note that using filters on personalization variables (contact and company variables) is not currently supported for email in HubSpot. Filters can be applied to these properties on HubSpot CMS page and blog templates."