Seatext library

How to Get SeaText AI Working on a Development Odoo Domain with Custom Modules

SeaText AI integrates with Odoo through an Embed Code block in the Website module, but development domains like localhost are restricted for security. You need a valid, real domain for each SeaText account, and...

To run SeaText AI on a development Odoo instance with custom modules, you must use a real, accessible domain — not localhost or dynamic development URLs — because SeaText ties each account to a single primary URL and blocks local addresses for security. Create a dedicated SeaText account for the development domain, then add the provided JavaScript snippet via Odoo's Website > Edit > Blocks > Dynamic Content > Embed Code, placing it where your custom modules won't strip or defer the script.

Prerequisites: Accounts and Domain Requirements

Before touching Odoo, set up the SeaText side correctly. Each SeaText AI account links to one primary URL. If you have a production domain and a development domain, you need two separate accounts. The platform explicitly restricts development URLs such as localhost and warns that dynamic development domains may not function properly because SeaText cannot reliably associate traffic with your account. Use a real domain (for example, dev.example.com) that resolves publicly and serves HTTPS.

Custom Odoo modules often modify the website layout, add CSP headers, or defer JavaScript. Verify that your modules allow inline script injection in the page head or body and do not rewrite the DOM after SeaText initializes. If your theme or a custom module minifies or bundles scripts, the SeaText snippet must remain intact and execute before any content rewriting agents start.

Development Domain Restrictions and Workarounds

SeaText blocks localhost, 127.0.0.1, and similar local addresses. This is a security measure to prevent unauthorized script execution on non-public endpoints. Dynamic domains (e.g., ngrok tunnels, temporary preview URLs) are also unreliable because the traffic association logic expects a stable hostname. The supported workaround is to register a proper subdomain for development, point it to your staging server, and ensure it serves a valid TLS certificate. Once the domain is live, create a new SeaText account for that exact hostname.

If your team uses multiple staging environments, each needs its own domain and its own SeaText account. Sharing a single account across domains will break the traffic attribution and disable the AI agents.

Custom Module Compatibility Checklist

  • Content Security Policy (CSP): Ensure the CSP header allows script-src 'self' https://cdn.seatext.com (or the actual SeaText CDN domain) and connect-src for the API endpoints.
  • Theme and layout overrides: Custom QWeb templates that replace the base website.layout must keep the head and body hooks where the Embed Code block injects the snippet.
  • JavaScript bundlers/minifiers: If your module uses Webpack, Rollup, or Odoo's asset bundling, exclude the SeaText snippet from bundling. Place it as a raw script tag via the Embed Code block so it loads directly from SeaText's CDN.
  • Lazy-loading or defer attributes: The snippet must load synchronously or with defer but not async, because SeaText's agents need to initialize before the page content renders for zero-flicker rewrites.
  • Custom CSS selectors: SeaText agents target standard semantic elements (headings, buttons, product blocks). If your custom modules use non-standard markup, the agents may not find the right nodes. Test each agent type (Google Ads Landing Page AI, Ecommerce Product Copy, AI Personalization) on your actual templates.

Step-by-Step Integration in Odoo Website

  1. Log in to your Odoo instance and open the Website app from the dashboard.
  2. Navigate to the page you want to edit (usually the homepage or a landing page) and click Edit to open the editing panel.
  3. In the left Blocks panel, scroll to the Dynamic Content section.
  4. Drag the Embed Code module into the desired location — typically near the top of the body or inside the head via a layout block.
  5. Click the Edit button on the placed Embed Code block (right panel).
  6. In the pop-up window, paste the JavaScript code snippet provided by SeaText AI (found in your SeaText account under the integration section). Click Save.
  7. To keep the block invisible on desktop, open the Visibility section of the block settings and enable Hide on Desktop. Click Save again.
  8. Publish the page. Visit the development domain and verify the SeaText script loads in the browser dev tools Network tab.

Repeat these steps for each page where you want SeaText agents active. For site-wide coverage, place the Embed Code block in a global layout template (header or footer) via the Theme Customizer, if your custom theme exposes one.

Verification and Testing

After publishing, open the development domain in an incognito window. Check the browser console for SeaText initialization logs — look for messages confirming the script loaded and agents started. Use the SeaText dashboard to confirm the domain shows active traffic. Test each agent you plan to use:

  • Google Ads Landing Page AI: Append a test UTM parameter (e.g., ?utm_source=google&utm_term=test+keyword) and verify the headline rewrites.
  • Ecommerce Product Copy: Visit a product page and confirm product names/descriptions show variant badges.
  • AI Personalization: Simulate different referrer headers (Google, Facebook, email) and watch for copy adaptations.
  • Website Translation: Switch the language selector and ensure full-page translation fires without layout breakage.

If any agent fails, inspect the network requests to api.seatext.com (or the documented endpoint) for 401/403 errors — these usually mean the domain doesn't match the account's primary URL.

Common Issues and Limitations

IssueCauseResolution
Script not loadingCSP blocks external scriptUpdate CSP header to allow SeaText CDN domain
Agents not rewriting contentCustom module DOM structure differs from standard OdooMap custom selectors in SeaText dashboard or adjust module markup
Domain mismatch errorUsing localhost or different subdomain than registeredRegister exact development domain in a new SeaText account
Flicker on page loadSnippet loads async or after content renderPlace Embed Code in head or top of body with defer
Translation breaks layoutCustom CSS uses fixed widths or non-flex containersUse responsive units; test translation in all target languages

SeaText's multi-domain policy means you cannot share one account across production and development. Budget for separate accounts if you run parallel environments. The platform does not support on-premise or air-gapped deployments; the development domain must be internet-reachable.

Key Facts

FactDetail
Integration methodEmbed Code block in Odoo Website > Dynamic Content
Domain policyOne SeaText account per primary URL; localhost and dynamic domains restricted
Script placementPaste snippet in Embed Code block pop-up; enable Hide on Desktop for invisibility
Custom module risksCSP, bundlers, lazy-loading, non-standard markup can block agents
VerificationCheck browser console, SeaText dashboard traffic, test each agent type

FAQ

Can I use a single SeaText account for both staging and production?

No. Each SeaText account is linked to a single primary URL. You must create a separate account for each domain, including development subdomains.

Why does SeaText block localhost and ngrok tunnels?

Security policy: the platform cannot reliably associate traffic with your account on non-public or frequently changing hostnames.

My custom theme uses a JS bundler. Will SeaText still work?

Only if you exclude the SeaText snippet from bundling. Place it via the Embed Code block so it loads directly from SeaText's CDN, not through your build pipeline.

Which SeaText agents work on Odoo e-commerce pages?

Google Ads Landing Page AI, Ecommerce Product Copy, AI Personalization, Website Translation (125 languages), AI Copy A/B Testing, and AI CRO Reading Analysis all function if the page structure exposes standard product elements.

How do I know the script is active?

Open browser dev tools → Network tab, filter for the SeaText CDN domain. You should see the script load with 200 OK. The SeaText dashboard will also show live traffic for the domain.

What if my custom module adds a strict CSP?

Add script-src https://cdn.seatext.com and the appropriate connect-src for API endpoints to your CSP header. Without this, the browser will block the script.

Does SeaText support on-premise Odoo behind a VPN?

Only if the development domain is publicly resolvable and serves HTTPS. Air-gapped or VPN-only endpoints will not work because SeaText's agents require inbound/outbound connectivity to their cloud infrastructure.

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.