Skip to content

Commit

Permalink
Merge pull request #388 from keen/release-v3.4.0
Browse files Browse the repository at this point in the history
v3.4.0 release
  • Loading branch information
Dustin Larimer committed Feb 18, 2016
2 parents 572e258 + 421fa4b commit a8fa7c3
Show file tree
Hide file tree
Showing 21 changed files with 389 additions and 244 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@
<a name="unreleased"></a>
# Unreleased
-->

<a name="3.4.0"></a>
# New features, fixed scoped key generation

**Fixed:**
* Scoped key generation support has been restored (#389): Recent improvements to scoped keys validation by the API invalidate keys generated by this and several other SDKs, resulting in an Invalid API Key Error. Newly generated scoped key could be successfully encrypted/decrypted, but cannot be used. This has been fixed.
* C3.js option construction how allows for more control of the `data` object passed in via `chartOptions` (#386)
* Fix Metric handling of empty results (#372)
* Fixed internal error handling when using unsupported `chartType` values (#382)

**New:**
* Automatic parsing and visualization of multi-group-by queries (#326)
* `dateFormat` configuration option/method, which accepts a string or function that is used by the chosen underlying visualization suite (currently only supported by Google Charts and C3.js) (#381)
* Improved documentation for RequireJS and JSPM use (#298, #341)
* Removed all `camelCase` API parameters from docs (#387) to avoid common confusion


<a name="3.3.0"></a>
# 3.3.0 Saved/Cached Queries and fixes

Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Keen IO JavaScript SDK (v3.4.0-rc)
# Keen IO JavaScript SDK (v3.4.0)

<!--
[![Build Status](https://api.travis-ci.org/keen/keen-js.png?branch=master)](https://travis-ci.org/keen/keen-js) [![Selenium Test Status](https://saucelabs.com/buildstatus/keenlabs-js)](https://saucelabs.com/u/keenlabs-js)
Expand Down Expand Up @@ -29,19 +29,19 @@ To start recording events from your website or blog, copy/paste this snippet of

```html
<script type="text/javascript">
!function(a,b){a("Keen","https://d26b395fwzu5fz.cloudfront.net/3.4.0-rc/keen.min.js",b)}(function(a,b,c){var d,e,f;c["_"+a]={},c[a]=function(b){c["_"+a].clients=c["_"+a].clients||{},c["_"+a].clients[b.projectId]=this,this._config=b},c[a].ready=function(b){c["_"+a].ready=c["_"+a].ready||[],c["_"+a].ready.push(b)},d=["addEvent","setGlobalProperties","trackExternalLink","on"];for(var g=0;g<d.length;g++){var h=d[g],i=function(a){return function(){return this["_"+a]=this["_"+a]||[],this["_"+a].push(arguments),this}};c[a].prototype[h]=i(h)}e=document.createElement("script"),e.async=!0,e.src=b,f=document.getElementsByTagName("script")[0],f.parentNode.insertBefore(e,f)},this);
!function(a,b){a("Keen","https://d26b395fwzu5fz.cloudfront.net/3.4.0/keen.min.js",b)}(function(a,b,c){var d,e,f;c["_"+a]={},c[a]=function(b){c["_"+a].clients=c["_"+a].clients||{},c["_"+a].clients[b.projectId]=this,this._config=b},c[a].ready=function(b){c["_"+a].ready=c["_"+a].ready||[],c["_"+a].ready.push(b)},d=["addEvent","setGlobalProperties","trackExternalLink","on"];for(var g=0;g<d.length;g++){var h=d[g],i=function(a){return function(){return this["_"+a]=this["_"+a]||[],this["_"+a].push(arguments),this}};c[a].prototype[h]=i(h)}e=document.createElement("script"),e.async=!0,e.src=b,f=document.getElementsByTagName("script")[0],f.parentNode.insertBefore(e,f)},this);
</script>
```

Or load the library synchronously from our CDN:

```html
<script src="https://d26b395fwzu5fz.cloudfront.net/3.4.0-rc/keen.min.js" type="text/javascript"></script>
<script src="https://d26b395fwzu5fz.cloudfront.net/3.4.0/keen.min.js" type="text/javascript"></script>
```
or

```html
<script src="//cdn.jsdelivr.net/keen.js/3.4.0-rc/keen.min.js" type="text/javascript"></script>
<script src="//cdn.jsdelivr.net/keen.js/3.4.0/keen.min.js" type="text/javascript"></script>
```

Read our [Installation guide](./docs/installation.md) to learn about all the ways this library can fit into your workflow.
Expand Down Expand Up @@ -173,7 +173,7 @@ The `<Client>.run` method is available on each configured client instance to run

```javascript
var your_analysis = new Keen.Query(analysisType, {
eventCollection: 'YOUR_EVENT_COLLECTION', // (required)
event_collection: 'YOUR_EVENT_COLLECTION', // (required)
timeframe: "YOUR_TIMEFRAME" // (required)
// ... additional parameters
});
Expand All @@ -192,8 +192,8 @@ Keen.ready(function(){

// Create a query instance
var count = new Keen.Query("count", {
eventCollection: "pageviews",
groupBy: "property",
event_collection: "pageviews",
group_by: "property",
timeframe: "this_7_days"
});

Expand Down Expand Up @@ -348,8 +348,8 @@ Keen.ready(function(){

// Create a query instance
var count = new Keen.Query("count", {
eventCollection: "pageviews",
groupBy: "visitor.geo.country",
event_collection: "pageviews",
group_by: "visitor.geo.country",
interval: "daily",
timeframe: "this_21_days"
});
Expand Down
56 changes: 28 additions & 28 deletions dist/keen-query.js
Original file line number Diff line number Diff line change
Expand Up @@ -719,27 +719,6 @@ Emitter.prototype.hasListeners = function(event){
}).call(this);
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],3:[function(require,module,exports){
/**
* Reduce `arr` with `fn`.
*
* @param {Array} arr
* @param {Function} fn
* @param {Mixed} initial
*
* TODO: combatible error handling?
*/
module.exports = function(arr, fn, initial){
var idx = 0;
var len = arr.length;
var curr = arguments.length == 3
? initial
: arr[idx++];
while (idx < len) {
curr = fn.call(null, curr, arr[idx], ++idx, arr);
}
return curr;
};
},{}],4:[function(require,module,exports){
/**
* Module dependencies.
*/
Expand Down Expand Up @@ -1663,7 +1642,7 @@ request.put = function(url, data, fn){
* Expose `request`.
*/
module.exports = request;
},{"emitter":5,"reduce":3}],5:[function(require,module,exports){
},{"emitter":4,"reduce":5}],4:[function(require,module,exports){
/**
* Expose `Emitter`.
*/
Expand Down Expand Up @@ -1798,6 +1777,27 @@ Emitter.prototype.listeners = function(event){
Emitter.prototype.hasListeners = function(event){
return !! this.listeners(event).length;
};
},{}],5:[function(require,module,exports){
/**
* Reduce `arr` with `fn`.
*
* @param {Array} arr
* @param {Function} fn
* @param {Mixed} initial
*
* TODO: combatible error handling?
*/
module.exports = function(arr, fn, initial){
var idx = 0;
var len = arr.length;
var curr = arguments.length == 3
? initial
: arr[idx++];
while (idx < len) {
curr = fn.call(null, curr, arr[idx], ++idx, arr);
}
return curr;
};
},{}],6:[function(require,module,exports){
module.exports = function(){
return "undefined" == typeof window ? "server" : "browser";
Expand Down Expand Up @@ -2025,7 +2025,7 @@ function xhrShim(opts){
};
return this;
}
},{"../utils/each":18,"./get-xhr-object":9,"superagent":4}],12:[function(require,module,exports){
},{"../utils/each":18,"./get-xhr-object":9,"superagent":3}],12:[function(require,module,exports){
var root = 'undefined' !== typeof window ? window : this;
var previous_Keen = root.Keen;
var Emitter = require('./utils/emitter-shim');
Expand All @@ -2036,7 +2036,7 @@ function Keen(config) {
Keen.debug = false;
Keen.enabled = true;
Keen.loaded = true;
Keen.version = '3.4.0-rc4';
Keen.version = '3.4.0';
Emitter(Keen);
Emitter(Keen.prototype);
Keen.prototype.configure = function(cfg){
Expand Down Expand Up @@ -2126,7 +2126,7 @@ module.exports = function(url, params, api_key, callback){
callback = null;
});
};
},{"../helpers/get-query-string":7,"../helpers/superagent-handle-response":10,"../helpers/superagent-request-types":11,"superagent":4}],14:[function(require,module,exports){
},{"../helpers/get-query-string":7,"../helpers/superagent-handle-response":10,"../helpers/superagent-request-types":11,"superagent":3}],14:[function(require,module,exports){
var Request = require("../request");
module.exports = function(query, callback) {
var queries = [],
Expand Down Expand Up @@ -2368,7 +2368,7 @@ function savedQueries() {
return this;
}
module.exports = savedQueries;
},{"./helpers/superagent-handle-response":10,"superagent":4}],18:[function(require,module,exports){
},{"./helpers/superagent-handle-response":10,"superagent":3}],18:[function(require,module,exports){
module.exports = function(o, cb, s){
var n;
if (!o){
Expand Down Expand Up @@ -2451,7 +2451,7 @@ module.exports = function(path, params, callback){
}
return;
}
},{"../helpers/get-context":6,"../helpers/get-xhr-object":9,"../helpers/superagent-handle-response":10,"superagent":4}],24:[function(require,module,exports){
},{"../helpers/get-context":6,"../helpers/get-xhr-object":9,"../helpers/superagent-handle-response":10,"superagent":3}],24:[function(require,module,exports){
var request = require('superagent');
var responseHandler = require('../helpers/superagent-handle-response');
module.exports = function(path, params, callback){
Expand All @@ -2474,7 +2474,7 @@ module.exports = function(path, params, callback){
});
return;
}
},{"../helpers/superagent-handle-response":10,"superagent":4}],25:[function(require,module,exports){
},{"../helpers/superagent-handle-response":10,"superagent":3}],25:[function(require,module,exports){
(function (global){
;(function (f) {
if (typeof define === "function" && define.amd) {
Expand Down
2 changes: 1 addition & 1 deletion dist/keen-query.min.js

Large diffs are not rendered by default.

52 changes: 26 additions & 26 deletions dist/keen-tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -769,27 +769,6 @@ Emitter.prototype.hasListeners = function(event){
}).call(this);
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],4:[function(require,module,exports){
/**
* Reduce `arr` with `fn`.
*
* @param {Array} arr
* @param {Function} fn
* @param {Mixed} initial
*
* TODO: combatible error handling?
*/
module.exports = function(arr, fn, initial){
var idx = 0;
var len = arr.length;
var curr = arguments.length == 3
? initial
: arr[idx++];
while (idx < len) {
curr = fn.call(null, curr, arr[idx], ++idx, arr);
}
return curr;
};
},{}],5:[function(require,module,exports){
/**
* Module dependencies.
*/
Expand Down Expand Up @@ -1713,7 +1692,7 @@ request.put = function(url, data, fn){
* Expose `request`.
*/
module.exports = request;
},{"emitter":6,"reduce":4}],6:[function(require,module,exports){
},{"emitter":5,"reduce":6}],5:[function(require,module,exports){
/**
* Expose `Emitter`.
*/
Expand Down Expand Up @@ -1848,6 +1827,27 @@ Emitter.prototype.listeners = function(event){
Emitter.prototype.hasListeners = function(event){
return !! this.listeners(event).length;
};
},{}],6:[function(require,module,exports){
/**
* Reduce `arr` with `fn`.
*
* @param {Array} arr
* @param {Function} fn
* @param {Mixed} initial
*
* TODO: combatible error handling?
*/
module.exports = function(arr, fn, initial){
var idx = 0;
var len = arr.length;
var curr = arguments.length == 3
? initial
: arr[idx++];
while (idx < len) {
curr = fn.call(null, curr, arr[idx], ++idx, arr);
}
return curr;
};
},{}],7:[function(require,module,exports){
var Keen = require("./index"),
each = require("./utils/each");
Expand Down Expand Up @@ -2136,7 +2136,7 @@ function xhrShim(opts){
};
return this;
}
},{"../utils/each":20,"./get-xhr-object":11,"superagent":5}],14:[function(require,module,exports){
},{"../utils/each":20,"./get-xhr-object":11,"superagent":4}],14:[function(require,module,exports){
var root = 'undefined' !== typeof window ? window : this;
var previous_Keen = root.Keen;
var Emitter = require('./utils/emitter-shim');
Expand All @@ -2147,7 +2147,7 @@ function Keen(config) {
Keen.debug = false;
Keen.enabled = true;
Keen.loaded = true;
Keen.version = '3.4.0-rc4';
Keen.version = '3.4.0';
Emitter(Keen);
Emitter(Keen.prototype);
Keen.prototype.configure = function(cfg){
Expand Down Expand Up @@ -2305,7 +2305,7 @@ function prepareGetRequest(url, data){
});
return ( url.length < getUrlMaxLength() ) ? url : false;
}
},{"../helpers/get-context":8,"../helpers/get-query-string":9,"../helpers/get-url-max-length":10,"../helpers/get-xhr-object":11,"../helpers/superagent-handle-response":12,"../helpers/superagent-request-types":13,"../index":14,"../utils/base64":19,"../utils/each":20,"../utils/json-shim":23,"superagent":5}],16:[function(require,module,exports){
},{"../helpers/get-context":8,"../helpers/get-query-string":9,"../helpers/get-url-max-length":10,"../helpers/get-xhr-object":11,"../helpers/superagent-handle-response":12,"../helpers/superagent-request-types":13,"../index":14,"../utils/base64":19,"../utils/each":20,"../utils/json-shim":23,"superagent":4}],16:[function(require,module,exports){
var Keen = require('../index');
var request = require('superagent');
var each = require('../utils/each'),
Expand Down Expand Up @@ -2376,7 +2376,7 @@ module.exports = function(payload, callback) {
}
return;
};
},{"../helpers/get-context":8,"../helpers/get-xhr-object":11,"../helpers/superagent-handle-response":12,"../helpers/superagent-request-types":13,"../index":14,"../utils/each":20,"superagent":5}],17:[function(require,module,exports){
},{"../helpers/get-context":8,"../helpers/get-xhr-object":11,"../helpers/superagent-handle-response":12,"../helpers/superagent-request-types":13,"../index":14,"../utils/each":20,"superagent":4}],17:[function(require,module,exports){
module.exports = function(newGlobalProperties) {
if (newGlobalProperties && typeof(newGlobalProperties) == "function") {
this.config.globalProperties = newGlobalProperties;
Expand Down
2 changes: 1 addition & 1 deletion dist/keen-tracker.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit a8fa7c3

Please sign in to comment.