Pardot Knowledge Base

Variable Tags Overview

Last Updated: Jul 05, 2016 | Print this Article
 

Customers are more likely to respond to your messaging when your email is personalized. Inserting basic dynamic content (or variable tags) in an email template is a simple way to personalize your message to a specific customer. Variable tags also allow you to insert standard information into your email templates, such as your company name and address.

Pardot provides many standard variable tags in the Email Template Wizard. Here is a list of all standard variable tags available to use in the WYSIWYG editor and what information these tags pull into your email template. If you decide to manually enter a variable tag into an email template please be aware that they are not case-sensitive.

If your variable tag references default or custom prospect fields, you may need to use a modifier. See Do I need to use a modifier with my variable tag? for complete details. Variable tags that reference account and user fields do not need modifiers.

Default Variable Tags

Variable Tag Data the Tag Displays
%%account_address%% Your Pardot account address; Admin users can update this address by going to "Settings" (under your email address in the top-right) and selecting "Edit account"
%%address_one%% Prospect's Address One field
%%address_two%% Prospect's Address Two field
%%addthis_url_email%% Link to share via email
%%addthis_url_facebook%% Link to share via Facebook post
%%addthis_url_linkedin%% Link to share via LinkedIn
%%addthis_url_more%% Link to share on other social media sites
%%addthis_url_twitter%% Link to share via Twitter
%%city%% Prospect's City field
%%comments%% Prospect's Comments field
%%company%% Prospect's Company field
%%country%% Prospect's Country field
%%crm_id%% Prospect's Lead or Contact CRM ID
%%department%% Prospect's Department field
%%email%% Prospect's Email field
%%email_preference_center%% Link to Pardot's Default Email Preference Center Page
%%fax%% Prospect's Fax field
%%first_name%% Prospect's First Name field
%%industry%% Prospect's Industry field
%%job_title%% Prospect's Job Title field
%%last_name%% Prospect's Last Name field
%%phone%% Prospect's Phone field
%%prospect_account.annual_revenue%% Prospect Account's Annual Revenue field
%%prospect_account.billing_address_one%% Prospect Account's Billing Address One field
%%prospect_account.billing_address_two%% Prospect Account's Billing Address Two field
%%prospect_account.billing_city%% Prospect Account's Billing City field
%%prospect_account.billing_country%% Prospect Account's Billing Country field
%%prospect_account.billing_state%% Prospect Account's Billing State field
%%prospect_account.billing_zip%% Prospect Account's Billing Zip field
%%prospect_account.description%% Prospect Account's Description field
%%prospect_account.employees%% Prospect Account's Number of Employees field
%%prospect_account.fax%% Prospect Account's Fax field
%%prospect_account.industry%% Prospect Account's Industry field
%%prospect_account.name%% Prospect Account's Name field
%%prospect_account.number%% Prospect Account's Number field
%%prospect_account.ownership%% Prospect Account's Ownership field
%%prospect_account.phone%% Prospect Account's Phone field
%%prospect_account.rating%% Prospect Account's Rating field
%%prospect_account.shipping_address_one%% Prospect Account's Shipping Address One field
%%prospect_account.shipping_address_two%% Prospect Account's Shipping Address Two field
%%prospect_account.shipping_city%% Prospect Account's Shipping City field
%%prospect_account.shipping_country%% Prospect Account's Shipping Country field
%%prospect_account.shipping_state%% Prospect Account's Shipping State field
%%prospect_account.shipping_zip%% Prospect Account's Shipping Zip field
%%prospect_account.sic%% Prospect Account's SIC Code field
%%prospect_account.site%% Prospect Account's Site field
%%prospect_account.ticker_symbol%% Prospect Account's Ticker Symbol field
%%prospect_account.type%% Prospect Account's Type field
%%prospect_account.website%% Prospect Account's Website field
%%salutation%% Prospect's Salutation field
%%state%% Prospect's State field
%%subject%% The email's subject
%%territory%% Prospect's Territory field
%%unsubscribe%% Link to Pardot's Default Unsubscribe Page
%%user_crm_id%% Assigned User's CRM ID
%%user_email%% The sending User's email*
%%user_first_name%% The sending User's first name*
%%user_html_signature%% The sending User's html signature, available to edit in the user's profile**+
%%user_job_title%% The sending User's job title*+
%%user_last_name%% The sending User's last name*
%%user_name%% The sending User's full name*
%%user_phone%% The sending User's phone number*+
%%user_text_signature%% The sending User's text signature, available to edit in the user's profile**+
%%user_url%% Link to your company's website from assigned user's URL field*+
%%view_online%% Link to view an email message in a web browser
%%website%% Prospect's Website field
%%years_in_business%% Prospect's Years In Business field
%%zip%% Prospect's Zip field
 +This tag will not populate if the sending user is a "General User"
 

Custom Variable Tags

When you create a new custom prospect field or custom prospect account field it will appear in the variable tag dropdown when building your email. This will allow you to further personalize your list emails to include custom data. An important note: custom fields that are set to 'Record and display multiple responses' are not eligible for use as variable tags. As such, they will not appear in the variable tag dropdown when building emails. Creating the variable tag manually in an email will not allow the field's values to populate when the email is sent.

Note: The way values are displayed in a custom field on the prospect record may differ from how they are displayed in an email when used with a variable tag. For example, values may be listed vertically in a custom field like this:
Value 1
Value 2
Value 3

 But in an email, they may be listed on one line, like this: Value 1 Value 2 Value 3

FAQs

*How do variable user tags populate when I make the 'from' address the prospect's assigned user? User values for a prospect's assigned user will only be inserted if the prospect is assigned to a user in Pardot, the email is sent from the assigned user (you should make the ‘From’ address the prospect’s assigned user in the sender options) and the user has the variable field populated on their user record. If the prospect is not assigned and the sender determined by the sender hierarchy is a specific Pardot user, the user variable tags will insert that default sender’s information. For more information, click here.

**Which user signature tag should I use? In the HTML section of the email, use %%user_html_signature%%. If %%user_html_signature%% is used in the text version or in the subject line, the text of the HTML signature, including HTML tags, will be shown. Instead, use %%user_text signature%%. For more information, click here.

Can I use variable tags on Pardot landing pages? We don't recommend using variable tags on landing pages -- they don't populate consistently.

Can I populate variable user tags from a person who isn't a user in Pardot? No. Assigned user tags only populate when the sender of your email is a “Pardot User” (selected on step 3 of Email Flow). If the sender is a “General User” or if the assigned user has no signature information, user html signature and user text signature tags will be omitted from the email when sent. Also, depending on if the prospect is assigned (or not) and the “Make the ‘From’ address the prospect’s assigned user” option is enabled (or not), the user signature tags will populate differently. For more information, click here and view the “If “From Name/Email” = User” section.

What if a prospect doesn't have a value for a field? What will display? By default, if someone doesn't have a value for a field, we'll just not display anything when the email is sent. You can also define default values for prospect field variable tags, so prospects with no value for that field get a default substitute. If no default mail merge value is designated then the tag will be replaced with an empty value.

My custom field is set to 'Record and Display Multiple Responses', can I use it as a variable tag? No. Custom fields set to 'Record and display multiple responses' are not eligible for use as variable tags, so they will not appear in the variable tag dropdown when building emails. Creating the variable tag manually in an email will not allow the field's values to populate when the email is sent and will cause a validation error - "The following variables allow multiple responses and cannot be used as variable merge tags:", with the invalid tag or tags listed beneath the error message.

I'm getting an error message that my variable tags are malformed - what does that mean? How do I fix it? That error message indicates that there's an issue with something in your source code that's causing your variable tag to look different from %%field_id%% - for example, in the source code, the tag may look like %%<span>field_id%%</span>, which will cause that validation error. View the source, move the text around so that the variable tag resembles %%field_id%%, and the error should go away.

My custom field is a Multi-Select or a Checkbox - can I use it as a variable tag? What value(s) will be displayed? You can use a Multi-Select or a Checkbox field as a variable tag, but the value displayed will be only the last value listed for that field in the prospect record.

Can I use Prospect Account fields as variable tags? Yes! The syntax for Prospect Account fields are %%prospect_account.field_id%%, where field_id is the unique id of the field. Prospect Account tags that begin with %%prospect_account. and contain an invalid field_id (ex: %%prospect_account.field_doesnt_exist%%) will be replaced by an empty value. All other invalid tags will display as entered when an email is sent.

Can I use Opportunity fields as variable tags? Sorry, opportunity fields cannot be used as variable tags. 

Can I populate a URL in a variable tag? Absolutely! If you are using a variable tag to populate a URL in an email, you will want to only use the tag to populate the latter part of the link, and hardcode the beginning of it within your email. This will ensure the URL is rewritten and tracked in your email.  Example: Use “whitepaper_url” as your variable tag value rather than http://www.pardot.com/whitepaper_url. Review Inserting a URL in an Email Using a Variable Tag for more details.

Can I use a variable tag in the subject line of my email? Sure thing! Keep in mind that all the limitations above are also applicable to variable tags in email subject lines. Additionally, you don't want to user %%user_html_signature%% in a subject line, because the text of the HTML, including tags, will be shown.

What values will be populated for a variable tags when a prospects clicks "View Online"? When a prospect clicks the "View Online" link, the variable tags from the email will be populated with the values that are in their prospect record at the time "View Online" is clicked, regardless of what those values were when the email was originally sent.  

Using Variable Tags in Thank You Content for Forms

The same variable tags that can be inserted within emails can also be inserted into the thank you content for a form. To insert the tags, click on Edit for an existing form or click Create new form. In the Form Content and Styles section below the form builder, click on the Thank You tab. In the Thank You Content WYSIWYG editor, insert the variable tag(s) you would like to insert based on the prospect's record. Here is an example: %%first_name%%, thank you for contacting us. We look forward to speaking with you about our products that would be a good fit for %%company%%.

Note: While you do have the ability to pull in variable information based on any of the field information in the prospect's record, it is recommended that you only insert variable tags for the required fields in the form you are creating/editing to ensure the data will be pulled in correctly.

Using URL Encoding and Escaping

In certain situations, you may want to URL encode characters (for example, including a field value as part of a URL) or escape characters to use them in a JavaScript. By default, characters are HTML escaped, even if no modifier is specified. Pardot has a feature that allows you to easily escape and URL encode the contents of your variable tags before they populate for security and consistency.

Note: You only need to add modifiers to variable tags for prospect fields.

Note: Links in emails will have the {url} encoding automatically added. You do not need to add it.

URL Encoding:
To URL encode a variable tag, insert {url} before the last %%: %%variable_tag_id{url}%%

	%%variable_tag_id{url}%%
will run PHP's urlencode() on the contents of the field. So if the content of the field is:
	Listen: I want this &/or that!
when using {url}, the content would become:
	Listen%3A+I+want+this+%26%2For+that%21

​JavaScript Output Encoding:
Javascript output encoding is for use when tags are a part of JavaScript strings in the output of the email or page. To JavaScript encode a variable tag, insert {js} before the last %%: %%variable_tag_id{js}%%

Email Addresses and Web Links:
It's safest to use the raw modifier with email addresses and web links, in case there are any special characters. To use this, insert {raw} before the last %%: %%email{raw}%% , %%website{raw}%%
 


Need more? Start a conversation with other Pardot users in our Success Community