##Instructions for downloading, compiling, and parsing KISSmetrics data exports by event
####Summary: The KISSmetrics data export feature does not allow users an easy way to analyze data by event. This Gist outlines instructions for downloading and parsing KISSmetrics data for event-level analysis.
#####Step 1: Export data from KISSmetrics
Set up AWS S3 bucket.
Export data from KISSmetrics to your S3 bucket.
- You will see a bunch of .json files.
- These .json files will contain all events that occur within a set timeframe (~1 hour).
- Note: The AWS web interface only allows you to download one file at a time. To download multiple files, you will need the AWS CLI.
#####Step 2: Download data using AWS CLI
- Choose your own adventure!
- AWS Access Key ID
- AWS Secret Access Key
- Default region name
- Default output format (optional)
Download files from S3.
$ aws s3 sync s3://mybucket /mylocalpath
#####Step 3: Augment data
Install this handy gem from Clay Whitley.
$ gem install km-export-processor -v 0.3.6
Navigate to location of downloaded KM files.
$ cd Documents/km-export
Compile .json files into single file.
$ km-export-processor json_compiler
Perform any parsing/conversions on the resulting compiled file.
$ km-export-processor json_to_csv <file_name>.json
$ km-export-processor json_to_json <file_name>.json
$ km-export-processor parse_identity <file_name>.json [email protected]
#####Step 4: Analyze data!