Skip to content

SDK Configuration

Optional configuration object. Set before the SDK script loads:

<script>
window.AB_CONFIG = {
base: "https://appbe.endlesstesting.ai",
analyticsPath: "/api/events",
blockUntilVariants: false
};
</script>
PropertyTypeDefaultDescription
basestringScript’s data-base attributeBackend API base URL
analyticsPathstring"/api/events"Event tracking endpoint path
blockUntilVariantsbooleanfalseWait for variants before rendering

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

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.