NotAI script
Install the NotAI script
The NotAI script is a single-script install that analyzes how visitors browse your site. It observes pointer motion, scroll rhythm, navigation paths, and other behavioral signals to distinguish humans from AI agents and bots. Drop the script on any website. No tuning required. You will need an integration ID from a NotAI account.
Overview
The NotAI script installs on any HTML page, loads asynchronously, and reports behavioral signals to your NotAI dashboard during the session. There is no framework requirement, no runtime SDK to integrate, and no user-facing interaction.
Two install paths exist for text capture, and you should pick one or the other for any given page:
- NotAI script (this page). Covers behavioral analysis on every page by default. Writing capture is an opt-in feature that runs inside the same script. Recommended for Canvas LMS and any site that wants a single install for everything NotAI offers.
- Standalone writing capture script. One
/auto.jsscript tag on sites that do not run the NotAI script. Use this when you only need typing capture, or when the NotAI script is not an option.
Install
Add a single script tag to every page you want to cover. Place it in the <head> so capture starts before the first paint.
<script
src="https://cdn.isnotai.com/api.js"
data-key="a7f3c2e1"
async></script>
Replace a7f3c2e1 with the 8-character integration ID from your dashboard, and confirm the page's origin is on your integration's allowed origins (in the dashboard, open Settings, then Pixel Install, then Allowed Origins, or the integration's own page). That is all the NotAI script needs to begin reporting.
The integration ID is public by design: it identifies which account receives the session data. It does not authenticate the sender, and a leaked integration ID does not expose account data.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>My Website</title>
<!-- NotAI script (pixel) -->
<script
src="https://cdn.isnotai.com/api.js"
data-key="a7f3c2e1"
async></script>
</head>
<body>
...
</body>
</html>
How the script works
Once the script loads, it begins analyzing behavioral signals and reporting them to your dashboard. No cookies are set.
Human signals
- Variable pointer velocity and overshoot
- Reading pauses inside text regions
- Irregular scroll rhythm
- Hesitation before consequential clicks
- Non-linear path between elements
Agent signals
- Straight-line pointer trajectories
- Uniform inter-event timing
- Programmatic scroll increments
- Immediate, confident clicks
- Systematic, breadth-first traversal
Configuration
The script tag carries your integration ID and, for EU accounts, the region; where installs of different integrations share a page, it can also carry a priority. Nothing else goes in it. Choose courses and turn writing capture on or off in the NotAI dashboard, under Settings, then Pixel Install; changes take effect within about 10 minutes.
Attributes
| Attribute | Default | Description |
|---|---|---|
data-key |
Required | Your 8-character integration ID. |
data-region |
us |
Reporting region. Either us or eu. Must match the region configured for your account. See Regions. |
data-priority |
0 |
Optional. A whole number from 0 to 100. When installs of different integrations load on the same page (a Canvas root account and a sub-account), only the highest runs; equal priorities all run. Use the same script source for all installs that set a priority. See Root and sub-account installs. |
Course scoping applies to Canvas LMS pages, where the NotAI script can identify the course a page belongs to; see Course scoping.
Self-hosted script
Some customers need the NotAI script to be served from their own origin so it keeps loading when adblocker lists block well-known third-party domains. For those cases, on Enterprise plans, the dashboard builds the NotAI script for you with your integration ID, region and settings baked in, and you host it on your own site.
The setup is self-service from your dashboard:
- In your dashboard, open Settings, then Custom Domains. To report through your own subdomain (for example,
verify.example.com), add it under Custom ingest domains: the dashboard shows the DNS records it needs, a CNAME and verification records. - Create those records with your DNS provider. The dashboard checks them and marks the domain active once they are live. (A custom domain is optional: the file can also report to NotAI's own hosts.)
- Under Self-hosted SDK, choose the file name, sampling, writing capture and the reporting host (your active custom domain, if you added one), then choose Generate SDK file and download the file. Your integration ID and region are baked in.
- Host the file on your own CDN. Your install tag becomes a single script with no
data-*attributes:
<script src="//your-cdn.example.com/analytics.js" async></script>
The file carries its own settings (file name, sampling, writing capture, reporting host). To change them, generate a new file in the dashboard and host it in place of the old one. With writing capture on, the file still loads the writing capture code from cdn.isnotai.com, so a filter that blocks that host stops writing capture (agent detection keeps working).
Regions
NotAI runs two independent regions. Your account is bound to one at signup. Use the install snippet that matches yours. Writing replay is currently available for US-region accounts only.
United States
<script
src="https://cdn.isnotai.com/api.js"
data-key="a7f3c2e1"
async></script>
US is the default when data-region is omitted. Add data-region="us" if you want it explicit.
European Union
<script
src="https://cdn.isnotai.com/api.js"
data-key="a7f3c2e1"
data-region="eu"
async></script>
The script host is the same in both regions. Only the reporting endpoint differs. See Content Security Policy for the exact hosts your CSP must permit.
Writing capture
The NotAI script can also record what people write or paste inside editors on your page, so it can be replayed. This is writing capture, and it is opt-in. Until you turn it on, the NotAI script is behavior-only.
Turn writing capture on or off in the NotAI dashboard, under Settings, then Pixel Install; changes take effect within about 10 minutes. The script tag needs no change. Writing capture is available for US-region accounts only, on request: until NotAI turns it on for your account, the dashboard's On setting shows "Available on request". Tell the people whose writing is recorded before you turn it on; for schools, the student notice covers it.
When to use the standalone script instead
Writing capture inside the NotAI script is the right choice when the script is already installed. If your site does not run it, use the standalone writing capture script instead. Do not combine the two on the same page.
Detection and dashboard
Sessions show up in your dashboard within seconds of the first signal batch. Each session surfaces a verdict and the evidence behind it: behavioral signals weighed together with technical checks such as automation fingerprints (CDP), headless browser tells, extension interference, WebGL anomalies, and tampering.
Verdicts you will see
- Clean. Signals consistent with human browsing.
- Bot. Automation, including LLM-driven browser agents, conventional headless browsers, and scrapers.
- Suspicious. Mixed or ambiguous signals. Review in the dashboard.
Benign automation we distinguish from the Bot verdict
- Search engine crawlers (Googlebot, Bingbot)
- Uptime monitors
- Accessibility testing tools
- Social preview generators
Programmatic access
Session data is available in your dashboard and through the NotAI Public REST API, documented at /developers.
curl "https://api.isnotai.com/v1/sessions?pageSize=5" \
-H "Authorization: Bearer aik_v1_your-api-key"
# Create the key in your dashboard: Settings, then API Keys. EU accounts call https://api-eu.isnotai.com
Canvas LMS
Canvas LMS is one of the install surfaces the NotAI script supports. Canvas Theme Editor uploads are JavaScript files rather than HTML, so the NotAI script attaches via a small DOM-injection snippet instead of a <script> tag. Uploaded once in your Canvas theme, the snippet covers every page in your instance including assignments, discussions, quizzes, and SpeedGrader.
See the Canvas install guide for the full install and Canvas-specific troubleshooting.
Content Security Policy
If your site sets a Content Security Policy, the NotAI script needs the script host and the reporting endpoint for your region.
United States
Content-Security-Policy:
script-src 'self' https://cdn.isnotai.com;
connect-src 'self' https://chl.isnot.ai wss://chl.isnot.ai;
European Union
Content-Security-Policy:
script-src 'self' https://cdn.isnotai.com;
connect-src 'self' https://chl-eu.isnot.ai wss://chl-eu.isnot.ai;
Only the reporting host differs between regions. Both regions use the same script host.
Privacy
What the script collects
- Pointer motion features (velocity, direction changes)
- Keystroke timing (rhythm and cadence; which keys and what was typed are recorded only when writing capture is on, below)
- Click timing relative to page events
- Scroll cadence
- Navigation timing between pages
- Coarse browser characteristics (user agent, viewport)
What the script does not collect
- Form field contents, except in the editors covered by opt-in writing capture
- Personally identifying information, except what a person types or pastes into an editor opt-in writing capture covers (its default list includes plain text and email inputs), which is recorded as written text
- Screenshots or screen recordings
- Keystroke content outside of opt-in writing capture
When writing capture is on, the NotAI script records the text written in the allowed editors (typed and pasted text and the editor's starting content), along with its typing events, so that authorized reviewers can replay how it was written. Session-to-student attribution is not part of the NotAI script: it is a reviewer feature on academic plans that relies on identity fields your institution chooses to provide, listed in the Data Processing Agreement (see the Canvas guide). See the privacy policy for the full disclosure and the AI transparency notice for how the detection system itself is disclosed.
Cookies
The NotAI script does not set cookies. A session identifier is kept in browser localStorage for the duration of the session, as described in our privacy policy. Disclose the NotAI script in your own privacy notice so visitors know it is running.
Troubleshooting
Script not loading
- Confirm
data-keymatches the integration ID from your dashboard exactly. - Confirm the page's origin is on your integration's allowed origins. Requests from origins outside the list are rejected. Check them in the dashboard: open Settings, then Pixel Install, then Allowed Origins, or on the integration's page.
- Check the browser console for CSP violations.
- Verify the page is served over HTTPS in production.
The script loads but no sessions appear
- Confirm
data-regionmatches the region configured for your account. - If you set a sample rate, confirm it is high enough that sessions are not being dropped on the client.
- Confirm the dashboard is filtered to the correct integration.
False positives
- Users with assistive technology can show patterns that overlap with automation.
- Remote desktop sessions can surface bot-like pointer traces.
- Review ambiguous sessions in the dashboard before taking action.
Performance
- The script loads asynchronously and does not block the first paint.
- Use sampling on high-volume pages only if necessary.
Still stuck? Support usually replies within a business day.
Contact support