Skip to main content
The Confidence SDKs use OpenFeature’s Evaluation Context to pass context data for flag evaluations. The context contains information about the user, session, or environment that Confidence uses for targeting rules and randomization. Here is an example with the Go SDK:

Managed Contexts

The Confidence SDKs can generate contextual data automatically, depending on the SDK.

Visitor ID

Supported SDKs: JS (Client), Android, iOS, Flutter The visitor_id is a unique identifier for each installation of a mobile application or browser instance (cookie). This context field is automatically added to the context by the mobile SDKs. You can override its value by setting a custom context with the same key: visitor_id.
When using a combination of Client SDKs and Server SDKs, you should append the visitor_id in relevant endpoint calls to your backend. This way, the Server SDK can access it. Client SDKs expose APIs to read the visitor_id for this purpose.
Refer to the dedicated section for more information on how and when to use the visitor ID as your entity: Entities.

Page

Supported SDKs: JS (Client) Data about the current webpage where the user is at. The various fields are all wrapped in a page struct:
  • path
  • referrer
  • search
  • title
  • url
This page data is opt-in: refer to the SDK README for more information on how to enable this context data in your application.

Device Information

Supported SDKs: Android, iOS The device information context adds these entries, grouped by option:
  • App information: app.version, app.build, and app.namespace (the bundle ID or package name)
  • Device information: device.manufacturer, device.model, and device.type. Android also adds device.brand
  • OS information: os.name and os.version
  • Locale: locale and preferred_languages
These fields are opt-in. Enable them with ConfidenceDeviceInfoContextDecorator on iOS or ConfidenceDeviceInfoContextProducer on Android. Refer to each SDK README (iOS, Android) for more information on how to enable this context data in your application.

Confidence SDKs

Overview of available SDKs

Entities

Configure entity types

Flag Audience

Configure flag targeting