Pass options as an object after your site token:
entailInsights.init('YOUR_SITE_TOKEN', {
disable_decide: false,
autocapture: false, // example: don't track clicks on this page
});Options turn things off on this page only. They can't switch on a feature that's off for your website in CROforce. Setting popups: true doesn't show popups if none are live.
Turn features off on a page
Option | Default | What it does |
|---|---|---|
|
| Runs your A/B tests and feature flags. |
|
| Places your campaigns ' widgets. false also turns off redirect tests , which run through campaigns. |
|
| Renders widgets you placed in your HTML and the notification bar . |
|
| Shows your popups . |
|
| Shows your quizzes . |
|
| Loads widgets placed in your HTML only as they come near the screen. |
Tracking
Option | Default | What it does |
|---|---|---|
|
| Sends a page view on load and on every route change in a single-page app . |
|
| Tracks clicks, form submissions and field changes. See Automatically tracked events . |
|
| Records a rage click when someone clicks the same spot three times within a second each. |
|
| Leaves out the text of what visitors click. |
|
| Leaves out the attributes (like |
|
| Records which site the visitor came from. |
|
| Records UTM parameters ( |
|
| Extra URL parameters to record the same way, for example |
|
| Extra user-agent strings to treat as bots — for your own uptime monitor, say. Bots never get tests, campaigns or popups. |
Redirect tests
Option | Default | What it does |
|---|---|---|
|
| Hides the page while a redirect test decides whether to send the visitor elsewhere. Use it only on test pages. |
|
| The longest the page stays hidden while deciding, in milliseconds. |
|
| Decides redirect tests in the browser, which is faster than waiting for the server. |
|
| How long a returning visitor's saved copy of your redirect tests is used. Also how long a stopped test can still redirect someone who saw it. |
When to use these: Redirect tests without flicker.
Cookies and storage
Option | Default | What it does |
|---|---|---|
|
| Where visitor IDs are kept: |
|
| Stores nothing in cookies or browser storage. |
|
| Days the |
|
| Sets the cookie on your root domain, so www.example.com and shop.example.com share one visitor. See Visitor IDs . |
|
| Sends the cookie over HTTPS only. |
Turning storage off changes your numbers. Without a stored visitor ID, a returning visitor counts as new, and a visitor can see a different test variant on each page.
Settings and loading
Option | Default | What it does |
|---|---|---|
|
| Keep it |
|
| How long the browser reuses your website's settings. |
| does nothing | A function called once the SDK is ready, with the SDK as its argument. |
entailInsights.init('YOUR_SITE_TOKEN', {
disable_decide: false,
loaded: function (sdk) {
// The SDK is ready: methods that the snippet doesn't queue work now.
console.log('CROforce visitor', sdk.get_distinct_id());
},
});Different options on some pages
Build the options from the URL. This keeps popups off the checkout and hides the page only on a redirect test page:
var path = location.pathname.replace(/\/$/, '');
entailInsights.init('YOUR_SITE_TOKEN', {
disable_decide: false,
popups: path.indexOf('/checkout') !== 0,
hide_page: path === '/lp/get-started',
});- How the snippet works: The stub, async loading and duplicate protection.
- Consent and privacy: Stop tracking when a visitor declines.
- Redirect tests without flicker: Hide the original page while the test decides.
Frequently asked questions
Do I need to change any options?
No. The snippet works as it is. Options are for special cases: a page where you don't want popups, a redirect test page, or a site that must not use cookies.
Can I set different options on different pages?
Yes. Options apply to the page where
runs, so you can build the options object from init
.location.pathname
