WordPress Plugin

Sailthru’s WordPress plugin has been created to get you up and running with your Sailthru account quickly. It’s core features will allow you to add our Horizon JavaScript, configure Scout and Concierge from withing the WordPress admin interface. It’s compatible with both the WordPress VIP and as a downloadable plugin.

Where do I get it?

The plugin is available in to download as a zip file from our GitHub repository.

WordPress VIP platform users already have the plugin available to them within their installation.

Configuring the plugin

Once you have enabled the plugin, you will need to add your API Key and Secret and a few other pieces of information. This should only take a few minutes and once completed Horizon will be added to all your pages.

Once the plugin has been enabled click on the “Sailthru” link on the side menu of the WordPress admin. The first time you do this you’ll be asked to add your key and secret.

NOTE: If you have whitelisted IPs in your Settings page, then you will need to add an IP for your WordPress site (if it’s not already included in the whitelisted IPs). If you don’t do this, you will encounter an error when you setup the plugin (as it won’t be able to fire a template API call to select the WP template). If you are not whitelisting IPs, then this is not necessary.

Once you’ve saved the information you’ll be asked what template you wish to associate with the WordPress installation. You’ll need to create a template in your Sailthru account with {subject} as the subject line. In the body of the email place the zephyr variable {body}. This will be replaced with email content from wordpress.

The VIP platform has disabled the overriding of all emails via Sailthru, so although this step is necessary for the setup the feature is disabled. This requirement may be removed in later upgrades.

Sailthru Meta Tags

Simply by adding your Sailthru account settings you’re already ready to go with Horizon. The plugin will automatically add the necessary JavaScript to the footer of your theme. We’ll also automatically add the necessary Sailthru Meta Tags to your page for you. When you tag a piece of content in WordPress you won’t have to worry about adding those meta tags to the post, it’ll be there for you.

<meta name='sailthru.date' content='2011-09-20 01:25:16' />
<meta name='sailthru.title' content='This is a Sticky Post' />
<meta name='sailthru.tags' content='announcement, panache' />
<meta name='sailthru.description' content='This is an example of a sticky post. You can read more about them here.' />

For tagging content the plugin will use the default WordPress tags field available when you are creating or editing content. For more control there is also a Sailthru Tags field on the page which will be used when it has comma separated tags present.

If neither the WordPress tags field or Sailthru Tags field are completed then we will default to the category selected in the post.

Expiring Content
Sometimes you do not want your content displaying in future recommendations. So for each post you’ll be able to set the content expiry date. This will tell Sailthru to remove this piece of content from Sailthru recommendations after the set date.

Enabling Concierge

Concierge is a Horizon-powered on-site recommendation tool, allowing a small “slider” to appear in a user’s browser window at the end of an article. The slider will suggest another story based on a user’s interest.

To enable Concierge on your site click on the Concierge tab and check the box and click save. Once enabled you’ll be presented with a simple form to configure Concierge behaviour.

For full documentation on Concierge options check out the Concierge documentation page. The plugin simple makes those options available via a form.

Enabling Scout

Scout is an on-site tool that displays relevant content to users when viewing a particular page. The tool is powered by Sailthru’s Horizon intelligence, which gathers data on your users’ individual interests, based on activity on your website, mobile device and tablet, all tied to each user’s email address.

To enable Scout on your site click on the Scout tab and check the box to enable it. You’ll be presented with a screen allowing you to configure the options via a simple form


The Sailthru plugin provides two widgets. The first “Sailthru Recommends” is a widget that displays recommended content via Scout. If you’ve enabled Scout then you’ll be able to use this widget anywhere your theme allows you to place content. The content provided by Sailthru Recommends is powered by Horizon and so recommends content based on the horizon domain field that you provide in the plugin settings screen.

Subscribe Widget

We’ve also provided a simple “Subscribe” widget which you can use to easily provide signup for newsletters. You’ll be able to add users to one or more lists when they sign up. Quick and easy.

By default the widget displays an email field but you can add additional fields to the widget if you’d like to gather more information from your subscribers. To use this feature click on the Subscribe Widget Fields in the Sailthru admin screen.

The screen displays any fields you have already configured and a form to easily add new ones. Any fields added to the admin will be available to all widgets. You can add a number of different HTML fields that can be used for different types of information, for example a “select” field can be used for data like gender.

Text fields are used to collect information where the user will type in their answer, select fields are drop down fields that can be used for fields like State or Country. Hidden fields are not visible to the user but allow you to gather information that might be important to you such as the source of the campaign.


The subscribe widget is available as a shortcode too using the following syntax.

[sailthru_widget fields="names,of,fields" sailthru_list="list_name"]
Parameter Description Values
fields Comma separated list of field names as displayed on the Subscribe Widget Fields admin screen. field name(s)
modal Display widget as a modal window (optional)  true  or false
sailthru_list comma separated list of lists to add the user to list name(s)

You’ll find both these widgets in WordPress’s widget section.


WordPress themes provides a method to override some of the plugin’s default features. For example you may not want to include a specific sailthru tag like a date. Or you want to combine the sailthru meta tags with the category tags.

The plugin has three tags to allow developers to customize the output of horizon meta tags. To use the filters you can use these filters within your theme’s functions.php file. If the file does not exist you can create it. For more information see the WordPress documentation on filters.

sailthru_horizon_meta_tags_enable return boolean false to prevent the horizon meta tags from outputting. Useful when you wish to rely on the fall back meta tags or manually output your own.

sailthru_horizon_meta_tags is supplied an array of the name/content attributes of the meta tags. This is helpful if, for example, you need to update the value of sailthru.author when using a plugin like co-authors-plus, or for swapping out sailthru.tags for categories or a terms from a custom taxonomy.

sailthru_horizon_meta_tags_output this filter acts on each meta tag, allowing you to edit each html tag.

See the examples below for more context.

// the below can be included in the theme's functions.php Only include the filters you need.

// Filter to be used to manipulate all the tags, for example to combne category and wp tags with sailthru tags
add_filter('sailthru_horizon_meta_tags', 'sailthru_combine_horizon_meta_tags',  1);
function sailthru_combine_horizon_meta_tags($tags) {
    // category of post
    $category = get_the_category();
    //wordpress tags of post
    $wp_tags = get_the_tags();
    // manipulate the information in the $tags variable as they wish and return it
    return $tags;

// disable the horizon tags, useful if you are creating the tags yourself.
add_filter('sailthru_horizon_meta_tags_enable', 'sailthru_enable_horizon_tags');
function sailthru_enable_horizon_tags() {
  return false;

// Filter to be used to manipulate an individual tag. For example this can be used to remove a tag
add_filter('sailthru_horizon_meta_tags_output', 'sailthru_filter_tag');
function sailthru_filter_tag($tag) {

    if (strpos($tag, 'sailthru.date')) {
       // this will return false and so not display the sailthru.date meta tag
       return false;
    return $tag;