Docs / Install help

Paste the snippet on your website

After AgentPage builds your chat, you get a short snippet. Paste it once, so it loads on every page where you want the chat, then check that it is live.

Before you paste

  1. Open the preview link your assistant gave you, ask the chat a question and leave your own details, so you see the lead email arrive.
  2. Ask your assistant: “Give me the AgentPage snippet for my chat.”
  3. Paste it just before the closing </body> tag, on every page that should show the chat. Your builder has a place for this; pick it below.
  4. Publish your site. Many builders’ previews do not run custom code, so check the published site.

These steps follow each builder’s own help page, which we link. We have not yet walked each one on a live site, so if a menu name differs from what you see, follow the builder’s page, or ask your assistant to help.

Wix

Custom code needs a paid Wix plan, and the site must be published with a connected domain.

  1. In your site’s dashboard, open Settings, then Custom Code (it sits under Advanced or Development & integrations, depending on your version).
  2. Choose + Add Custom Code and paste the snippet in the box. Name it AgentPage.
  3. Under Add Code to Pages, choose All pages. Under Place Code in, choose Body – end, then Apply.
  4. Publish your site.

Wix says it does not support third-party code, so if something looks wrong, check the settings above first. Wix help: embedding custom code.

Squarespace

Code injection is available on the Core, Plus and Advanced plans and some older plans.

  1. Open the Code Injection panel. Squarespace’s help page shows where it is for your version of the site.
  2. Paste the snippet in the Footer field. Squarespace adds it before the closing </body> tag on every page.
  3. Choose Save, then check the published site.

If the editor preview says it detected an error loading the site preview, choose Disable Scripts in Preview. It does not change what visitors see. Squarespace help: using code injection.

WordPress

On a self-hosted site there is no plan limit. On WordPress.com, adding plugins or code needs a plan that allows it, so check your plan there first.

  1. In your WordPress dashboard, open Plugins, then Add New, and install a plugin that adds code to the footer, such as WPCode or Insert Headers and Footers. Activate it.
  2. Open the plugin’s settings and paste the snippet in the box for footer scripts (often called Scripts in Footer).
  3. Save, then check the published site.

If you edit the theme’s footer file instead, use a child theme so a theme update does not remove the snippet. WordPress plugin directory: header and footer scripts.

Shopify

Shopify’s help page names no plan limit for editing theme code.

  1. In your Shopify admin, open Online Store, then Themes. Duplicate your live theme first, so you can start again if something goes wrong.
  2. On the duplicate, open the menu (the three dots) and choose Edit code.
  3. Open theme.liquid in the Layout folder, find </body>, paste the snippet just above it and save.
  4. Preview the duplicate, then publish it.

Shopify help: edit theme code.

Webflow

Custom code needs a paid Site plan; the free Starter plan does not include it. Check Webflow’s pricing page for the tier.

  1. Open Site settings, then the Custom code tab.
  2. Paste the snippet in Footer code. Webflow places it before the closing </body> tag on every page.
  3. Choose Save, then Publish. The Designer preview does not run this code, so check the published site.

Webflow help: custom code in head and body tags.

AI-built sites (Lovable, Bolt, Claude Code and similar)

Ask your assistant to add it. You do not need to find the file yourself.

Paste this to your site-building assistant, with the snippet from AgentPage after it:

Add this snippet just before the closing body tag in the site’s main HTML template, so it loads on every page. Do not change anything else. The snippet is below.

  • The main template is often index.html or the site’s layout file. Your assistant knows which.
  • In Claude Code (in the Claude desktop app), it edits the file in your project folder and asks before changing anything. Review the change.
  • Publish or deploy the site the way you normally do, then check the published address.

Check it is live

  1. Ask your assistant: “Is my AgentPage chat live on my website?” It finds your chat, loads a page of your site and looks for the snippet.
  2. Open your published site and send a test question to the chat. Leave made-up details, and check that the lead email arrives.

If the snippet is not found, the usual causes are:

  • the site was not published after you pasted the snippet;
  • a page cache that needs clearing;
  • a builder plan that does not include custom code;
  • the snippet sits inside an element the check cannot see. If you can see the chat on your site, send the test question anyway.

Still stuck? Email us with your website address and the builder you use.