This page is about redirect (split URL) tests, where some visitors are sent to another URL. Visual editor tests change the page in place and don't need any of this.
Why the original page can flash
The standard snippet loads CROforce in the background, so your page never waits for it. On a redirect test page, the browser can draw the original page in the time it takes the script to load and pick a variant. A visitor in the variant then sees the original for a moment before being redirected.
Returning visitors are redirected within a few milliseconds of the script starting, because their browser has a saved copy of your redirect tests. First-time visitors are the ones who may see the flash.
Pick a setup
Setup | Original page visible? | Extra wait before the page draws | Use it when |
|---|---|---|---|
Standard snippet only | Possibly, until the redirect | None | A brief flash is acceptable. |
A. Hide snippet (recommended) | No — blank instead | None, but content shows later | Almost always. |
B. | Rarely, at the very start | None | You can only edit the snippet, not the page. |
C. | Possibly, shortest | About 20–80 ms | Together with A, to decide faster for first-time visitors. |
D. Synchronous install | No | About 50–150 ms | Zero flash matters more than load speed on this page. |
A. Add the hide snippet (recommended)
Add this to the test page only, as high in the <head> as you can — above the CROforce snippet:
<style id="entail-hide-page">html{opacity:0 !important}</style>
<script>setTimeout(function(){var s=document.getElementById('entail-hide-page');if(s)s.remove()},1500)</script>- The page stays blank from the first paint until CROforce decides. Then it shows the page (no test, or the visitor is in the original) or redirects (the visitor is in the variant).
- During a redirect, CROforce keeps the page hidden until the browser leaves it, even past 1.5 seconds.
- If CROforce can't load, the page shows after 1.5 seconds at most.
- You don't need any extra option: CROforce finds the snippet by its
id.
Prefer your brand color to white? CROforce removes the element by its id, whatever its CSS. For example: <style id="entail-hide-page">html{background:#0b1430 !important}body{visibility:hidden !important}</style>
B. Use the hide_page option
entailInsights.init('YOUR_SITE_TOKEN', { disable_decide: false, hide_page: true });CROforce hides the page itself once it runs. Because it loads in the background, the page may already be drawn by then, so a visitor can still glimpse the original. Use the hide snippet for zero flash. The longest it stays hidden while deciding is hide_page_timeout_ms (1500 ms by default).
If your snippet is shared by the whole site — in Webflow or Google Tag Manager, say — turn it on only for the test pages:
entailInsights.init('YOUR_SITE_TOKEN', {
disable_decide: false,
hide_page: ['/lp/get-started-for-free'].indexOf(location.pathname.replace(/\/$/, '')) !== -1,
});Don't turn it on for every page. On a first-time visitor's first page, it can hold the first paint until your test rules arrive (roughly 20–300 ms).
C. Add rules.js
This script gives the page your active redirect tests up front, so CROforce can decide for a first-time visitor without waiting for the network. Put it on test pages only, before the CROforce snippet:
<script crossorigin="anonymous" src="https://widgets.entail.ai/campaigns/redirect-rules/YOUR_SITE_TOKEN/rules.js"></script>- Keep
crossorigin="anonymous". Without it, the server can't tell which website is asking and returns no rules. Nothing breaks, but you get no speed-up. - Can't put it first? Webflow, for one, outputs page code after site-wide code. That's fine: CROforce notices the tag and waits for it, up to one second, rather than fetching the rules itself.
- Cost: the page waits for it — about 20–80 ms on a first visit, close to nothing once cached.
Your site token is the first argument of init in your snippet.
D. Install synchronously on the test page
On the test page only, replace the standard snippet with this, at the very top of <head>:
<link rel="preconnect" href="https://DESTINATION-HOST">
<script crossorigin="anonymous" src="https://widgets.entail.ai/campaigns/redirect-rules/YOUR_SITE_TOKEN/rules.js"></script>
<script src="https://cdn.entail-insights.com/js/entail.js"></script>
<script>entailInsights.init('YOUR_SITE_TOKEN', { disable_decide: false, hide_page: true });</script>Replace DESTINATION-HOST with the host of your variant page, like try.example.com. CROforce runs before the page is drawn, so a variant visitor is redirected before anything appears — first-time and returning visitors alike.
Never use it site-wide. The page waits for both scripts (about 50–150 ms on a first visit), which delays Largest Contentful Paint and shows up in Lighthouse as render-blocking. The page also depends on CROforce being reachable.
If you use Google Tag Manager
Tags added through Tag Manager run only after Tag Manager itself loads, often 300 ms to a second or more. Put the hide snippet (option A above) directly in the test page's <head>, not in Tag Manager. The CROforce snippet can stay in Tag Manager.
If you use Webflow
- Site-wide code (Site settings › Custom code › Head code) is output before a page's own code, so page-level additions always come after the site-wide snippet.
- Add the hide snippet and
rules.jsin the test page's own settings. Both still work. - Publish the site after changing custom code.
Check the test
- Open the test page with
?test_variant=testadded to the URL. You should land on the variant without seeing the original. - Open it with
?test_variant=control. The original should show after a blank moment.
Neither visit is counted in your results. More in Preview URL parameters.
Good to know
- Query strings carry over. UTM tags,
gclidand other parameters on the visitor's URL are passed to the variant for exact redirects, and for wildcard redirects when the test keeps the query string. Parameters the variant URL sets itself win. - Stopping a test. New visitors stop being redirected within about a minute. A returning visitor's saved copy can still redirect them on about their next page view, for up to 10 minutes.
- Tests that target countries or new and returning visitors are decided by the server, so they take a little longer than other redirect tests.
- The back button returns to the original page without redirecting again.
- Redirect (split URL) tests: Set up the test itself.
- Preview URL parameters: Force a variant before going live.
- init options: hide_page and the other options.
Frequently asked questions
Why do visitors see the original page before the redirect?
The tracking script loads in the background so it never slows your site. On a redirect test page the browser can draw the original page before the script decides to redirect. Hiding the page until it decides removes that flash.
Does hiding the page hurt Core Web Vitals?
Hidden content doesn't count as painted, so Largest Contentful Paint is pushed back while the page is hidden. Layout shift isn't affected. Add the hide snippet only to pages that run a redirect test.
What happens if CROforce can't load?
The hide snippet removes itself after 1.5 seconds, so the page always shows.
