Skip to main content

Overview

This guide covers using Mixpanel’s Feature Flags through the OpenFeature standard with the Mixpanel Go OpenFeature provider. OpenFeature provides a vendor-agnostic API for feature flag evaluation, allowing you to switch between providers without changing your application code. For the native Mixpanel SDK approach, see the Feature Flags (Go) guide.

Prerequisites

Installation

Quick Start

Initialization

Flag definitions are fetched from Mixpanel and evaluated locally. This is faster and works offline after the initial fetch.
Targeting by Mixpanel cohorts and sticky variants are not supported in Local Evaluation mode.

Remote Evaluation

Each flag evaluation makes a request to Mixpanel’s servers.

Using an Existing Mixpanel Instance

Usage

Flag Types and Evaluation Methods

Evaluation Context

Unlike some providers, targetingKey is not used as a special bucketing key. It is passed as another context property. Mixpanel’s server-side configuration determines which properties are used for targeting and bucketing.

Full Resolution Details

Accessing the Underlying Mixpanel Client

Shutdown

Error Handling

Troubleshooting

Flags Always Return Default Values

  1. Provider not ready: Ensure polling has started and definitions have been received.
  2. Flag not configured: Verify the flag exists and is enabled in your Mixpanel project.
  3. Network issues: For remote evaluation, check that your application can reach Mixpanel’s API.

Type Mismatch Errors

The flag’s value type must match the evaluation method. IntValue() accepts whole-number float64 values. FloatValue() accepts any numeric type.