SDK integration

Discover FlowSync example at the end of the article.

Integrating the AB Tasty SDK is a crucial step for enabling feature experimentation and rollout (FE&R) in your application. This section guides developers through installing and configuring the SDK for their technology stack, and explains how to pass visitor IDs and user context for precise targeting.

Full developers documentation is available here:

FE&R SDK, API and integrations

1. Choose and Install the SDK

AB Tasty supports a wide range of SDKs for web, mobile, and server environments, including:

  • JavaScript, React, Angular

  • iOS, Android, React Native, Flutter

  • Java, .NET, PHP, Python, Go

To implement the SDK, a Super Admin role is required.

How to get started:

  1. Go to Settings > Feature experimentation > SDK Installation page in the AB Tasty platform.

  2. Select your environment (Web, Mobile, Server, or API).

  3. Choose the SDK that matches your stack and follow the installation instructions provided in the documentation link for your SDK.

The SDK Installation page centralizes all available SDKs and APIs, with direct links to documentation for each technology. This streamlines onboarding and reduces errors.

2. Configure the SDK

After installation, configure the SDK with your environment ID and API key, which you can find in the AB Tasty dashboard under Settings > Feature experimentation > Environment Settings.

Basic setup steps:

  1. Initialize the SDK in your application entry point.

  2. Provide the required environment ID and API key.

  3. (Optional) Configure advanced options such as bucketing mode, caching, or custom endpoints if needed.

3. Pass Visitor IDs and User Context

To enable targeted feature flags and experiments, you must pass a unique visitor ID and relevant user context to the SDK. This ensures that users are correctly segmented and receive the intended flag variations.

Visitor ID: A unique identifier for each user or session. This can be a user ID (for logged-in users) or a randomly generated ID (for anonymous users).

Context keys: A set of key-value pairs describing the user or session, used for targeting and segmentation. Common context variables include:

Context Key

Description

Example Value

user_id

Unique user identifier

"12345"

email

User email address

country

User country

"US"

language

User language

"en"

device_type

Device type

"mobile"

plan

Subscription plan

"premium"

is_logged_in

Authentication status

true/false

age

User age

29

ab_segment

Custom AB Tasty segment

"beta_group"

How to set context:

  • Pass the visitor ID and context when initializing the SDK or when creating/updating the visitor instance.

  • Update context as user information changes (e.g., after login or profile update).

4. Verify Your Implementation

After setup, use the "Verify Implementation" feature in the AB Tasty platform to ensure your SDK is correctly sending events. This real-time check confirms that your integration is live and ready for experimentation.

Go to Settings > Feature experimentation > SDK installation.

Jesse fictional example from FlowSync

As a full-stack developer at FlowSync, integrating the AB Tasty SDK was the moment everything clicked for me. Ren, our PM, had defined the first experiment and the targeting rules, but none of it could work until the SDK was live in our app.

I started by going to the SDK Installation page in the platform. I really appreciated that all the SDKs were centralized there: no hunting for documentation links. Since FlowSync has both a web app and a mobile app, I installed the ReactJS SDK for our website and the Flutter SDK for our mobile app, each in the right place.

Configuring them was straightforward: environment ID, API key, initialization in the app entry points. The part that required the most thinking was defining the visitor ID and user context. Ren and I aligned on what attributes we actually needed for targeting — things like plan type, workspace ID, and whether the user had completed onboarding. Once I passed those to the SDK, segmentation worked exactly as expected.

Before handing things back to Ren, I used the ‘Verify Implementation’ tool in the platform. Seeing the live events and flag data coming through gave me confidence the integration was solid. From there, we were ready to run our first real experiment

Last updated

Was this helpful?