A/B Testing

Tweakwise A/B Testing runs entirely within the Tweakwise platform. Variant assignment, distribution, and evaluation are handled server-side. Your implementation only needs to supply the required identifiers and events to enable consistent variant exposure and accurate measurement.

This guide outlines the exact technical requirements for developers integrating A/B testing via API or Tweakwise JS.

Integration-Agnostic

A/B testing works the same for:

  • Delivery API integrations
  • Tweakwise JS
  • Hybrid setups

No A/B-specific code is required on your side: Tweakwise returns the correct variant based on the user’s ProfileKey.

Requirements

1. profilekey on every request

Tweakwise must receive a stable user identifier with every request to ensure consistent variant assignment.

Requirements

  • You generate the profileKey (Tweakwise does not create it).
  • Include it in all Delivery API requests.
  • The key must remain stable during the user session and ideally longer.

Reference
Personalization & A/B testing

2. Event Tag implementation

A/B test reporting depends on Event Tag data. You must send at least the following events:

  • sessionstart: used for traffic and experiment entry
  • purchase: required for measuring conversions and revenue impact

If these events are missing or incomplete, A/B test results will be unreliable.

Reference
Event Tag

Notes

  • Cache: if your webshop uses caching of requests to Tweakwise, vary by profilekey.
  • Personalization: if personalization is already implemented, most prerequisites for A/B testing are already covered. In that case, the only remaining step is to ensure the Event Tag implementation is set up or validated.

Checklist

RequirementDescription
ProfileKeyMust be included in every API request
Event Tagsessionstart + purchase must be implemented
Cache rulesRequests can vary per user