Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

The availability of features may depend on your plan type. Contact your Customer Success Manager if you have any questions.

Dev guideRecipesAPI ReferenceChangelog
Dev guideAPI ReferenceRecipesChangelogUser GuideGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev guide

Example datafile

The example shows what a datafile might contain. Use it to understand the configuration information that is passed in Optimizely Feature Experimentation.

The datafile is a JSON string that describes all the flag rules running in a given environment and dependent entities like audiences and attributes. Usually, you will not need to interact with the datafile directly. The SDK exposes methods that operate on it internally.

{
    "accountId": "12345",
    "anonymizeIP": false,
    "botFiltering": false,
    "projectId": "23456",
    "revision": "6",
    "version": "4",
    "experiments": [
        {
            "key": "my_experiment",
            "id": "45678",
            "layerId": "34567",
            "status": "Running",
            "variations": [
                {
                    "id": "56789",
                    "key": "control",
                    "variables": []
                },
                {
                    "id": "67890",
                    "key": "treatment",
                    "variables": []
                }
            ],
            "trafficAllocation": [
                {
                    "entityId": "56789",
                    "endOfRange": 5000
                },
                {
                    "entityId": "67890",
                    "endOfRange": 10000
                }
            ],
            "audienceIds": [],
            "forcedVariations": {}
        }
    ],
    "featureFlags": [
        {
            "experimentIds": [],
            "id": "56789",
            "key": "price_filter",
            "rolloutId": "67890",
            "variables": [
                {
                    "defaultValue": "100",
                    "id": "12345",
                    "key": "min_price",
                    "type": "integer"
                }
            ]
        }
    ],
    "events": [
        {
            "experimentIds": [
                "34567"
            ],
            "id": "56789",
            "key": "my_conversion"
        }
    ],
    "audiences": [],
    "attributes": [],
    "groups": [],
    "rollouts": [
        {
            "experiments": [
                {
                    "audienceIds": [],
                    "forcedVariations": {},
                    "id": "23456",
                    "key": "23456",
                    "layerId": "34567",
                    "status": "Running",
                    "trafficAllocation": [
                        {
                            "endOfRange": 5000,
                            "entityId": "45678"
                        }
                    ],
                    "variations": [
                        {
                            "featureEnabled": true,
                            "id": "56789",
                            "key": "56789",
                            "variables": [
                                {
                                    "id": "67890",
                                    "value": "100"
                                }
                            ]
                        }
                    ]
                }
            ],
            "id": "78901"
        }
    ],
    "variables": []
}

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy