SDK Configuration
window.AB_CONFIG
Section titled “window.AB_CONFIG”Optional configuration object. Set before the SDK script loads:
<script> window.AB_CONFIG = { base: "https://appbe.endlesstesting.ai", analyticsPath: "/api/events", blockUntilVariants: false };</script>| Property | Type | Default | Description |
|---|---|---|---|
base | string | Script’s data-base attribute | Backend API base URL |
analyticsPath | string | "/api/events" | Event tracking endpoint path |
blockUntilVariants | boolean | false | Wait for variants before rendering |
Session tracking
Section titled “Session tracking”The SDK uses a 30-day session cookie to:
- Prevent duplicate impressions from the same visitor
- Ensure consistent variant assignment across page loads
- Track conversions back to the original variant exposure
Conversion tracking
Section titled “Conversion tracking”Conversions are tracked based on the conversion metrics you configured during endlesstesting init:
- Primary metric: Main CTA (e.g., “Sign Up” button clicks)
- Secondary metrics: Supporting actions (e.g., “Learn More” clicks)
- Tertiary metrics: Micro-conversions (e.g., scroll depth, time on page)
The SDK matches click targets against your configured keywords to classify events.