Generate a Spotter API token
You can generate a Spotter API token from the Integration Settings Page in your Snitcher dashboard. Please note that the domain of the website profile you generate the API token for will automatically be whitelisted for usage with the generated token. The API token cannot be used from any other domain.
Spotter API tokens are publishable tokens, only your own domain is whitelisted for usage so they can be savely exposed on the client-side.
Install on your website
The Snitcher tracking script (which is probably already installed on your website) contains all the logic required to make calls to the Spotter API. All you need to do to start using Spotter, is define your Spotter API token and provide a javascript callback function that should receive the identification data. You can do define this on thewindow.SpotterSettings
object.
Make sure you define your callback function before you configure the window.SpotterSettings
object, and make sure you define your window.SpotterSettings
object before the Snitcher tracking script is loaded.
Below is a sample code snippet to show how to configure Spotter, and a sample callback function to illustrate how you can work with the identification data:
Make sure you define your callback function and set the
window.SpotterSettings
object before your Snitcher tracking script is included.