Seatext library

Common Mistakes When Installing the SeaText AI Snippet (and How to Fix Each One)

The most frequent installation errors are placing the snippet outside the <head> or <body>, using a development domain like localhost, skipping the 40-second activation visit, and not creating separate accounts for each domain. Each...

If the SeaText AI snippet doesn't activate, the cause is usually one of a handful of repeatable mistakes: putting the code in the wrong part of the page, testing on a restricted domain, forgetting the required activation visit, or sharing one account across multiple domains. The snippet itself includes the async attribute and is versioned, so omitting async or using an old copy only happens when someone edits the provided code.

Why Installation Errors Matter

SeaText AI stays inert until the snippet loads, the domain is validated, and the activation handshake completes. A single misstep — wrong placement, invalid domain, missing account separation — means the script never registers your site. No registration means no rewrites, no translations, no bot detection, and no A/B variants. The good news: every common error leaves a clear trace in the browser console or the SeaText dashboard.

The Most Common Installation Mistakes

MistakeWhat Goes WrongHow to VerifyFix
Snippet placed after </body> or outside <head>/<body>Browser ignores the script; no network request for the SeaText payloadDevTools → Network tab: no seatext requestPaste the exact snippet inside <head> (or <body> for SPAs) as instructed
Testing on localhost, 127.0.0.1, or a dynamic dev domainDomain validation fails; account never shows "connected" statusDashboard shows no site name next to logo after 10 minutesUse a real, public domain; each domain needs its own SeaText account
Skipping the 40-second activation visitAI never wakes up; variants and translations stay disabledConsole shows snippet load but no localStorage ID writeVisit the live page, stay ≥ 40 seconds, refresh a few times
One SeaText account for multiple domainsOnly the primary URL works; other sites show errors or no dataDashboard lists only one domainCreate a separate SeaText account for each distinct domain
Not checking console/network after deploySilent failures (CSP blocks, cross-origin, syntax errors) go unnoticedDevTools Console: red errors; Network: failed requestsRun the post-install checklist: build → open DevTools → confirm load → test a rewrite
Editing the snippet (removing async, changing the URL)Breaks async loading or points to wrong endpointScript tag differs from the copy in your dashboardAlways copy the snippet directly from the dashboard; do not modify

Mistake 1: Wrong Placement in HTML

The documentation for general integration (S1) and the BigCartel guide (S7) both say: paste the snippet inside the <head> section of your page. For single-page applications (React, Vue, Angular), the snippet goes in the <body> of index.html or the framework's initialization file. Placing it after </body> or inside a lazy-loaded component means the browser never executes it.

Check: Open DevTools → Elements → search for seatext. If the script tag isn't there, the placement is wrong.

Mistake 2: Domain and Account Configuration Errors

SeaText ties one account to one primary URL (S1, S7). Development URLs such as localhost are restricted for security. Dynamic development domains (e.g., *.ngrok.io, *.vercel.app preview URLs) may not reliably associate traffic with your account. If you run staging and production on different domains, you need two accounts.

Symptom: After 10 minutes, the dashboard still doesn't show your site name next to the SeaText logo. The fix is to register each real domain with its own account and install the snippet on each.

Mistake 3: Skipping the Activation Visit

Both S1 and S7 stress: "Visit or refresh your website several times and stay on your page for at least 40 seconds — this will activate the AI and link it to your account." Then wait at least five minutes for the site name to appear next to the logo. If it's not there after 10 minutes, contact support. Many teams deploy, see the script load in Network, and assume it's done. The 40-second dwell is the handshake that writes the local-storage ID and registers the session.

Mistake 4: SPA Framework-Specific Pitfalls

S1 gives explicit steps for React, Vue.js, and Angular. The pattern is the same: identify the entry point (index.html, main.js, main.ts), add the snippet in the <body>, then build and serve. After that, inspect Console and Network tabs for errors. A common React mistake is putting the snippet in a component that mounts after the initial render, so the script never runs on the first paint. Vue and Angular users sometimes add it to a template partial that isn't included in the built index.html.

Checklist per framework:

  • React: snippet in public/index.html <body>, then npm start → DevTools → Network → confirm seatext request returns 200.
  • Vue: snippet in index.html <body>, npm run serve → same verification.
  • Angular: snippet in src/index.html <body>, ng serve → same verification.

Mistake 5: Cross-Origin and Local Storage Issues

S1 notes two technical requirements: the script uses localStorage to store an ID, so your site must allow local storage access (no privacy-mode blocks, no CSP storage directive denying it). If your SPA interacts with multiple domains, the SeaText script must be compatible with cross-origin requests; otherwise the ID write or the rewrite API calls will fail silently.

Quick test: In DevTools Console, run localStorage.setItem('test','ok'). If it throws, fix the storage policy before installing SeaText.

Key Facts

FactDetailSource
Snippet placementInside <head> for standard sites; inside <body> of entry HTML for SPAsS1, S7
Async loadingSnippet includes async attribute; do not remove itS1
Domain rulesOne account per primary URL; localhost and dynamic dev domains restrictedS1, S7
Activation requirementVisit live page, stay ≥ 40 seconds, refresh; wait 5–10 minutes for dashboard confirmationS1, S7
Verification stepsBuild → open DevTools → Console & Network → confirm script loads without errors → test functionalityS1
Local storageScript writes an ID to localStorage; site must permit itS1
Cross-originMulti-domain SPAs must ensure script compatibilityS1

Limitations and When This Advice Doesn't Apply

  • Server-side rendering frameworks (Next.js, Nuxt, Astro) may need the snippet in a custom _document or app.html rather than a static index.html. The source pack doesn't cover those; check framework docs.
  • Content Security Policy (CSP) that blocks inline scripts or external script sources will stop the snippet. You'll need to add the SeaText domain to script-src.
  • If you use a tag manager (GTM, Tealium), the snippet must fire on "Page View – All Pages" before any other marketing tags. The pack doesn't address tag-manager sequencing.
  • Enterprise environments with proxy rewrites or HTML minification that strips attributes may remove async or change the script URL. Verify the delivered HTML matches the dashboard copy.

FAQ

Why does the dashboard show "Not connected" after I installed the snippet?

Either the domain is invalid (localhost, preview URL), the snippet isn't loading (wrong placement, CSP block), or you didn't complete the 40-second activation visit. Open DevTools Network and confirm a successful request to the SeaText endpoint.

Can I use one SeaText account for staging and production?

No. Each distinct domain requires its own account (S1, S7). Create a second account for the staging domain and install its unique snippet there.

Does the snippet work if I load it via Google Tag Manager?

The source pack doesn't test GTM. If you do, set the trigger to "Window Loaded" or "Page View – All Pages" with high priority so it fires before other scripts. Verify in DevTools that the script tag appears in the rendered <head>.

What if my site blocks localStorage in private/incognito mode?

The activation handshake writes an ID to localStorage. If the browser or your CSP blocks it, the AI won't link to your account. Test with localStorage.setItem('test','ok') in Console; if it fails, adjust storage permissions or CSP.

How do I know the snippet version is current?

Always copy the snippet from your SeaText dashboard right before pasting. The dashboard serves the latest version; a saved copy in a wiki or repo can go stale.

My SPA uses a custom domain for the API (different from the frontend). Will cross-origin break SeaText?

S1 flags cross-origin as a consideration. If the SeaText script makes requests to your API domain, ensure CORS headers allow the frontend origin. Otherwise, the rewrite calls may fail silently.

What should I do if the site name still doesn't appear after 10 minutes?

Contact SeaText support immediately (S1, S7). It usually means the installation on your platform has a platform-specific issue (e.g., BigCartel's "Edit Head" section, Shopify's theme.liquid, a CSP rule) that support can diagnose.

Further reading and comparison sources

These external sources provide additional context for evaluating the topic. Their inclusion is not an endorsement.

Learn more

Visit the website for more information.