Placeholders
6 min
in personizely's widget's text and personalizations, you can use dynamic text content to make the content even more relevant there are 4 types of placeholders now visitor properties query string parameters javascript variables dateime placeholders the placeholders have the following format {type property or 'fallback text'} the properties are going to be described below, while the fallback text stands for the text in case the property value is null visitor properties you can use placeholders to show visitors' properties right in the text of your widgets or personalized regions here's the list of the placeholders firstname lastname phone email bio companyname companytitle this placeholder has the following format {visitor property or 'fallback'} with fallback {visitor property} without fallback for custom fields use the following format {visitor customfield\[id] or 'fallback'} with fallback {visitor customfield\[id]} without fallback where id is the numeric id of the custom field which you can find in settings > custom fields examples {visitor firstname} for showing the visitor's first name {visitor customfield\[1]} for showing the value of the custom field with id 1 geo data you can use placeholders to show geo data values right in the text of your widgets or personalized regions here's the list of the placeholders country (country code) countryname region city this placeholder has the following format {geo property or 'fallback'} with fallback {geo property} without fallback examples {geo countryname or 'your area'} for showing visitor country or fallback to 'your area' in case it couldn't be detected querystring parameters you can extract text from the url query string parameters to show them in the personalization text this works really great with ads where you can place the keyword inside the query string this placeholder has the following format {query parameter or 'fallback'} with fallback {query parameter} without fallback examples {query utm term or 'no term'} would show the value of the ?utm term query string so if the url is https //site com/?utm term=seo https //site com/?utm term=seo , it will evaluate to seo {query ref} would show the value of the ?ref query string so if the url is https //site com/?ref=friend https //site com/?ref=friend , it will evaluate to friend data parameters you can include data from website data docid\ aixvbjmismhqkixv5pxuh using placeholders this placeholder has the following format {data key or 'fallback'} with fallback {data key} without fallback examples {data cartsize or '0'} would show the value of the cartsize value from your website data object date/time placeholders you can use placeholders to show the current date, time, and other date/time related properties right in the text of your widgets or personalized regions here's the list of the placeholders date the current date in the user string format hour current hour, e g 17 minute current minute, e g 45 day current day, e g 31 month current month, e g 1 year current year, e g 2019 dayofweek current day of the week, e g tuesday timeofday the current time of the day, one of morning, afternoon, evening, night season current season, one of winter, spring, summer, autumn this placeholder has the following format {datetime property} examples {datetime date} would show the current date in a user string format {datetime dayofweek} would show the current day of the week, e g tuesday javascript variables if there is something that you can expose as js variables, you could is it in the personalizations too this placeholder has the following format {variable variablename or 'fallback'} with fallback {variable variablename} without fallback examples {variable document title} would show the current tab's title