Instant indexing allows you to instantly index pages when they are visited by your users. It is Instant indexing uses a Javascript code snippet that runs when a page is loaded , which and sends a ping to our crawlers crawler instructing it to re- index the webpage.
To set up instant indexing on your website add the instant indexing snippet, mention including your Project Account and Collection details and add the code in the ID, to the <head> section of your website.
Once installed, your site the ping-back will be fired on page load and new content will be added and updated automatically.
Code Block |
---|
<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> |
...
Info |
---|
If you want to confirm the instant indexing script above is working as expected look for |
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:
Code Block |
---|
var _sj = _sj || []; |
in the ping-back with:
Code Block |
---|
window._sj = window._sj || [] |