Behavioral Custom Headlines

Setting up a completely customized set of headlines using our Horizon behavioral-targeting technology is easy. Let's walk through the basic process with an example.

Step 1: Design The Template

Let's suppose we've decided to show five custom headlines in a very simple format. We want the subject line to contain the lead story, which will contain a photo. The other stories will be smaller.

<div>
  <img src="{content[0].image}" width="300" height="200" />
</div>
 
<div style="font-size:24px">
  <a href="{content[0].url}">{content[0].title}</a>
</div>
 
{foreach slice(content,1) as c}
<div>
  <a href="{c.url}">{c.title}</a>
</div>
{/foreach}

So far, this is no different than an ordinary template.

Step 2: Set Up A Data Feed

We need to provide a data feed of all available content, so that Horizon can select which five are going to be the best for the particular user. This data feed will be pulled at the send time and passed to the horizon_select() function for each user to pick the stories.

You have a few options for building a data feed. The easiest, if you have Horizon Javascript placed on your site already, is to use the content that Sailthru has automatically been spidering and already has in the Sailthru database. You can do this with the "Add Content Feed" button. Or, you can create your own feed.

Either way, the feed should be in Sailthru Content Feed format as documented here: data-feeds

In the feed, there are two special fields: tags and weight.

tags contains a comma-separated list of the Horizon interest tags that relate to that piece of content. weight is optional and contains a weight multiplier to assign to the item. If it is not provided, it defaults to 1.

Step 3: Make Your Template Behavioral

Go to the Advanced tab in the template editor.

Set the Data Feed URL of the blast to the URL of your data feed.

The behavioral selection happens in the Setup section. This is a special block of code that runs once per user. To make it pick the top five pieces of content for a user, use this line:

{content = horizon_select(content,3)}

We want the subject line to have the top story in it, so set the Subject to {content[0].title}

Set up the rest of the template (From Name, etc), as normal.

That's It!

You now have a completely dynamic template. No further changes will be required, since it relies on the data feed to populate the content.

You can simply repeat sending this blast using the Create From… button to make a copy of it, or use the Recurring Campaign Manager to set it up to send every day.

 
/var/www/docs.sailthru.com/htdocs/data/pages/behavioral-headlines.txt · Last modified: 2011/08/23 12:24 by Ian White
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki