Skip to content

Commit

Permalink
Release 0.1.12 fixes #30
Browse files Browse the repository at this point in the history
  • Loading branch information
cmackay committed Dec 17, 2014
1 parent c585a44 commit 8b6b00a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@ analytics.sendEvent(category, action, label, value, success, error);
// parameters which will be sent as part of the analytics request
analytics.sendEventWithParams(category, action, label, value, params, success, error);

// Sends a user timing
//
// category - String (required)
// variable - String (required)
// label - String (required)
// time - Number (required)
// success - Function (optional)
// error - Function (optional)
analytics.sendTiming(category, variable, label, time, success, error);

// Sends an exception hit
//
// description - String (required)
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="com.cmackay.plugins.googleanalytics"
version="0.1.11">
version="0.1.12">

<engines>
<engine name="cordova" version=">=3.0.0" />
Expand Down
11 changes: 11 additions & 0 deletions www/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,17 @@ Analytics.prototype = {
this.send(params, success, error);
},

sendTiming: function (category, variable, label, time, success, error) {
argscheck.checkArgs('sssnFF', 'analytics.sendException', arguments);
var params = {};
params[Fields.HIT_TYPE] = HitTypes.TIMING;
params[Fields.TIMING_CATEGORY] = category;
params[Fields.TIMING_VAR] = variable;
params[Fields.TIMING_VALUE] = time;
params[Fields.TIMING_LABEL] = label;
this.send(params, success, error);
},

sendException: function (description, fatal, success, error) {
argscheck.checkArgs('s*FF', 'analytics.sendException', arguments);
var params = {};
Expand Down

0 comments on commit 8b6b00a

Please sign in to comment.