Created
April 5, 2015 20:12
-
-
Save ryw/0961287e75f34fa41fdd to your computer and use it in GitHub Desktop.
Short script to run Keen IO funnel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1 Install node `brew install node` | |
# 2 Install coffeescript `npm install coffee-script` | |
# 3 Edit keen info and steps | |
# 4 Run script `coffee funnel.coffee` | |
Keen = require 'keen-js' | |
keen = new Keen | |
projectId: "XXX" | |
writeKey: "XXX" | |
readKey: "XXX" | |
steps = [ | |
event_collection: 'signed_up' | |
actor_property: 'userId' | |
timeframe: start: "2015-03-01T00:00:00.000Z", end: "2015-03-06T00:00:00.000Z" | |
, | |
event_collection: 'created_canvas' | |
actor_property: 'userId' | |
timeframe: start: "2015-03-06T00:00:00.000Z", end: "2015-03-09T00:00:00.000Z" | |
] | |
funnel = new Keen.Query("funnel", steps: steps) | |
keen.run funnel, (err, res)-> | |
results = res.result | |
console.log results |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment