If you currently use Google Tag Manager, below provides instructions on how to install Sajari Site Search and Personalization to your website.
If you haven't signed up with Sajari yet, you can sign up here. Once you've created a Collection, you can navigate to the Search Interface section to generate a snippet of code which you will add as per step three below.
Sajari is currently a "custom HTML tag", you can select this when adding a new tag as per below:
Sajari is typically a global install, so you can activate across your entire site as per below. Don't worry about hiding various pages from your site search, you can easily exclude them later using "crawling rules".
You can access your install code from within the app itself (if logged in). Or you can cut and paste directly from below.
Below is the generic install code to connect your website to Sajari. This code is asynchronous and will not slow your site down. It will also not interfere with existing search or recommendations functionality. This is just a base install to connect instant indexing of your site content and to enable other functions to be installed when you choose to do so.
In the below code, please replace <PROJECT> and <COLLECTION> with your actual company and collection names.
<script type="text/javascript">
window._sj = window._sj || [];
_sj.push(['project', '<PROJECT>']);
_sj.push(['collection', '<COLLECTION>']);
(function () {
var sj = document.createElement('script');
sj.type = 'text/javascript';
sj.async = true;
sj.src = '//cdn.sajari.net/v2/js/sj.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(sj, s);
})();
</script>
Once you've completed the above steps, your content will begin to index and build statistics around popularity, recency, etc to optimize your search and recommendations. You can then add simple site search plugins and/or recommendations easily by following instructions here. Alternatively you can build advanced interfaces using our ReactJS SDK, which offers much greater functionality including facets, autocomplete and more.