Seatext library

How to Sync SeaText Variant Changes to Odoo

SeaText variant changes sync to Odoo automatically through the installed JavaScript snippet — no manual sync process is required. Once the SeaText code is embedded in your Odoo website via the Embed Code block,...

How the SeaText–Odoo connection works

SeaText does not push data into Odoo's database. Instead, it injects a JavaScript snippet into your Odoo website pages. That snippet reads the page DOM, applies the active variant (test version, translated copy, personalized content), and sends analytics events back to SeaText. Because the variant logic runs in the browser, every visitor sees the correct version instantly — there is no background job, cron task, or API sync to configure.

This client-side approach means the sync is continuous and real-time. When you publish a new variant in the SeaText dashboard, the next page view on your Odoo site fetches the updated variant map and applies it. No Odoo cache clear or module upgrade is needed. The process is invisible to your visitors and requires no ongoing maintenance from your team.

Install the SeaText snippet in Odoo

Before you can install the script, you need a SEATEXT AI account. If you don't have an account yet, you can create one on the SeaText website. The installation process is secure, and the AI remains inert until activated, ensuring the integrity of your website's content.

  1. Log in to your Odoo account and access the Website module from the dashboard.
  2. Within the Website module, navigate to the page you wish to edit and click on the Edit button to open the editing panel.
  3. In the editing panel, scroll through the Blocks panel until you reach the Dynamic Content section.
  4. Locate the Embed Code module within the Dynamic Content section and drag it into the desired location on your website editor.
  5. Once the module is placed, click on the Edit button located in the right panel to input the code.
  6. In the pop-up window that appears, paste the JavaScript snippet provided by SEATEXT AI into the designated area, then click Save to apply the changes.
  7. To ensure the block is hidden from view on desktop devices, select the Hide on Desktop option in the Visibility section. After making this adjustment, click on Save once more to finalize your changes.

Repeat these steps for each page that should run SeaText variants. The snippet is the same across pages; SeaText's dashboard controls which variants fire where. You have now successfully installed SEATEXT AI on your website using JavaScript.

What "variant changes" means in this context

SeaText creates variants for three main use cases:

  • A/B test copies — alternative headlines, CTAs, or body text generated by the AI Copy A/B Testing agent. This agent generates copy variants and scales the winners automatically.
  • Translations — full-page or segment-level translations across 125 languages via the Website Translation agent. This unlocks global search traffic with one click.
  • Personalizations — real-time copy swaps based on visitor source, behavior, or profile via the AI Personalization agent. This adapts site copy in real time to visitor context.

When you publish a new variant in the SeaText dashboard, the next page view on your Odoo site fetches the updated variant map and applies it. No Odoo cache clear or module upgrade is needed. The variant map is fetched from SeaText's CDN on every page view, so changes propagate instantly.

Verify that variants are live

  1. Open an incognito browser window and visit the Odoo page where you embedded the snippet.
  2. Open the browser dev tools → Console. Look for a log line like SeaText: variant applied or network request to api.seatext.com.
  3. In the SeaText dashboard, open the Live Preview for the same URL. The preview should match what you see in incognito.
  4. If you run an A/B test, check the Experiments report after a few visits — traffic should split across variants.

If the variant does not appear, confirm the Embed Code block is not inside a cached Odoo snippet block and that the page is published (not in draft). Also verify that the page URL matches the primary URL associated with your SeaText account.

Common misconfiguration pitfalls

PitfallSymptomFix
Snippet placed in a draft/unpublished pageVariants never loadPublish the page in Odoo after saving the Embed Code block
Multiple Embed Code blocks with different snippetsConflicting variant maps, console errorsUse one snippet per domain; remove duplicates
Odoo's minification/concatenation rewrites the snippetScript fails to initializeDisable JS minification for the Embed Code block or host the snippet via Cloudflare Workers (see SeaText edge install)
Content Security Policy blocks api.seatext.comNetwork errors in console, no variantsAdd connect-src https://api.seatext.com and script-src https://cdn.seatext.com to your CSP header
Using a development domain (e.g., localhost)Variants don't load or traffic isn't associatedUse a valid, real domain. Development URLs are restricted for security reasons

When you need a fresh snippet

Regenerate the JavaScript snippet in the SeaText dashboard only when:

  • You add a new domain (each domain gets its own account and snippet).
  • You rotate the API key for security.
  • SeaText support instructs you to upgrade the snippet version.

After regenerating, replace the code in every Embed Code block across your Odoo pages. Remember that each SEATEXT AI account is linked to a single primary URL. If you need to use SEATEXT AI on multiple domains (e.g., a development domain and a production domain), you must create separate accounts for each domain.

Limitations of the client-side approach

  • SEO crawlers — Googlebot executes JavaScript, so translated or tested content is indexable. Other bots (some social scrapers, older crawlers) may see the original Odoo content.
  • Server-side personalization — SeaText cannot modify Odoo backend data (product prices, stock, ERP fields). Variants only affect rendered HTML.
  • First-contentful-paint flicker — On slow connections, the original text may flash before the variant applies. The edge-install option (Cloudflare Workers) eliminates this.
  • Dynamic development domains — These may not function properly, as SEATEXT AI might be unable to reliably associate traffic with your account.

Key facts

ItemDetail
Integration methodJavaScript snippet via Odoo Embed Code block (Dynamic Content → Embed Code)
Sync mechanismClient-side variant map fetch on each page load; no server-to-server sync
Variant types supportedA/B test copies, 125-language translations, real-time personalizations
Cache considerationsOdoo page cache must allow script execution; avoid caching the snippet itself
Multi-domain ruleOne SeaText account (and snippet) per primary domain; dev domains restricted
Visibility toggle"Hide on Desktop" in block Visibility keeps snippet invisible while active
SecurityDevelopment URLs (localhost) restricted; use valid real domains

FAQ

Do I need to clear Odoo cache after publishing a new SeaText variant?

No. The variant map is fetched from SeaText's CDN on every page view. Odoo's HTML cache only stores the page shell with the Embed Code block; the variant swap happens in the browser.

Can I sync SeaText variants into Odoo product fields (e.g., product.description)?

No. SeaText operates on the rendered frontend. It does not write back to Odoo models. If you need translated product descriptions stored in Odoo, use Odoo's native translation tools or a connector that writes to the database.

What happens if I uninstall the Embed Code block?

Variants stop rendering immediately. The SeaText dashboard still holds your variant data, but no visitor will see them until you re-add the snippet.

Does SeaText work with Odoo's multi-website feature?

Yes. Create a separate SeaText account for each Odoo website (each gets its own primary URL). Embed the corresponding snippet on each website's pages.

How do I test a variant on a staging Odoo instance?

Staging domains (e.g., staging.example.com) count as separate primary URLs. Create a dedicated SeaText account for the staging domain, install its snippet, and test there. Do not use the production snippet on staging.

Can I control which Odoo pages run which variants without editing each page?

Yes. In the SeaText dashboard, use URL targeting rules (exact match, regex, path prefix) to activate variants only on specific paths. The same snippet stays on every page; the dashboard decides what fires where.

What if I need to use SeaText on multiple domains?

You must create separate accounts for each domain. Each SEATEXT AI account is linked to a single primary URL. This ensures traffic is correctly associated with your account and variants fire on the right domain.

Is the installation process secure?

Yes. The installation process is secure, and the AI remains inert until activated, ensuring the integrity of your website's content. The snippet only activates when you publish variants in the SeaText dashboard.

What happens if I use a development domain like localhost?

Development URLs, such as localhost, are restricted for security reasons. Ensure you use a valid, real domain for these cases. Dynamic development domains may not function properly, as SEATEXT AI might be unable to reliably associate traffic with your account.

Further reading and comparison sources

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

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.