How to setup instant indexing <test>
Instant indexing allows you to instantly index pages when they are visited by your users. Instant indexing uses a Javascript snippet that runs when a page is loaded and sends a ping to our crawler instructing it to index the webpage.
To set up instant indexing on your website add the instant indexing snippet, including your Account and Collection ID, to the <head> section of your website.
Once installed, the ping-back will be fired on page load and new content will be added automatically.
<script type="text/javascript">
var _sj = _sj || [];
_sj.push(['project', 'ENTER YOUR ACCOUNT ID']);
_sj.push(['collection', 'ENTER YOUR COLLECTION ID']);
(function () {
var sj = document.createElement('script');
sj.type = 'text/javascript';
sj.async = true;
sj.src = '//cdn.sajari.com/js/sj.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(sj, s);
})();
</script>
If you want to confirm the instant indexing script above is working as expected look for https://re.sajari.com/
in the Network traffic of the browsers developer tools. The page will only be crawled if the Conditions below are met
Conditions:
Pages are only updated when certain fields are updated (title, description, keywords, modifiedDate).
The pages must be visited (i.e. the page and the script are loaded) within 30 minutes of updating or being added for it to be indexed
Additional details:
Behind the scenes we check every 15 minutes to see if a instant index ‘ping’ has occurred. If the conditions above have been met the request then enters the crawlers queue, so the actual indexing usually occurs within 1 hour of the original request.
If you are serving this tag to the page dynamically for example via your ad server it can break the mechanism if our script is ‘wrapped’. To test this go to a page where the ping-back should be firing, open the browsers developer tools and in the console type
SJ
(see image below)
If SJ
appears in the drop down menu like the image above then the ping-back has installed correctly. If not then try replacing this line of code:
var _sj = _sj || [];
in the ping-back with:
window._sj = window._sj || []