Before you begin
- Confirm that Algolia has sent you the Radar script for your site.
- Add the script only to the agreed website, language, and currency.
- Avoid changing your websiteโs HTML during the data collection period, because changes can affect the quality of the event data.
Add the script directly to your site
Add the Radar script directly to pages on your live site. Add it to the<head>tag on every page in your shopping journey, including:
- Search pages.
- Search results pages.
- Product detail pages.
- Checkout pages.
If your site uses a Content Security Policy (CSP), add these endpoints to the allowlist:
https://cdn-us.algoliaradar.comorhttps://cdn-eu.algoliaradar.com: loads the Radar script.https://insights.algolia.io/1/searches: receives search events.https://insights.algolia.io/1/events: receives click, shopping cart, and conversion events.
Install with Google Tag Manager
- Open Google Tag Manager.
- Select the container for the website where you want to add Radar.
- On the Overview page, select New Tag.
- Select Triggering.
- Select All Pages.
- Select Tag Configuration.
- Select Custom HTML.
- In the HTML field, paste the Radar script that Algolia sent you.
- Name the tag. For example, enter
Algolia Radar. - Select Save.
- Submit and publish the container.