Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions docs/tracking-methods/sdks/nodejs/nodejs-flags.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

## Overview

This developer guide will assist you in configuring your server-side Node.js platform for [Feature Flags](/docs/featureflags) using the [Mixpanel Node.js SDK](/docs/tracking-methods/sdks/nodejs). Feature Flags allow you to control the rollout of your features, conduct A/B testing, and manage application behavior without deploying new code.

Check warning on line 8 in docs/tracking-methods/sdks/nodejs/nodejs-flags.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mixpanel-edb78807) - vale-spellcheck

docs/tracking-methods/sdks/nodejs/nodejs-flags.mdx#L8

Did you really mean 'rollout'?

## Prerequisites

Expand All @@ -18,27 +18,23 @@

There are two scenarios available for using the Node.js SDK for feature flagging: Local Evaluation and Remote Evaluation.

For local evaluation, the SDK will poll Mixpanel servers for feature flag configurations. Assignment of user contexts to variants will be done locally within the SDK. This mode is recommended for low latency since there is no network call made at assignment time.

Check warning on line 21 in docs/tracking-methods/sdks/nodejs/nodejs-flags.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mixpanel-edb78807) - vale-spellcheck

docs/tracking-methods/sdks/nodejs/nodejs-flags.mdx#L21

Did you really mean 'Mixpanel'?

For remote evaluation, the SDK will make a network call to Mixpanel servers at assignment time. This mode is recommended for use cases where you want to leverage Mixpanel cohorts for user targeting or sticky variants for persistent variant assignments.

Check warning on line 23 in docs/tracking-methods/sdks/nodejs/nodejs-flags.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mixpanel-edb78807) - vale-spellcheck

docs/tracking-methods/sdks/nodejs/nodejs-flags.mdx#L23

Did you really mean 'Mixpanel'?

Check warning on line 23 in docs/tracking-methods/sdks/nodejs/nodejs-flags.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mixpanel-edb78807) - vale-spellcheck

docs/tracking-methods/sdks/nodejs/nodejs-flags.mdx#L23

Did you really mean 'Mixpanel'?

In either case there is also the capability to evaluate all flags for a given user context at once, to avoid needing to make multiple calls to get individual flag variants for the same user. This is particularly useful for remote evaluation to avoid incurring additional network calls.

## Local Evaluation

<Warning>
Support for runtime targeting has not yet been released. Thus runtime rules other than a single-condition, exact match key-value pair, will ALWAYS be evaluated to true.
</Warning>

<Warning>
Targeting by Mixpanel cohorts and sticky variants are not supported in Local Evaluation mode.

Check warning on line 30 in docs/tracking-methods/sdks/nodejs/nodejs-flags.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mixpanel-edb78807) - vale-spellcheck

docs/tracking-methods/sdks/nodejs/nodejs-flags.mdx#L30

Did you really mean 'Mixpanel'?
</Warning>


- The SDK is configured with a `local_flags_config` object that specifies parameters:
1) `api_host` - If your project is in the EU/IN region, this should be set to route to `api-eu.mixpanel.com`/`api-in.mixpanel.com` respectively.
2) `enable_polling` - This should be set to `true` to enable polling for new flag configurations.
3) `polling_interval_in_seconds` - This is the interval in seconds at which the SDK will poll Mixpanel servers for feature flag configurations.

Check warning on line 37 in docs/tracking-methods/sdks/nodejs/nodejs-flags.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mixpanel-edb78807) - vale-spellcheck

docs/tracking-methods/sdks/nodejs/nodejs-flags.mdx#L37

Did you really mean 'Mixpanel'?

- The SDK will continue to poll for the lifetime of the SDK instance or until stopped.

Expand Down