Skip to main content
menu_icon.png

Everything you need to switch from Optimizely Classic to X in one place: See the Optimizely X Web Transition Guide.

x
Optimizely Knowledge Base

Access the datafile for an SDK project

This article includes general information about datafiles and how to access the datafile. For details about using the datafile in an Optimizely SDK or accessing the datafile via CDN or REST API, check out our developer documentation instead.
 
relevant products:
  • Optimizely X Full Stack
  • Optimizely X Mobile
  • Optimizely X OTT

HIS ARTICLE WILL HELP YOU:
  • Access the datafile for an SDK project
  • Debug and troubleshoot an SDK experiment 

The datafile is a JSON representation of your Optimizely SDK project. It contains all the instructions needed to run your experiments.

The datafile is updated immediately after changes to your experiments, but may take a few seconds to upload to the content delivery network (CDN). It’s important that you can update your experiments within seconds. If you’re experiencing delays longer than a minute, please contact Optimizely support.

For information about datafile versioning in Optimizely X Mobile and OTT, check out this article.

See additional resources
Here are all our articles about the Optimizely dashboard, which you'll use to create projects, add collaborators, manage privacy settings, and more: 

Here's our developer documentation, where you'll find code samples, full references for our SDKs, and getting started guides.

In general, you don’t need to access the datafile, but it can be handy if your experiments don’t update as expected. The datafile can help you debug a Full Stack experiment and confirm expected updates.

Access the datafile

Here's how to access the datafile for your project:

  1. Navigate to the Settings dashboard and select the Datafile tab.

  2. Click View to open the CDN link for the datafile.

Here's how the datafile looks in the window the CDN link opens:

Here's the datafile in properly formatted JSON:

{  
   "version":"2",
   "projectId":"7452770098",
   "experiments":[  
      {  
         "status":"Paused",
         "audienceIds":[  
            "7452562905"
         ],
         "variations":[  
            {  
               "id":"8246802115",
               "key":"Var_1"
            },
            {  
               "id":"8249740299",
               "key":"Var_2"
            },
            {  
               "id":"8248861685",
               "key":"Var_3"
            }
         ],
         "id":"8240007452",
         "key":"SEARCH_RESULTS_ALGORITHM",
         "layerId":"8244614304",
         "trafficAllocation":[  
            {  
               "entityId":"8246802115",
               "endOfRange":3333
            },
            {  
               "entityId":"8249740299",
               "endOfRange":6666
            },
            {  
               "entityId":"8248861685",
               "endOfRange":10000
            }
         ],
         "forcedVariations":{  

         }
      }
   ],
   "audiences":[  
      {  
         "conditions":"[\"and\", [\"or\", [\"or\", {\"name\": \"USER_AGENT\", \"type\": \"custom_attribute\", \"value\": \"Mobile\"}, {\"name\": \"USER_AGENT\", \"type\": \"custom_attribute\"}]]]",
         "id":"7452562905",
         "name":"Mobile web user"
      }
   ],
   "groups":[  

   ],
   "attributes":[  
      {  
         "id":"7467011421",
         "key":"USER_AGENT"
      }
   ],
   "revision":"27",
   "events":[  
      {  
         "experimentIds":[  

         ],
         "id":"7452800144",
         "key":"ebet"
      },
      {  
         "experimentIds":[  
            "8240007452"
         ],
         "id":"7463002034",
         "key":"SEARCH_EVENT_CLICK"
      },
      {  
         "experimentIds":[  

         ],
         "id":"7465572265",
         "key":"ebet1"
      }
   ],
   "accountId":"2986201432"
}