Why Your SeaText Snippet Isn't Showing in Odoo After Saving
The snippet usually disappears because Odoo's website cache or a CDN serves an old version of the page, or because the Embed Code block has "Hide on Desktop" enabled in its visibility settings. Clear...
You saved the SeaText embed code in an Odoo Embed Code block, hit Save, and the snippet still doesn't appear on the live page. The two most common reasons are server-side caching (Odoo's own website cache or a CDN like Cloudflare) and the block's visibility setting "Hide on Desktop" being turned on. Start by clearing Odoo's website cache from the backend, then purge any CDN cache, and finally confirm the Embed Code block does not have "Hide on Desktop" checked in its Visibility options.
How SeaText Integration Works in Odoo
SeaText installs on Odoo through the standard Website builder. You add an Embed Code block from the Dynamic Content section of the Blocks panel, paste the JavaScript snippet provided by SeaText, and save. The script is designed to load in the page <head> so it initializes before content renders. Odoo stores the block's HTML in the database and serves it through its website rendering engine, which caches pages aggressively to improve performance.
According to the official integration guide, after pasting the code you must click Save in the pop-up, then select Hide on Desktop in the Visibility section if you want the block hidden on desktop, and click Save again. The guide then instructs you to visit or refresh your website to see the changes.
Diagnostic Sequence: Step-by-Step Troubleshooting
- Clear Odoo website cache. In the Website module, go to the page editor, open the top-right menu, and choose Clear cache or Regenerate assets. Odoo caches compiled templates and assets; a stale cache serves the old page without your new block.
- Purge CDN or proxy cache. If your Odoo instance sits behind Cloudflare, Nginx, Varnish, or a hosting provider's edge cache, purge that cache too. The CDN may serve a cached HTML snapshot that predates your edit.
- Check the Embed Code block visibility. Edit the block again, open the right panel, scroll to Visibility, and ensure Hide on Desktop is not checked unless you intentionally want the block hidden on desktop. The integration guide explicitly mentions this setting.
- Verify the block is on the correct page and layout. Odoo supports multiple page layouts (e.g., homepage vs. product page). Confirm you placed the block on the layout that visitors actually see.
- Inspect the live page source. Open the page in an incognito browser window, view page source, and search for
SEATEXTCODEINTEGRATIONor your SeaText account ID. If the script tag is present but the UI doesn't appear, the script may be blocked by CSP or a script error. - Check browser console for errors. Open DevTools → Console. Look for JavaScript errors referencing SeaText, Content Security Policy violations, or network failures loading the SeaText domain.
- Confirm domain licensing. Each SeaText account is tied to a single primary URL. Development domains like
localhostor dynamic preview URLs are restricted. If you're testing on a staging subdomain, you need a separate SeaText account for that domain.
Common Causes and Their Fixes
| Symptom | Likely Cause | Fix |
|---|---|---|
| Snippet visible in editor but not on live site | Odoo website cache serving old template | Clear Odoo cache (Website → Clear cache / Regenerate assets) |
| Snippet missing even after cache clear | CDN or reverse proxy caching HTML | Purge CDN cache (Cloudflare: Purge Everything; hosting panel: clear edge cache) |
| Block exists but hidden on desktop | "Hide on Desktop" enabled in Visibility | Edit block → Visibility → uncheck Hide on Desktop → Save |
| Script tag present in source but no UI | Content Security Policy blocking SeaText domain | Add SeaText domain to CSP script-src and connect-src directives |
| Console shows 403/401 from SeaText API | Domain not authorized in SeaText account | Create a SeaText account for the exact production domain; localhost not allowed |
| Block not found in page source at all | Block placed on wrong layout or not published | Verify block on correct page layout; ensure page is published |
Odoo Caching Layers Explained
Odoo maintains several cache layers that can hide fresh edits:
- Template cache (IR UI View): Compiled QWeb templates are cached in memory and Redis. The Regenerate assets button forces recompilation.
- HTTP cache (website.cache): Rendered pages are cached per URL, per user context (logged-in vs. public). Clearing the website cache invalidates these entries.
- Asset bundles (CSS/JS): Odoo concatenates and minifies assets. If your embed code relies on a specific load order, a stale bundle may execute before the SeaText script.
- CDN/Edge cache: Many Odoo.sh, Odoo Online, and self-hosted deployments sit behind Cloudflare or a load balancer with its own TTL. Purge there as well.
If you use Odoo Online (SaaS), the Clear cache button in the website editor is usually sufficient. On Odoo.sh or on-premise, you may also need to restart the worker processes or run odoo-bin --clear-cache.
Visibility Settings That Hide the Snippet
The Embed Code block's Visibility panel includes three toggles: Hide on Mobile, Hide on Tablet, and Hide on Desktop. The integration guide specifically calls out Hide on Desktop as a step to hide the block from view on desktop devices. If you followed the guide literally and left that box checked, the block will not render on desktop browsers — exactly the symptom you're seeing. Uncheck it, save, and clear cache again.
Note: The visibility setting applies at render time via CSS display: none on the wrapper element. The script tag may still appear in page source, but the block's container is hidden, so any inline initialization that depends on the block's DOM presence may not run.
Verifying the Installation
- Open the page in a private/incognito window.
- Right-click → View Page Source.
- Search for
seatextor your account ID. - If the script tag is present, open DevTools → Network, filter by
JS, reload, and confirm the SeaText script loads with HTTP 200. - Check Console for
SeaText initializedor similar log (SeaText logs initialization when debug mode is on). - If the script loads but no UI appears, verify the page has the HTML elements SeaText targets (e.g., product titles, CTAs). SeaText rewrites existing text; it does not inject new containers unless configured to do so.
Key Facts
| Fact | Detail |
|---|---|
| Installation method | Embed Code block in Dynamic Content section of Odoo Website builder |
| Required steps | Drag Embed Code block → click Edit in right panel → paste SeaText snippet → Save → set Visibility → Save again |
| Visibility option | "Hide on Desktop" in Visibility section hides block on desktop |
| Post-install action | Visit or refresh website to see changes |
| Domain restriction | One SeaText account per primary URL; localhost and dynamic dev domains restricted |
| Multi-site usage | Create separate SeaText account for each website/domain |
Limitations and When This Advice Doesn't Apply
- Custom Odoo themes: If your theme overrides the website layout or strips unknown blocks, the Embed Code block may be removed at render time. Check theme documentation.
- Odoo version differences: Steps above reflect current Odoo Website builder (v16+). Older versions may use different block names or cache mechanisms.
- Headless/decoupled frontends: If you use Odoo only as a backend with a separate React/Vue/Next.js frontend, the Embed Code block approach does not apply; you must inject the SeaText script in your frontend build.
- Content Security Policy managed by hosting: Some managed Odoo hosts enforce a global CSP you cannot modify. In that case, contact hosting support to allow the SeaText domain.
FAQ
Why does the snippet show in the Odoo editor but not on the public site?
The editor renders a live preview that bypasses the public cache. The public site serves a cached HTML snapshot. Clear the website cache and any CDN cache.
Do I need to put the SeaText code in the <head> manually?
No. The Embed Code block places the script where you drop it. For earliest initialization, drop it near the top of the page layout (e.g., in the header area). SeaText's script self-initializes on DOMContentLoaded.
Can I use the same SeaText account for staging and production?
No. Each SeaText account is linked to a single primary URL. Create a separate account for each domain, including staging subdomains.
What if I cleared all caches and the snippet still doesn't appear?
Check the browser console for CSP errors or JavaScript exceptions. Verify the SeaText domain is allowed in your Content Security Policy. Confirm the block is on the published version of the page (not a draft).
Does SeaText work on Odoo's portal or backend views?
SeaText is designed for the public website (Website module). It does not load in the Odoo backend (/web) or customer portal (/my) unless you explicitly add the Embed Code block to those layouts, which is not standard practice.
How do I know SeaText is actually working once the snippet appears?
SeaText begins analyzing visitor reading behavior immediately. You'll see copy variants and translations appear in the SeaText dashboard as traffic accumulates. The first visible change is often AI-generated FAQ content or translated pages, depending on which agents you activated.
Can I install SeaText via a custom module instead of the Embed Code block?
Yes, developers can create a custom Odoo module that injects the script into the <head> via a QWeb template. This avoids cache/visibility issues but requires code deployment. The Embed Code block is the no-code method documented by SeaText.
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.