Note: This functionality requires an Optimizely plan with access to "Event Data Export"
The following uses the open source command line tool oevents.
- A terminal to run the
oevents
bash script (any OS X and most GNU/Linux distributions) - jq - a command-line processor
- curl (Note: All versions of OS X starting with Jaguar come with curl installed)
- The Amazon AWS CLI (v2+)
- Experiment with data that's at least one day old
- Download the
oevents
command line tool here - Place it in a directory of your choosing
- Make sure it's executable by opening a terminal to the location in the previous step and calling:
chmod +x oevents
- Add oevents to a directory in your
PATH
environment variable with:
sudo cp oevents /usr/local/bin/
- Now we can call the script from the terminal to make sure it's working:
oevents help
- Open Optimizely's application
- Navigate to Profile -> API Access
- Generate a personal access token and save it in a safe place
- Set your personal access token as an environment variable in your terminal with:
export OPTIMIZELY_API_TOKEN=<token>
Enriched Events are partitioned into two top-level datasets, decisions (type=decisions
) and conversions (type=events
). Each of these datasets is partitioned by date and experiment (for decisions) or event type (for conversions).
You can use oevents ls
to list all of the experiments that produced decision data on a given date:
$ oevents ls --type decisions --date 2020-07-22
PRE experiment=10676850402/
PRE experiment=14386840295/
PRE experiment=14821050982/
PRE experiment=15117030650/
PRE experiment=17517981213/
PRE experiment=17535310125/
PRE experiment=8997901009/
You can also use oevents
to list all of the event types collected on a given day:
$ oevents ls --type events --date 2020-07-22
PRE event=search_query/
PRE event=search_results_click/
PRE event=add_to_cart/
PRE event=purchase/
You can use oevents load
to download your Enriched Event data in Apache Parquet format. Command line arguments can be used to specify a progressively narrower subset of your data.
To download all enriched event data associated with your Optimizely account:
$ oevents load --output ./optimizely_data
To download all decision data associated with your Optimizely account:
$ oevents load \
--type decisions \
--output ./optimizely_data
To download all decision data collected between July 1st and 5th, 2020:
$ oevents load \
--type decisions \
--start 2020-07-22 \
--end 2020-07-24 \
--output ./optimizely_data
To download all decision data for experiment 12345
collected between July 1st and 5th, 2020:
$ oevents load \
--type decisions \
--start 2020-07-22 \
--end 2020-07-24 \
--experiment 12345 \
--output ./optimizely_data
Use a tool like Visual Studio Code with the Parquet extension to view your parquet data in a more friendly JSON format.
oevents
open source on Github! You can also read the data specification for Enriched Event Export for more information on the event data format.