All Collections
Add dynamic content to your emails
Adding a dynamic feed to a Copernica template
Adding a dynamic feed to a Copernica template

This article describes how to create an email feed touchpoint for Copernica and how to add it to a template.

Christiaan Proper avatar
Written by Christiaan Proper
Updated over a week ago
  • Note: adding dynamic feeds are currently only available in the previous version of the touchpoint builder. You can find this option below in the current touchpoint builder.

Make sure you have a smart campaign set up where you can add the email touchpoint to. You can leave the audience targeting blank, but make sure you add the right conversion(s) to the campaign.

Create a touchpoint with the type Mail > Feed:

In the next step of creating the touchpoint, you can filter or select which content can be shown to the recipients of the email which contains the feed. Datatrics will show the most potential content to every recipient.

Next, head back to the campaign and click on "view" when hovering your cursor on the touchpoint.

You will need the code above (red arrow) later on.

Now head over to Copernica Publisher and create a template you want to add the dynamic feed to (you can do this in the section "E-mailings").

After creating your template, go to the "Style" tab and create a new XSLT named "DatatricsItem"

Paste the following code in the XSLT:

<xsl:stylesheet version="1.0" xmlns:xsl="">
<xsl:template match="items">
<!-- start the items -->
<xsl:call-template name="item" />
<xsl:template name="item"> ย 
<xsl:for-each select="item">
<div class="item">
<div><span class="title"><a href="{url}"><xsl:value-of select="name" disable-output-escaping="yes" /></a></span></div>
<a href="{url}"><img src="{image}" height="100" width="100" /></a>
Van: <xsl:value-of select="original_price" disable-output-escaping="no" />
Voor: <xsl:value-of select="special_price" disable-output-escaping="no" />
<div class="description"><xsl:value-of select="description" disable-output-escaping="no" /></div>

Now go back to the template you just created and replace the content you want to make dynamic in the template source with the following code. You need to change the <<projectid>> and <<touchpointid>> with the values of the code you got from the touchpoint you made in Datatrics (the code with the red arrow above).

{capture assign=feedurl}<<projectid>>&touchpoint=<<touchpointid>>&output=xmlitems&profileid={$}&profilesource=Copernica&limit=3{/capture}
{loadfeed feed={$feedurl} xslt="DatatricsItem" personalizable="true"}

Template before (example):

Template after (example):

That's it, you can now find the dynamic content under the "Document Example" tab. You can change the styling of the dynamic content in the XSLT "DatatricsItem" we created before. If you want to change the amount of items, change the "limit=3" in the feed URL in your template with any amount you want.

Did this answer your question?