Get Started

Feature flags are EnaLog's first venture into becoming a fully fledged Product Analytics tool. Our feature flags tool is designed to be simple and easy to use.

What are Feature Flags?

Simply put, feature flags allow you to expose a specific percentage of users to a new feature in your codebase.

Creating a Feature Flags

Creating Feature flags in EnaLog is simple. Head to the feature flags page and click 'New Feature Flag'. On the new feature flag page you will need to:

  • Select the project the flag should belong to
  • Give the flag a name
  • Optionally give it a description
  • Select the type. Currently we only support Boolean flags, meaning that the user each user will either be in the flag or not
  • Configure the flag by selecting the percentage of users that should be in the flag
  • Select whether the flag is active or not. If a flag isn't active then no users will be show the flag at all

Using your flag

Once you have created a flag it's straight forward to use it with one of our SDKs by passing in the flag name and your user's ID (this could be the ID in your database, their name, or email address)

Here is how to do it with the Python SDK for EnaLog:

enalog = EnaLog(api_token="12345")
res = enalog.check_feature(feature="test-1", user_id="1234")

if res:
"""If res is true then user is in the flag and should be shown new feature"""

Here is how to do it with the Node.js SDK for EnaLog:

// pass api token
const enalog = new EnaLog('12345');

try {
    res = await enalog.checkFeature('test-1', '1234');

    if (res) {
        // Show user what they should see if they're in the flag
    }
} catch (err) {
    // do something with error
}