Dynamic Tags: making sure dynamic tags work (best practices)

Dynamic tags are a great option for personalizing your email template content easily without sending out multiple templates with different information.


Topics covered in this article:

Best practices for dynamic tags

Testing your dynamic tags

Learn more about dynamic tags and personalization

 

 

Best practices for dynamic tags

Pay attention to your data fields in dynamic tags

Dynamic tags always use data fields to key off the if/then logic. Data fields can also be used in the "then" statement to further personalize the content being delivered. In order for the data field to work properly it must be added exactly as it is in Subscribers > Data Fields. Data fields are case sensitive. Your casing must match.

 

Example of dynamic tag with a data field providing statement data:

{{if(##Subscriber## == 2013) then (We look forward to seeing you at ##Next Show##.) endif else() endelse}}

 

HTML formatting in dynamic tags

WordFly supports valid HTML within dynamic tags. Highlight statement text in the dynamic tag and apply your styles (italics, bold, headline etc) as you normally would apply to styles to text. Make sure to read through all of the best practices listed in this post to understand the boundaries.

 

Example of dynamic tag with bold formatting applied to the statement portion:

{{if(##Subscriber## == 2013) then (We look forward to seeing you at ##Next Show##.) endif else() endelse}}

 

You can also use a data field to pull HTML into dynamic tag statements. All the same best practices apply. Learn more about HTML and data fields.

 

Example of a dynamic tag with a data field providing HTML to fill in the content:

{{if(##Subscriber## == 2013) then (We look forward to seeing you at ##Next Show##.) endif else(##Non Subscriber upsell language##) endelse}}

 

Links in dynamic tags

Use valid HTML to add a link in your dynamic tag.

 

Do this
{{if(##Continent## == Australia) then (<a href="https://wordflyevents.webex.com/wordflyevents/onstage/g.php?t=1">Register</a>) endelse}}

Don’t do this
{{if(##Continent## == Australia) then (<"https://wordflyevents.webex.com/wordflyevents/onstage/g.php?t=1">Register)endelse}}

 

Spaces can sometimes be interpreted as "%20" which might break the tag.  

 

Do this
{{if(##City## == Seattle) then (http://media.wordfly.com/mctommerson/City/Seattle_neighborhood_party.png) endif else(We will let you know when a Neighborhood party is coming to your city) endelse}}

Don’t do this
{{if(##City## == Seattle) then (http://media.wordfly.com/mctommerson/City/Seattle%20neighborhood%20party.png) endif else(We will let you know when a Neighborhood party is coming to your city) endelse}}

 

Tip: In your email campaign, use Testing > Full Review to check links in dynamic tags and dynamic links. If there's an error, the link won't track.

 

Remove any breaking special characters

Symbols "&" and "()" and “!” can break your dynamic tag. Try using dashes instead of parentheses and periods instead of exclamation points.

 

Do this
{{if(##First Name## == ) then (Hello,) endif else(##First Name##) endelse}}


Don’t do this
{{if(##First Name## == ) then (Hello!) endif else(##First Name##) endelse}}

 

Adjust spacing between conditions

When paragraph tags surround conditional content there is default spacing in the paragraph style that will add space to each condition.

To remove this space from the paragraph style:

1. From your block, click on STYLES.

2. Select the paragraph element.

3. Select Adjust spacing.

4. Remove any margin that is set. There is default margin bottom on all paragraphs.

 

 

Making dynamic tags longer

You can manually edit tags to make them longer since our tool only allows 4 alternates. Follow the pattern of the tag to extend it.

 

Basic tag example:

{{if(##DataField## == A) then (A statement) endif elseif(##DataField## == B) then (B statement) endelseif elseif(##DataField## == C) then (C Statement) endelseif elseif(##DataField## == D) then (D Statement) endelseif else(Statement if no conditions are met) endelse}}

 

Here's how the tag works:

  • The tag begins with If to start the condition and uses then to provide the first statement if that condition is met.
  • To key off the second condition, the tag uses endif elseif, which ends the last statement and brings in the second if/then condition+statement.
  • To key off the third condition, the tag uses endelseif elseif, which ends the second if/then combination and from here you can build on the tag.
  • Continue extending the tag after this one by placing a space after the last statement and pasting in endelseif elseif(##DataField## == X) then (X Statement).
  • Once you have extended the tag to your desired length you will use endelseif else(Statement if no conditions are met) endelse as the last portion of the dynamic tag. This ends the conditions and gives one last statement to use if none of the conditions are met.

 

Extended tag example:

{{if(##DataField## == A) then (A statement) endif elseif(##DataField## == B) then (B statement) endelseif elseif(##DataField## == C) then (C Statement) endelseif elseif(##DataField## == D) then (D Statement) endelseif elseif(##DataField## == X) then (X Statement) endelseif elseif(##DataField## == Y) then (Y Statement) endelseif elseif(##DataField## == Z) then (Z Statement) endelseif else(Statement if no conditions are met) endelse}}

 

Editing existing tags

You can manually edit Dynamic Tags without making a new tag. You can do this directly in your email design. You can also have the tag in separate email designs and edit them completely differently without having one change the other.

 

Confirm the dynamic tag in the text version of your email, too

Dynamic tags will work in your text version but should always be tested.

 

 

 

Testing your dynamic tags: Use Subscriber Preview or update your Default Test List data to send a personalized test

 

Test your dynamic tags work in any email campaign under the Testing tab in one of two ways:

  1. In your email campaign, go to Testing > Subscriber Preview.
  2. Or, update your Default Test List to send a personalized test.

 

Learn more about these options in this support post: Testing personalization with Subscriber Preview

 

 

 

Learn more about dynamic tags and personalization

 

We've put together support posts about all our personalization features.

 

 

 

Have more questions? Submit a request
Powered by Zendesk