Google Tag Manager Integration
Tracking with Google Analytics or Google Tag Manager
Configure the tracking object in your ss360Config to enable external tracking:
var ss360Config = {
tracking: {
providers: ['GA'],
searchCallback: function(query) {
return true;
}
}
};
Supported providers: 'GA' (Google Analytics), 'GTM' (Google Tag Manager).
This adds a ?ss360Query={query} parameter to search result pages. To view search terms in Google Analytics, configure the URL query parameter as described in Google's documentation.
Setting Up via a GTM Container
- In Google Tag Manager, create a new tag and select Custom HTML as the tag type.
- Add the code snippet below, replacing
mysiteid.comwith your site ID (found under Account > General) and configuring yourss360Configparameters. - Set the trigger to All pages, save, and publish.
Using the bundled script (recommended):
<script async src="https://js.sitesearch360.com/plugin/bundle/0000.js"></script>
Replace 0000 with the code generated from the Design & Publish section of your project.
Using the legacy script:
window.ss360Config = {
siteId: 'mysiteid.com',
searchBox: {/*...*/}
};
var e=document.createElement("script");
e.src="https://cdn.sitesearch360.com/v15/sitesearch360-v15.min.js";
document.getElementsByTagName("body")[0].appendChild(e);