Install guide
Where the tag actually goes for a Notion published site
This one has a real answer, just not the one people expect. A page published directly from Notion serves Notion's own markup, and a third-party script is not part of it on any plan. The tag has to go into the layer that serves your Notion content on your own domain, which is where a custom code field exists.
The tag
<script src="https://cdn.askably.xyz/w.js" data-key="pk_live_YOUR_KEY" defer></script>Your own key replaces the placeholder. You will find it on the install tab of the assistant.
The origin the page is served from has to be on the allowlist for that assistant, or nothing renders and the browser console says which origin was refused. An apex domain and its www are two different origins to a browser, so list both, along with any staging or preview host you want it to work on.
Where it goes on Notion
The custom code field of whatever service serves your Notion content on your own domain. There is no such field inside Notion itself.
Nothing you can buy from Notion adds this. Notion publishing has no place to put a script, on any plan, so eligibility here is really a question about the hosting layer in front of it and whether it offers a code field.
Step by step
- 1Decide whether this page needs to be a Notion published page at all. If it is a public marketing or documentation site, it is going to be served through a hosting layer anyway, and that layer is where this install happens.
- 2Point that layer at the Notion page or database you want public, and connect your own domain to it.
- 3Find its custom code field, usually described as code to insert before the closing body tag.
- 4Paste the tag and replace the placeholder with your own key.
- 5Republish or redeploy in that layer. These services typically cache a copy of your Notion content rather than reading it live, so a change is not visible until they refresh.
- 6Open your own domain rather than the notion.site address and confirm the launcher appears.
- 7Allowlist your domain, the www form of it, and the preview address that layer gave you before the domain was connected.
What goes wrong on Notion
The notion.site address will never carry the tag
Once you have a domain in front, you have two public copies of the same content: your domain, which has the assistant, and the original Notion published address, which cannot have it.
If you have ever shared the notion.site link anywhere, some of your visitors are on the copy with no assistant and you will never see them in your conversations. Pick one public address and stop handing out the other.
The published copy can be older than the page in Notion
Hosting layers cache your Notion content rather than fetching it on every request. That affects the answers as well as the pages: a crawl reads the published copy, so a policy you corrected in Notion this morning may still be answered from the old wording.
When you change something that matters, refresh that layer first, then re-index, in that order.
Installing and indexing are separate problems
Not being able to put the tag on a Notion page does not stop the assistant reading one. A publicly reachable Notion page can be crawled as source material like any other public page.
So the useful pattern is often the reverse of what people ask for: keep the knowledge base in Notion, put the assistant on the site where your visitors actually are, and let it answer from the Notion content.
Origins to allowlist
These are the origins a Notion site is typically served from. List every one you want the assistant to answer on, including the ones only you visit.
- https://yourdomain.com
- https://www.yourdomain.com
- the preview address your hosting layer serves on before a custom domain is connected
How the tag behaves, wherever you put it
The rest of this is the same on every platform, so it is worth reading once rather than on each guide.
| One tag, nothing else | There is no second file, no stylesheet and no package to install. The tag is the whole install. |
|---|---|
| Where it goes | Immediately before the closing body tag. It works in the head too, because it defers, but the body keeps it out of the way of anything that measures render order. |
| data-key is required | Without it the loader stops and writes a warning to the browser console rather than rendering anything. |
| It finds itself | The loader reads the tag it was loaded from, and falls back to the first tag on the page carrying a data-key. Platforms that move or re-inject the tag do not break it. |
| It installs once | A second copy of the tag on the same page is ignored, so a template that renders twice does not produce two launchers. |
| Assets follow the tag | Everything else it needs is fetched from the same origin the tag was served from, so a proxy or a private domain needs no extra configuration. |
| The panel loads late | Only the small launcher is on the page at first. The conversation panel is fetched the first time a visitor opens it, in its own frame. |
| Styles cannot collide | The launcher renders inside a closed shadow root and the panel inside a frame, so nothing on the host page can restyle either, and neither can restyle the host page. |
Set up on Notion for a particular trade
The tag is the same everywhere. What is not the same is which of your pages the assistant can read once it is running, and on Notion that depends on what kind of site this is. These go one level further than this guide.
- For a developer tools companyThe tag cannot go on a Notion page, so the reader who failed your search box is the one person who cannot reach the assistant.
- For a online coursePublishing a page publishes what sits beneath it. For a course provider that can turn the lessons people paid for into readable material.
Taking it off again
Clear the custom code field in the hosting layer and redeploy. Nothing was ever added inside Notion, so there is nothing to undo there.
Before you remove it
- Removing the tag stops the widget on that site. It does not delete the assistant, its material, or the enquiries it has already collected.
- If you are moving the widget to a different host rather than retiring it, add the new origin to the allowlist before you remove the old tag, or there is a window where neither works.
Questions
- Can I add it to a plain notion.site page?
- No. Notion serves those pages itself and does not run third-party scripts in them. There is no plan, setting or block type that changes that, and any snippet you paste into a Notion page is treated as content rather than executed.
- Can it answer from my Notion pages even so?
- If they are public, yes. A crawl reads a publicly reachable Notion page like any other page. Content that stays private to your workspace is not readable that way, so export those pages and upload them as documents instead.
- Which hosting layer should I pick?
- We are not going to name one for you, but there is one thing to check before you subscribe: that it has a field for custom code before the closing body tag, and that the field is on the tier you were about to buy. Not all of them offer it, and it is awkward to discover afterwards.
- What does the assistant do with a question the pages do not cover?
- It says it does not know, and it can take a name, an email address and a message so a person can follow up. It cites the pages it did use, which on a documentation site doubles as a way of finding out which page a reader could not locate on their own.
Keep reading
- Install on WebflowProject settings, then the Custom code section, then the field for code before the closing body tag.
- Install on SquarespaceSettings, then Advanced, then Code Injection, then the Footer field.
- Install on WixSettings, then Custom Code, then a new snippet applied to all pages and placed at Body end.
- Every install guideThe same one line of HTML, and where it goes on each platform.
Try it on your own material
Upload a document or point it at your site, paste one line of HTML, then ask it something only your business could answer.