Dynamic tags for personalization (deprecated)

Article author
Miguel Panayotty
  • Updated

Dynamic tags allow you to hand-code conditional personalization in your email design. In early 2020, we launched an easier way to add conditional content to your emails and blocks. Learn more about Conditions

 

Add a dynamic tag in your email design

Go to Subscribers > Dynamic tags to build your tag, copy it, and then paste it into your email design.

 

1. Go to Subscribers > Dynamic Tags

 

2. Copy the Dynamic tag you would like to use

Use your keyboard controls Ctrl+C or your browser copy tool to copy the dynamic tag to your clipboard.

 

3. Open your email design in the editor or your hand-coded email

 

4. Paste the dynamic tag into any text block

 

5. Save your design

 

 

General guidelines to hand-code tags for content blocks

Dynamic content blocks use the same methodology and best practices that other dynamic tags use. Instead of adding the tag inside a text block, you will add the dynamic tag straight into the HTML code.

 

Example of simple dynamic tag

{{if(##City## == Seattle) then (insert statement) endif else() endelse}}

 

Your email content block becomes the statement that will be enclosed in your dynamic tag’s parentheses. In the editor, your content block is a container built through a series of div tags.

 

Example of a text block container

  <div data-wfcb="text" data-wflabel="Text" class="text-block" draggable="false"
  id="text-block-1510526568694">
<div data-wfedit="html">
<p align="left">To start designing, drag elements from the Blocks tab and drop them here. Then rearrange or delete them as needed. Click here when you're ready to add your text content, <a href="http://www.wordfly.com" target="_blank">insert links</a>, and <strong><em>apply styles</em></strong>.</p>
</div>

 

Locate the content block container in your HTML and wrap the block in the dynamic tag with the entire block code inside the parentheses, the same way you would add a single word or phrase in tags.

 

Example of dynamic tag in code

  {{if(##City## == Seattle) then (<div data-wfcb="text" data-wflabel="Text" class="text-block" draggable="false" id="text-block-1510526568694">
<div data-wfedit="html">
<p align="left">To start designing, drag elements from the Blocks tab and drop them here. Then rearrange or delete them as needed. Click here when you're ready to add your text content, <a href="http://www.wordfly.com" target="_blank">insert links</a>, and <strong><em>apply styles</em></strong>.</p>
</div>) endif else() endelse}}

 

Make sure your tag avoids common issues that cause tags to break. Before getting started, we recommend reviewing this article:

 

Hand-code your tag around a content block

After reviewing the general guidelines, follow these steps to make a content block dynamic in your email design.

 

First, create and copy your dynamic tag.

1. Go to Subscribers > Dynamic Tags

2. Use the dynamic tag generator tool to create your unique if/then conditional tag

Learn how to create your dynamic tag

3. Copy your dynamic tag

We recommend pasting the tag into a plain text editor since the next steps require copying other content.

 

Second, add the tag to your email design.

1. Click on the content block you would like to make conditional

 

2. On the edit panel (left side), click STYLES

 

3. Copy the container ID

 

4. In the lower left corner, select the HTML tab

 

5. Click anywhere in the HTML and search for the container ID

Tip: The keyboard command for search is "Ctrl+F"

 

6. Add a return above your container <div>

 

7. Paste in the dynamic tag up to the opening parentheses

 

8. Add a return below your container's closing </div>

 

9. Paste in the remainder of the dynamic tag from the closing parentheses

 

10. Close the HTML tab by clicking the tab again

 

11. Save your updates

 

 

Test your dynamic tags

Update your Default Test List to send a personalized test email or use Subscriber Preview to view your dynamic tags inside any campaign. Learn more

 

 

 

Was this article helpful?

Comments

0 comments

Article is closed for comments.