This article helps you:
Create a deployment to house your experiment
Install the SDK you wish to use for your experiment
The first step in creating an experiment is to configure it. Configuring is a brief, two-stage process: first you’ll create a deployment, then you’ll install the SDK you want to use.
In Amplitude Experiment, a deployment is where you can serve a group of flags or experiments for code execution. Once you create a deployment, Experiment generates an access key, which you can then use to properly route your flags and experiments.
Deployments live under Amplitude Analytics projects. A project can have multiple deployments, but you can attach each deployment to a single project.
To create a deployment follow these steps:
If you don't use the REST API, the next step is to install an Experiment SDK.
All SDKs send a request to Amplitude Experiment to decide what flag configurations it should serve to a particular user. That said, there are some important differences between client-side and server-side SDKs you should be aware of.
Client-side SDKs should run in the end-user application deployment. When choosing between client-side and server-side, keep in mind that client-side SDKs:
Server-side SDKs, should run in a server deployment. Server-side SDKs:
When assigning variants, the evaluation engine applies the targeting rules to a user context object, which represents the identity of an individual user. In client-side SDKs, this object-user relationship is set on initialization and passed to the server on every request for variants. In server-side SDKs, the user may change, and should be set on every request.
When targeting individual users to assign variants, Experiment matches on any of the listed user identifiers, such as user_id
and device_id
. Using rule-based user segments, users match on any of the predefined properties (country, platform, etc.), or on custom properties specified in the user_properties object. Read more about defining experiment users in this article.
You should use the same user identifiers for Amplitude Experiment that you use for sending data to Amplitude Analytics. This way, identities resolve correctly, and data generated is correctly associated with the same user in Analytics.
Thanks for your feedback!
April 30th, 2024
Need help? Contact Support
Visit Amplitude.com
Have a look at the Amplitude Blog
Learn more at Amplitude Academy
© 2024 Amplitude, Inc. All rights reserved. Amplitude is a registered trademark of Amplitude, Inc.