Tutorial / Example: Simple A/B Test
This document introduces an example using the JavaScript SDK from Hackle's supported SDKs. The purpose of the example is to:
Understand what code work is needed.
Experience the features of the SDK.
Example: Simple A/B Test
The example performs the following:
Accepts an arbitrary User Identifier as input.
Clicks the Variation Distribution button.
Performs variation distribution and tracks the
hackle_test_event_keyevent.
Notes
The example runs based on an A/B test created by Hackle for demonstration purposes. This example A/B test has the following characteristics:
It is configured to let you experience multiple types of distribution reasons.
Entering
appleas the User Identifier returns variation A, andbananareturns variation B.For other input values, the variation is determined according to the Variation Distribution Principle.
To run this example with an A/B test you created in the Hackle Dashboard, you need to modify the SDK Key and Experiment Key in the JS tab.

Last updated