Splitworthy documentation

JavaScript snippet

Add the real browser bundle to an ownership-verified website.

Public browser methods

window.testwell and window.expcon are compatibility aliases. The automatic bundle exposes grantConsent, revokeConsent, trackGoal and destroy. It does NOT expose getVariation or recordExposure; developer-controlled rendering needs the programmatic source SDK or React adapter.

trackGoal returns whether a configured custom goal matched locally, not confirmation that the server recorded a conversion. No valid prior exposure means no attributed conversion.

javascript
window.testwell?.grantConsent();
// Only after the application confirms a real successful action:
window.testwell?.trackGoal("signup_completed");
// Consent withdrawal:
window.testwell?.revokeConsent();
// When permanently removing the integration:
window.testwell?.destroy();

Text delivery and single-page navigation

The target must be unique and match the expected original text and element kind. Unsupported or ambiguous matches leave the original unchanged. Only a safe explicit target ID may receive bounded protection; the entire page is never hidden.

Configuration and text delivery use a 350ms window. Late-rendered content may be excluded rather than changed seconds later. pushState, replaceState and popstate pathname changes trigger fresh configuration. Query/hash-only navigation does not. Sensitive query strings are not sent in event payloads.

Configuration is uncached and refreshes every 30 seconds in foreground sessions. Network failure restores changed DOM text. Background timer throttling means the platform stop is not an exact 30-second wall-clock guarantee.