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
Keen.configure(window.ENV.keenProjectId,window.ENV.keenApiKey), | |
Keen.onChartsReady(function(){ | |
var e=new Keen.Series("connect",{ | |
analysisType:"count", | |
timeframe:"last_7_days", | |
interval:"daily" | |
}), | |
t=new Keen.Series("connect",{ |
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
require 'rubygems' | |
require 'net/http' | |
require 'net/https' | |
require 'uri' | |
require 'json' | |
require 'date' | |
require 'active_support/all' #for datetime calculation e.g. weeks.ago.at_beginning_of_week | |
# Keen Project Info | |
$projectID = "your project ID" |
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
d90e5b5598497773de1c57407dd54d65934ba1b5911f6f47311d3c729f510bb5c295284780017a56f17e49234f19c009bfa57f7941413a5dd3c282d7db3692a192b58ea926b637cdcd11377e1e74086641e0672c8b3406aeed49d63ee0a3a3d3751ae7744f08b999df38ca2ccdbb9a2c |
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
Keen.configure({ | |
projectId: id, | |
readKey: key | |
}); | |
// Timeframe parameters for queries | |
var timeframe = "last_14_days" | |
var interval = "daily" | |
Keen.onChartsReady(function(){ |
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
require 'rubygems' | |
require 'keen' | |
require 'json' | |
require 'date' | |
require 'active_support/all' #for datetime calculation e.g. weeks.ago.at_beginning_of_week | |
require 'simple_xlsx' #for outputting excel files | |
require 'cgi' #for URL encoding | |
#================================oOo=================================== |
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
require 'rubygems' | |
require 'net/http' | |
require 'net/https' | |
require 'keen' | |
require 'uri' | |
require 'json' | |
require 'date' | |
# This script runs a group_by query and outputs the results to a CSV | |
#================================oOo=================================== |
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
var query = new Keen.SavedQuery("activity_09_2013"); | |
query.getResponse(function(response){ | |
console.log(response.result); | |
// Call Michelle's gross function | |
drawMyLineChart(response, "daily", div , title) | |
}); | |
function drawMyLineChart(response, interval, div, title) { |
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
Keen.onChartsReady(function() { | |
var series = new Keen.Series("registrations", { | |
analysisType: "count", | |
timeframe: "last_30_weeks", | |
interval: "weekly" | |
}); | |
series.getResponse(function(response){ | |
keenData = response.result; |
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
Keen.onChartsReady(function() { | |
var metric = new Keen.Metric("Stripe_Events", { | |
analysisType: "sum", | |
targetProperty: "data.object.amount_refunded", | |
filters: [{"property_name":"type","operator":"eq","property_value":"charge.refunded"}] | |
}); | |
metric.draw(document.getElementById("someDiv")); | |
}); |
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
Keen.onChartsReady(function() { | |
var totalRevenueSeries = new Keen.Series("transactions", { | |
analysisType: "sum", | |
timeframe: "last_30_days", | |
interval: "daily", | |
targetProperty: "amount" | |
}); | |
var totalActiveUsersSeries = new Keen.Series("plays", { |
OlderNewer