Horizon Data Collection Setup

New to Horizon? Learn more first.

Step 1: Contact Us & Horizon CNAME

  • First of all, email support@sailthru.com to enable your account for Horizon data tracking.
  • Second, Establish a CNAME in your DNS zonefile
HostSubdomain
horizon.yourdomain.comhorizon.sailthru.com
  • Enter your full horizon subdomain, i.e. horizon.yourdomain.com, under the "Horizon Subdomain" field in your Sailthru Account settings.

Step 2: Content

Horizon works best when it has content to suggest to your audience. There are multiple was to tell Horizon what content your site has to offer:

  • The Concierge (Horizon-powered on-site tool) setup wizard allows you to add URLs directly to be spidered
  • You can also use the content API call to push in content
  • Any page that you place the Concierge Javascript on will automatically be spidered

Sailthru Meta Tags

Horizon will crawl suggested pages input by you or found by the spider. Similar to search bots, Horizon's spider will observe particular meta tags to assist in determining the relevancy of an article to a given user. The Horizon JavaScript also measures content popularity by page view, further weighting content for use in Horizon-powered products.

  • Add Sailthru meta tags to the content pages of your site. The tags in sailthru.tags should correspond broadly to the interests of users: see tags for more on how to select good tags. Example:
<meta name="sailthru.date" content="Tue, 05 Apr 2011 23:26:57 -0400" />
<meta name="sailthru.title" content="Belichick named top coach in the NFL" />
<meta name="sailthru.tags" content="sports, football, nfl, new-england-patriots" />

For more on these tags, see meta tags.

Note: If you already have suitable meta tags in <title>, keywords and date, you don't need to do this.

The easiest process is to use the Concierge setup wizard while you're testing, and let the Javascript take care of things after you go live.

Using meta tags to block search engines or robots? You'll need to grant Sailthru's spider permission to crawl your site. Learn how on our meta tags page.

Step 3: Place The Javascript

Update the Code with Your Domain

Copy the below code and replace the reference to horizon.example.com with the actual Horizon subdomain you have chosen.

Add the Code to Your Site

Place the Javascript tracking code on every page on your site that you wish to track. The Javascript can be placed as late as possible on the page – right before the closing </body> tag is fine. Following snippet loads Horizon JavaScript in asynchronous / non-blocking way. This is the recommended approach for embedding horizon.

But sometimes, it may not work due to external JavaScript resources like: external ads, other tracking resources and so on during which you should use synchronous loading. (Refer to Synchronous Loading section below)

<!-- Sailthru Horizon --> 
<script type="text/javascript">
    (function() {
        function loadHorizon() { 
            var s = document.createElement('script'); 
            s.type = 'text/javascript'; 
            s.async = true;
            s.src = location.protocol + '//ak.sail-horizon.com/horizon/v1.js';
            var x = document.getElementsByTagName('script')[0]; 
            x.parentNode.insertBefore(s, x);
        }
        loadHorizon();
        var oldOnLoad = window.onload;
        window.onload = function() {
            if (typeof oldOnLoad === 'function') {
                oldOnLoad();
            }
            Sailthru.setup({
                domain: 'horizon.example.com',
            });
        };
    })();
</script>

Sailthru.setup() invocation requires object literal as a single parameter.

Required Properties
ParameterDescriptionExample
domain Horizon domain horizon.example.com
Optional Parameters
ParameterDescriptionExampleDefault
spider Set to false if the current page should not be spidered true or false true
concierge Enable or disable concierge recommendation in the page. By default, it's false. If set as true, default concierge values will be used. Learn more about Concierge parameters true or false or {threshold: 1200, delay: 500} false
cookieDomain Custom cookie domain if you don't want to use default location value window.location.host domain.com Existing domain of the page. For example: if the domain is www.sailthru.com, same value will be used as cookieDomain
Deprecated Parameters
ParameterDescriptionExampleDefault
tags Use custom tags instead of page meta tags sports, football Extract sailthru.tags values from meta section of a HTML page if given else, use standard keywords tags values
Example scripting using multiple parameters
Sailthru.setup({
	domain: 'horizon.example.com',
	concierge: {
		delay: 500,
		offsetBottom: 20,
	}
});
Synchronous Loading
<script type="text/javascript" src="http://ak.sail-horizon.com/horizon/v1.js"></script>
<!-- if loading for secure domain, use: https://ak.sail-horizon.com/horizon/v1.js -->
<script type="text/javascript">
$(function() {
    // Sailthru Concierge
    if (window.Sailthru) {
        Sailthru.setup({
            domain: 'horizon.example.com'
        });
    }
});
</script>

Next Steps

Harness the full power of Horizon with on-site tools. You can learn more about setting them up below.

  • Concierge - Keep users on site longer by providing a recommended article as they finish the one they're reading.
  • Scout - Provide users an entire page of recommended articles based on their Horizon history. You can also use this tool as a smaller feature box for "suggested stories" or "recommended products."
 
/var/www/docs.sailthru.com/htdocs/data/pages/horizon/setup.txt · Last modified: 2012/04/05 12:36 by Danny
 
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