Install tags
The Install Tags tab gives you the embed code that adds the AI Shopping Assistant to your storefront. It goes before the closing body tag. The tab can also check that the code is on your site. Shopify stores install through the theme's app embed instead.
Overview
Section titled “Overview”The Install Tags tab is the last tab of an agent’s configuration. It holds the embed code that puts the AI Shopping Assistant on a storefront. It also checks that the code is on your site. The tab has a Save button and two steps.
The embed code is the same for every page. It identifies the agent. The AI Shopping Assistant loads the agent’s saved settings each time a page loads. Nothing on the tab changes the code.
Embed code (Step 1)
Section titled “Embed code (Step 1)”| Element | What it does |
|---|---|
| Instructions | “Add this code to your website’s main template, before the </body> tag. It will automatically be added to every page on your website.” |
| Code block | The embed code for this agent: one script tag that loads the AI Shopping Assistant with this agent’s identifiers |
| Copy | Copies the code. The button reads Copied! for 2 seconds |
The code block reads “No snippet available. Save the agent first to generate the embed code.” until the agent has been saved once.
Verification (Step 2)
Section titled “Verification (Step 2)”The console labels this step “Confirm onsite tracking is enabled”.
| Element | What it does | Allowed values |
|---|---|---|
| Website URL | The storefront page to check for the embed code | A full page URL |
| Confirm | Fetches the page and looks for this agent’s code in its HTML. Shows Verified with the date when it finds it | Not applicable |
Verification reads the page’s HTML as the server returns it. It allows 10 seconds for the page to respond. Code added later in the browser, such as by a tag manager, may not be found. A failed check shows the reason, such as the status code the site returned or that the agent’s code wasn’t found in the page.
Shopify stores
Section titled “Shopify stores”Stores using the Webscale AI app in their Shopify admin, in its standard view, don’t have an Install Tags tab. The AI Shopping Assistant is added through the theme’s app embed instead.
| Setting | Where | What it does | Default |
|---|---|---|---|
| Enable in Theme Editor | Get Started page, step Enable the widget | Opens the live theme’s editor at the App embeds panel | Not applicable |
| Enable Shopping Assistant | Theme editor, App embeds, Shopping Assistant | Turns the AI Shopping Assistant on or off for the theme | On |
| Agent Code (Optional) | Theme editor, App embeds, Shopping Assistant | Uses a different agent on this theme, such as to test in a preview theme. Leave it blank to use the storefront agent selected in the console | Blank |
An agent that isn’t active stays hidden on the storefront. The console can’t detect whether the app embed is on, so select Mark as done on the Get Started step once you’ve enabled it.
Limits
Section titled “Limits”| Limit | Value |
|---|---|
| Embed codes per agent | One, the same on every page |
| Time allowed for verification | 10 seconds |
Frequently asked questions
- Do I need to update the embed code when I change the agent's settings?
- No. The embed code only identifies the agent. The AI Shopping Assistant loads its saved design and settings each time a page loads, so saved changes appear without touching the code.
- Why does verification fail when the code is installed through a tag manager?
- Verification reads the page's HTML as the server returns it. Code that a tag manager adds later in the browser is not in that HTML, so the check can fail even though the AI Shopping Assistant appears for shoppers.