Comparing version 0.0.16 to 0.0.17
@@ -6,7 +6,7 @@ 'use strict'; | ||
provider = require('./provider'), | ||
request = RSVP.denodeify(require('request')), | ||
getVersions = require('./get-versions'), | ||
md5 = require('./md5'), | ||
extend = require('lodash').extend, | ||
debug = require('debug')('leek'); | ||
debug = require('debug')('leek'), | ||
request; | ||
@@ -26,2 +26,3 @@ function Leek(options) { | ||
this.adapterUrls = options.adapterUrls || null; | ||
this.trackingCode = options.trackingCode; | ||
@@ -59,2 +60,6 @@ this.name = options.name; | ||
} | ||
if (request === undefined) { | ||
request = RSVP.denodeify(require('request')); | ||
} | ||
@@ -68,2 +73,6 @@ var params = provider.call( | ||
if (this.adapterUrls) { | ||
params.url = this.adapterUrls[eventType]; | ||
} | ||
debug('request %o', params); | ||
@@ -70,0 +79,0 @@ return request(params); |
{ | ||
"name": "leek", | ||
"description": "GA tracking", | ||
"version": "0.0.16", | ||
"version": "0.0.17", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "stats", |
@@ -67,2 +67,21 @@ ## Leek | ||
#### Alternative Tracking Endpoints | ||
Passing in an object of adapter URLs will send the data to alternative tracking service. | ||
```javascript | ||
var Leek = require('./lib/leek'); | ||
var leek = new Leek({ | ||
trackingCode: 'xx-xxxxxxxx-x', | ||
name: 'my-nifty-package', | ||
version: '1.0.1', | ||
adapterUrls: { | ||
appview: 'http://example.com/collect-app', | ||
exception: 'http://example.com/collect-exception', | ||
timing: 'http://example.com/collect-timing', | ||
event: 'http://example.com/collect-event' | ||
} | ||
}); | ||
``` | ||
#### Constructor Options | ||
@@ -69,0 +88,0 @@ |
@@ -182,2 +182,2 @@ 'use strict'; | ||
}); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22605
15
712
97