These guides show you how to add Subcontext features to your website. Each guide covers installation, settings and troubleshooting, and includes example pages you can view, copy and download.
| What you want on your website | Guide |
|---|---|
| A chat window with your AI agent | Webchat |
| A quote for one of your products, through to buying it | Quote form |
| An enquiry form for a campaign, or a way to send leads from your own form | Lead form |
| An AI helper beside a form, answering questions as people fill it in | Form guide |
| The "Nurture with AI" adviser tool inside your portal or CRM | Nurture |
| Your tools, offered to AI assistants in your visitors' browsers | WebMCP |
| Your own server or code using the Subcontext API, with an access token | Access tokens (OAuth) |
Most installs start with a short snippet you copy from your Subcontext dashboard and paste into your page. The guides also cover the JavaScript options for developers who want more control.
To give every embed your colours and font, pass them all the same theme object. See Theming the embeds.
To keep an ad click from the page a visitor lands on until they fill in a form on another page, and to decide when the embeds may store it, see Ad clicks across pages.
Using the example pages#
Each embed's guide ends with an Examples page: webchat, quote form, form guide, lead form, Nurture and WebMCP. Each example is a single, complete web page with no other files. Choose View and copy to read its code, or Download to save it.
- Open an example and read the comment at the top. It says what the page shows and what to change.
- Replace the placeholders with your own values. They're in capitals,
such as
YOUR_AGENT_IDorlfk_YOUR_KEY, and each has a comment saying where to find it in your Subcontext dashboard. None of them are secret. They're the same values that appear in your website's code. - Put the page on a test page of your website. Some embeds only work on websites you've told Subcontext about, so add that site's address first. Each guide says where. Opening the file from your computer won't work.
Some examples do real things, such as sending a lead, starting a quote, or texting or emailing a client. Use your own name, email address and phone number when you try them.
If your website has a content security policy#
A content security policy lists the places a website may load things from. If your website has one, allow Subcontext:
script-src https://js.subcontext.comconnect-src https://subcontext.com wss://subcontext.com
Some embeds need more. Each guide lists what.
Need help?#
Email hello@subcontext.com.
In this section
- Theming the embeds One theme object for the webchat, quote form, form guide, lead form and Nurture, what each embed does with it, dark mode and fonts.
- Ad clicks across pages How the embeds keep an ad click from the page a visitor lands on, read your ad tags' cookies, and when they may store anything.
- Webchat Put your firm's Subcontext AI agent on your website as a chat window, in the corner of the page or inside your own layout.
- Quote form Put a full insurance quote on your own website, where visitors answer the questions, see a price and can buy, without leaving your site.
- Lead form Put a Subcontext lead form on your website, or send leads to a campaign from a form you already have.
- Form guide Put your AI agent beside the questions on any web form, to explain each question and, if you like, fill in the answer.
- Nurture A "Nurture with AI" button for the client record page of your adviser portal or CRM, so advisers can follow up after a call.
- WebMCP Let AI assistants in your visitors' browsers use your Subcontext tools for products, questions, callbacks and leads.