Tagging email documents - cheat sheet

Email document tagging can be done code mode of the Circle email editor, or in any editor of your choice.

Remember, emails can be in HTML and/or text formats. Both formats support the nesting of XMPL code. However, due to the limitations of text emails, some HTML email features are not supported in text emails.

Supported in HTML Email

Text content objects

Below are examples of how to tag text content objects. A content name with a space must be enclosed in single/double quotes and square brackets.

{{xmp.r['My TextAdor']}}

{{xmp.r["My TextAdor"]}}

{{xmp.r.MyTextAdor}}

XMPieRecipientKey content object

{{xmp.r.XMPieRecipientKey}}

Graphic (Image)

Using graphic assets and a graphic content object:

<img xmp-image-asset="xmp.r.MyAdor"/>

Using a URL in Text content object:

<img xmp-image-asset="xmp.r.MyAdor"/>

<img src="{{xmp.r.MyAdor}}"/>

Style

To switch the class of an HTML element based on the style content object, have the style content object return the value of the desired class. In the example below MaleStyle or FemaleStyle or NoGenderStyle are the value set for the style content object. Set the xmp-class to the content object. Note that email supports only class selectors (no expressions).

<html>

<head>

<style xmp-email-style="true">

  .MaleStyle {color: blue;}

  .FemaleStyle {color: red;}

  .NoGenderStyle {color: black;}

</style>

</head>

<body>

 <h2>Style</h2>

 <div xmp-class="xmp.r.GenderStyle">Text style varies per recipient</div>

</body>

Visibility

Emails sent with XMPie Email Services (XES) can contain visibility content objects. Visibility can be used on either div or span tags. The content object must by a visibility content object, and the value can only be true or false. Expressions are not allowed.

<div xmp-show="xmp.r['IsStudent']">Show if IsStudent is 'true'.

</div>

or

<span xmp-show="xmp.r['IsStudent']">Show if IsStudent is 'true'.

</span>

Create a link to an address supplied by a content object.

<a xmp-href="{{xmp.r['Blog']}}">users blog</a>

Link Tracking Name

Requires XES version 3.5 and above. Circle automatically assigns each link a tracking name. If you wish you may define your own tracking name to easily identify specific links in your email.

<a xmp-tracking-action="ViewInBrowser" href="{{XMPie.Email.ViewInBrowser}}">View in browser</a>

Link tags can include the numbers 0–9, the letters A–Z (both uppercase and lowercase, English only), hyphens (-), and underscores (_). Spaces and special characters are not allowed.

Disable Link Tracking

Requires XES version 3.5 and above. If tracking email activity is enabled, all links in the email are tracked. To prevent tracking of a specific link, add

<a xmp-no-track="1" href="{{XMPie.Email.ViewInBrowser}}">View in Browser</a>

Note that "1" indicates no tracking and it is not a customizable value.

View in Browser

<a xmp-href="{{XMPie.Email.ViewInBrowser}}">View in browser</a>

Web Content Objects

<a xmp-href="{{xmp.r['XMPie.Web.W1']}}">Visit the website</a>

 

Email Footer (for anti-spam legislation e.g. CAN SPAM act)

<div style="font-size: 9px; color: #6b6b6b;">UNSUBSCRIBE<br />

If you do not wish to receive future email publication from us please <a xmp-href="{{XMPie.Email.Commercial.UnsubscribeURL}}">click here</a>.<br />

<br />

CONTACT US<br />

You can reply to this email, or contact us via postal mail at:<br />

{{XMPie.Email.Sender.BusinessName}}<br />

{{XMPie.Email.Sender.Address}} {{XMPie.Email.Sender.City}}, {{XMPie.Email.Sender.State}}, {{XMPie.Email.Sender.ZIPCode}} {{XMPie.Email.Sender.Country}}</div>

Note that all these content objects use the following format:

{{XMPie.Email.Sender.Address}}

Unsubscribe

<a xmp-href="{{XMPie.Email.Commercial.UnsubscribeURL}}">Unsubscribe</a>

PDF on Demand

Create a link to a PDF on Demand touchpoint (where P1 is the touchpoint Friendly

ID). The PDF on Demand shows the data available at the time the email was sent.

<a xmp-href="{{xmp.r['XMPie.PDF.P1']}}">View the PDF</a>

Table content object

<table>

   <tr>

<th>First Name</th>

<th>Last Name</th>

   </tr>

   <tr xmp-repeat="Department in xmp.r.Departments">

 <td>{{Department.FirstName}}</td>

<td>{{Department.LastName}}</td>

   </tr>

</table>

Or

<ul>

    <li xmp-repeat="item in xmp.r['Fuel Consumption']">

        {{item.Date}}:  {{item.Liter}} Liters                       

    </li>

</ul>

 

Supported in Text Email

Text content object

Same as with HTML.

{{xmp.r.myTextAdor}}

Visibility

<text xmp-show="AdorName1">Lorem Ipsum.</text>

The span tag also works in this case.

Style content object

Not supported in Text emails.

Graphic content object

Not supported in Text emails.

Table content object

<text xmp-repeat="Department in xmp.r.Departments">

{{Department["First Name"]}} {{Department["Last Name"]}}

</text>

Link content object

Link (href tag) is not available in a Text email. To write the URL as text, use the link content object as if it was a text content object:

{{xmp.r.XMPieRURL}}

Link Tracking

Not supported in Text emails.

Nesting

Nesting is allowed.

<text xmp-show="xmp.r['IsStudent']">">{{FirstName}} , you are entitled to 20% discount <text xmp-show ="xmp.r['IsGraduateStudent']"> and a second item for 50% discount</text> </text>