How to add an AI chat agent to your website
Adding the chat agent takes one line of code. Here is the full path, from signing up to seeing the chat bubble on your site.
1. Create your agent
- Create a free account and open Agent in your dashboard.
- Describe your business, add your common questions, and write the questions you want asked of each visitor. Short answers beat long ones. You can also let the dashboard draft all of this from your website address.
- Test it in the Try it yourself panel, then fix anything it gets wrong.
- Copy your install line from the same page. It looks like this, with your own chat ID:
<script src="https://aileadsagent.com/w/YOUR-CHAT-ID.js" async></script>
2. Paste it on your website
Paste the line just before the closing </body> tag, or in your platform’s “footer code” area, on every page where you want the chat to appear.
WordPress
- Install a free header and footer plugin such as WPCode.
- Open Code Snippets > Header & Footer.
- Paste the line into the Footer box and save.
Shopify
- Go to Online Store > Themes, then … > Edit code.
- Open
layout/theme.liquid. - Paste the line above
</body>and save.
Wix
- Open Settings > Custom Code (needs a paid plan with a connected domain).
- Click Add Custom Code and paste the line.
- Choose All pages and place it in Body – end, then apply.
Squarespace
- Go to Settings > Advanced > Code Injection (available on plans that include code injection).
- Paste the line into the Footer box and save.
Webflow
- Open Site settings > Custom code (paid site plan).
- Paste the line into Footer code and save.
- Publish the site.
Google Tag Manager
- Create a new tag of type Custom HTML and paste the line.
- Set the trigger to All Pages, save, and publish the container.
Plain HTML
Add the line before </body> in each page template, upload, and refresh.
3. Check it works
- Open your site in a private window. You should see the chat button in the corner.
- Send a message. The conversation and any lead appear in your dashboard.
- If nothing shows, clear your site’s cache and check that the line is on the page (view source and search for
/w/).
Tips for good results
- Set your meeting link or place and your opening hours so the agent can offer real times.
- Choose the button side, add your logo and avatar, and set a language for the chat if your visitors prefer Spanish or French.
- Turn on the proactive greeting only on pages that matter, such as pricing or services.
- Read the first ten conversations. Add any question the agent could not answer to your FAQ.
Need a hand? Email admin@007aj.com.