BlackJack 3df7502993 most working, work on front end | 6 år sedan | |
---|---|---|
.. | ||
lib | 6 år sedan | |
node_modules/lodash.assign | 6 år sedan | |
.jshintrc | 6 år sedan | |
.npmignore | 6 år sedan | |
.travis.yml | 6 år sedan | |
README.md | 6 år sedan | |
package.json | 6 år sedan |
Initial implementation was based on Insight.
var Leek = require('./lib/leek'),
leek = new Leek({
trackingCode: 'xx-xxxxxxxx-x',
globalName: 'my-nifty-package',
version: '1.0.1'
});
leek.trackEvent({
name: 'my-nifty-package',
category: 'pony show',
label: 'white',
value: 'jumps'
});
var Leek = require('./lib/leek'),
leek = new Leek({
trackingCode: 'xx-xxxxxxxx-x',
name: 'my-nifty-package',
version: '1.0.1'
});
try {
throw new Error('ZOMG FIX ME')
} catch(e) {
leek.trackError({
description: e.message + ' ' + e.stack,
isFatal: true
});
}
var Leek = require('./lib/leek'),
leek = new Leek({
trackingCode: 'xx-xxxxxxxx-x',
name: 'my-nifty-package',
version: '1.0.1'
});
leek.track({
name: 'my-nifty-package show pony',
message: 'pony is here'
});
Setting the DISABLE_LEEK
environment variable will disable tracking.
Passing in an object of adapter URLs will send the data to alternative tracking service.
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'
}
});
var Leek = require('./lib/leek');
var leek = new Leek({
trackingCode: 'xx-xxxxxxxx-x',
name: 'my-nifty-package',
version: '1.0.1',
silent: true
});
You are now able to set up alternative tracking services but to set up GA follow these steps:
OS
and Scope Session
Node Version
and Scope Session
as well