Integrating the main iAdvize tag allows you to display the chat on your website, ensure conversation continuity across pages, and activate the Copilot Shopper to detect products viewed by your visitors. This guide explains how to manually add the tag to ensure a smooth and optimized conversational experience.
1. Integrate the main tag into your website’s code
-
Add the script to all pages of your website
Copy and paste the JavaScript code just before the
</body>
tag on every page of your website.
Placing it there ensures fast loading and avoids impacting your site’s performance. -
Integration example
<!-- START IADVIZE LIVECHAT -->
<script>
// Configuring the iAdvize tag
window.iAdvizeInterface = window.iAdvizeInterface || [];
window.iAdvizeInterface.config = {
sid: XXXX
};
// Initializing custom data
window.idzCustomData = {
product_id: 'sku_123' // Unique product identifier, only on product pages.
};
</script>
<script async src="//halc.iadvize.com/iadvize.js" ></script>
💡 Replace XXXX with the site ID provided in your iAdvize interface
💡 Replace sku_123 with your actual product identifier
After your onboarding, if you want to find your various tags, you can go to Projects from your profile, then select Code to insert.
This video will guide you through the process:
2. Best practices and tips
- Place the script on all pages of your site to ensure conversation continuity across pages.
- Do not modify the structure of the code provided by iAdvize to avoid any malfunction.
- Be sure to test on mobile to check for compatibility and proper display of the widget on various devices.
- Make sure JavaScript is enabled in your site settings and that the script is not blocked by a firewall or strict Content Security Policy (CSP).