For the complete documentation index, see llms.txt. This page is also available as Markdown.

Quick Start

This guide shows you how to integrate the Hackle SDK to run A/B Tests and collect events.

You can find your SDK Key in the Hackle Dashboard under Settings > SDK Integration Info.

1

Install SDK

Add the dependency to build.gradle.

repositories {
    mavenCentral()
}

dependencies {
    implementation 'io.hackle:hackle-android-sdk:2+'
}
2

Initialize SDK

import io.hackle.android.Hackle
import io.hackle.android.initialize

Hackle.initialize(applicationContext, "YOUR_APP_SDK_KEY") {
    // SDK initialization complete
}
3

Variation Distribution

Pass the Experiment Key to determine the user's variation.

val hackleApp = Hackle.app()
val variation = hackleApp.variation(EXPERIMENT_KEY)

if (variation == Variation.A) {
    // Group A
} else if (variation == Variation.B) {
    // Group B
}
4

Event Tracking

Track user behavior events.

hackleApp.track("EVENT_KEY")

For detailed options at each step, refer to the Android SDK documentation.

1

Install SDK

Install via Swift Package Manager or CocoaPods.

Swift Package Manager

https://github.com/hackle-io/hackle-ios-sdk.git

CocoaPods

pod 'Hackle'
2

Initialize SDK

import Hackle

Hackle.initialize(sdkKey: "YOUR_APP_SDK_KEY") {
    // SDK initialization complete
}
3

Variation Distribution

Pass the Experiment Key to determine the user's variation.

let hackleApp = Hackle.app()
let variation = hackleApp.variation(experimentKey: EXPERIMENT_KEY)

if variation == "A" {
    // Group A
} else if variation == "B" {
    // Group B
}
4

Event Tracking

Track user behavior events.

hackleApp.track(eventKey: "EVENT_KEY")

For detailed options at each step, refer to the iOS SDK documentation.

1

Install SDK

Install via npm.

npm install @hackler/javascript-sdk
2

Initialize SDK

import * as Hackle from "@hackler/javascript-sdk";

const hackleClient = Hackle.createInstance("YOUR_BROWSER_SDK_KEY");
3

Variation Distribution

Pass the Experiment Key to determine the user's variation.

hackleClient.onReady(function () {
    const variation = hackleClient.variation(EXPERIMENT_KEY);

    if (variation === "A") {
        // Group A
    } else if (variation === "B") {
        // Group B
    }
});
4

Event Tracking

Track user behavior events.

hackleClient.track({ key: "EVENT_KEY" });

For detailed options at each step, refer to the JavaScript SDK documentation.

Last updated