Sentry Page Protection
Personalization with CodeSnippets
If you've ever used a mail merge function in a word processing program, you'll find personalizing emails to be a similar process. Information which is unique to each recipient is contained in the fields within the group, such as FirstName, for example. For the unique information from a recipient's profile to be inserted into the content, the subject line, or a URL, you will need to insert a placeholder to alert the system to go find and grab that specific information. We call these placeholders CodeSnippets.
How Codesnippets Work
A CodeSnippet is essentially the field name encased by double percent signs. For example, the CodeSnippet for a recipient's first name is %%FirstName%%. It is the double percent signs that instruct the system to grab the information from the profile field. In the illustration below, you can see that the FirstName CodeSnippet was inserted into the email content. When the email went out, the double percent signs (%%) instruct the system to grab the unique information in the recipient's profile ("John") and inserts it into the email that was sent to the recipient.
Note - if the field being used is missing data within the subscribers profile, the CodeSnippet will be replaced by a blank space. If this is the case, you can utilize our Dynamic Tag functionality to input generic/'friendly' text.
How Codesnippets Work
A CodeSnippet is essentially the field name encased by double percent signs. For example, the CodeSnippet for a recipient's first name is %%FirstName%%. It is the double percent signs that instruct the system to grab the information from the profile field. In the illustration below, you can see that the FirstName CodeSnippet was inserted into the email content. When the email went out, the double percent signs (%%) instruct the system to grab the unique information in the recipient's profile ("John") and inserts it into the email that was sent to the recipient.
Note - if the field being used is missing data within the subscribers profile, the CodeSnippet will be replaced by a blank space. If this is the case, you can utilize our Dynamic Tag functionality to input generic/'friendly' text.
How to Insert a CodeSnippet
Email Content
To insert a CodeSnippet into your email content, use the CodeSnippet icon in the content editor. Place your cursor in the body of the email where you'd like the information to be inserted. Then select the CodeSnippet icon. A popup box will appear where you can select the group you will be sending the email to, along with the desired CodeSnippet (any field, standard or User Defined Field can be selected as a CodeSnippet).
Email Content
To insert a CodeSnippet into your email content, use the CodeSnippet icon in the content editor. Place your cursor in the body of the email where you'd like the information to be inserted. Then select the CodeSnippet icon. A popup box will appear where you can select the group you will be sending the email to, along with the desired CodeSnippet (any field, standard or User Defined Field can be selected as a CodeSnippet).
You can use any standard profile fields as CodeSnippets, as well as any UDFs in your groups following this format: %%user_udfname%%. Here is a basic list of CodeSnippets:
%%EmailAddress%%
%%Password%% %%FormatTypeCode%% %%SubscribeTypeCode%% %%Title%% %%FirstName%% %%LastName%% %%FullName%% %%Company%% %%Occupation%% %%Address%% %%Address2%% |
%%City%%
%%State%% %%Zip%% %%Country%% %%Voice%% %%Mobile%% %%Fax%% %%Income%% %%Gender%% %%Website%% %%Age%% |
%%Birthdate [MM/DD/YYYY]%%
%%User1%% %%User2%% %%User3%% %%User4%% %%User5%% %%User6%% %%UserEvent1%% %%UserEvent1Date [MM/DD/YYYY]%% %%UserEvent2%% %%UserEvent2Date [MM/DD/YYYY]%% |
%%groupname%%
%%customer_name%% %%customer_address%% %%unsubscribelink%% %%publicview%% %%reportabuselink%% %%emailtofriend%% %%blast_start_time%% %%blast_end_time%% %%blast_id%% |
Click the OK button when you are finished making your selections. The codesnippet will appear in the email content:
[Transactional data can also be inserted into email content using the Transnippet icon, for a recipient's order history, etc.]
Subject Lines
A CodeSnippet can also be inserted into a subject line to personalize the message and grab the recipient's attention. Since we are not working within the Content Editor, the CodeSnippet will need to be hand-written. Please note that misspelling a field name can cause an error in the email campaign and may result in a non-deployed campaign. A simple trick is to insert the CodeSnippet into a blank content, and copy/paste the CodeSnippet into the subject line (the content should not be saved, or if saved, can later be deleted as it will not be used).
A CodeSnippet can also be inserted into a subject line to personalize the message and grab the recipient's attention. Since we are not working within the Content Editor, the CodeSnippet will need to be hand-written. Please note that misspelling a field name can cause an error in the email campaign and may result in a non-deployed campaign. A simple trick is to insert the CodeSnippet into a blank content, and copy/paste the CodeSnippet into the subject line (the content should not be saved, or if saved, can later be deleted as it will not be used).
URLs
Codesnippets can also be used to prepopulate data into a form field. Publishers will often use this when sending out requal emails. Here's an example of a requal link that uses three different CodeSnippets (SubscriberID, Password [pwd], and Promocode).
https://eforms.kmpsgroup.com/jointforms/Forms/Subscription.aspx?pubcode=yzx&SubscriberID=%%SUBSCRIBERID%%&pwd=%%LastName%%&promocode=%%PROMO%%
When that link is used in an email and clicked on (A), the system grabs the associated data from the profile (B), and inserts the data into the link (C); when the completed link is used on the form, the data from the subscriber database populates the form in the appropriate fields (D).
Codesnippets can also be used to prepopulate data into a form field. Publishers will often use this when sending out requal emails. Here's an example of a requal link that uses three different CodeSnippets (SubscriberID, Password [pwd], and Promocode).
https://eforms.kmpsgroup.com/jointforms/Forms/Subscription.aspx?pubcode=yzx&SubscriberID=%%SUBSCRIBERID%%&pwd=%%LastName%%&promocode=%%PROMO%%
When that link is used in an email and clicked on (A), the system grabs the associated data from the profile (B), and inserts the data into the link (C); when the completed link is used on the form, the data from the subscriber database populates the form in the appropriate fields (D).