Frequently Asked Questions
Technical Questions
Q: Will the SDK slow down my website?
A: No. The SDK loads asynchronously, is ~280KB gzipped, and runs non-blocking.
Q: Does it work with SPA frameworks?
A: Yes. Full compatibility with React, Vue, Angular, Svelte, Next.js, and Nuxt.js. History API is automatically monitored.
Q: What happens when offline?
A: Events are queued in localStorage and automatically sent when internet connection is restored.
Q: Is it GDPR/KVKK compliant?
A: Yes. First-party data is collected, and user consent management can be integrated.
Q: How does the A/B test client decide which variant to show?
A: The SDK sends the user identifier (fingerprint or customer-supplied ID via b2mSetUserId) and any targeting properties to the B2Metric experiments service, which returns the assigned group. Assignments are cached in localStorage for 24 hours by default, so the same user keeps the same variant across sessions and page loads.
Q: What happens if the experiments API is unreachable?
A: Fail-soft. If a fresh fetch fails, the SDK serves whatever cached assignments exist. If no cache exists for that user, b2mAssignExperiment returns an empty array and the site should fall back to its control experience.
Q: Will the same user see different variants on Chrome and Firefox?
A: No — by default the fingerprint is derived from device-stable signals (screen, hardware, IANA timezone, locale), so the same user on Chrome and Firefox of the same device gets the same assignment without any extra setup. Calling b2mSetUserId(externalId) after a user signs in is recommended to extend that consistency across devices as well.
Integration Questions
Q: How long does integration take?
A: Basic integration: 5 minutes. Full e-commerce setup: 1-2 hours.
Q: Can we migrate existing data?
A: Yes. Data transfer is possible via CSV, JSON, or API.