Skip to main content

Traffic-driving templates

Templates are defined on the account level and can be reused across sites. You can have multiple templates: In-feed, In-article, Bottom etc.

Templates are rendered without wrapping to Iframe; therefore, they inherit website CSS. So you can and should reuse layout of your content tiles. In traffic drivers templates Contimo uses lodash templates.

There is an example of the trivial traffic driving template:

<a href="<%= article_url %>">
<% if (image_url) { %>
<img src="<%= image_url %>" alt="<%- headline %>" />
<% } %>

<h1><%- headline %></h1>
<% if (teaser) { %>
<p><%- teaser %></p>
<% } %>
</a>

You have the following fields available:

  • image_url – URL to traffic driving image
  • headline – traffic driver headline
  • headline – traffic driver teaser
  • article_url – URL to the Publication
  • site – full information about website
{
"url": "https://example.com",
"name": "Dummy website",
"primaryColor": "#333",
"secondaryColor": "#aaa",
"logoImageId": "imageId_of_logo",
"properties": {
"arbitrary_property": "value"
}
}