Leek
Initial implementation was based on Insight.
Track Events:
var Leek = leek = trackingCode: 'xx-xxxxxxxx-x' globalName: 'my-nifty-package' version: '1.0.1' ; leek;
Track Errors:
var Leek = leek = trackingCode: 'xx-xxxxxxxx-x' name: 'my-nifty-package' version: '1.0.1' ; try throw 'ZOMG FIX ME' catche leek;
Track command hits:
var Leek = leek = trackingCode: 'xx-xxxxxxxx-x' name: 'my-nifty-package' version: '1.0.1' ; leek;
Disable Tracking:
Environment Variable
Setting the DISABLE_LEEK
environment variable will disable tracking.
Alternative Tracking Endpoints
Passing in an object of adapter URLs will send the data to alternative tracking service.
var Leek = ;var 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
var Leek = ;var leek = trackingCode: 'xx-xxxxxxxx-x' name: 'my-nifty-package' version: '1.0.1' silent: true;
GA Setup
You are now able to set up alternative tracking services but to set up GA follow these steps:
- Set your new property up as a Mobile App
- Add the Tracking ID in your leek initialisation as seen above.
- To add the NodeJS as well as OS Version tracking go to the Admin -> Custom Definitions -> Custom Metrics
- Add a new Custom Dimenstion with the Name
OS
and ScopeSession
- Add a second Custom Dimenstion with the Name
Node Version
and ScopeSession
as well - Make sure they are both active and you have everything you need to get the tracking running properly