leek

WebJar for leek

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

leek
Last Version

Last Version

0.0.24
Release Date

Release Date

Type

Type

jar
Description

Description

leek
WebJar for leek
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/twokul/leek

Download leek

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/leek/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>leek</artifactId>
    <version>0.0.24</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/leek/
implementation 'org.webjars.npm:leek:0.0.24'
// https://jarcasting.com/artifacts/org.webjars.npm/leek/
implementation ("org.webjars.npm:leek:0.0.24")
'org.webjars.npm:leek:jar:0.0.24'
<dependency org="org.webjars.npm" name="leek" rev="0.0.24">
  <artifact name="leek" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='leek', version='0.0.24')
)
libraryDependencies += "org.webjars.npm" % "leek" % "0.0.24"
[org.webjars.npm/leek "0.0.24"]

Dependencies

compile (3)

Group / Artifact Type Version
org.webjars.npm : debug jar [2.1.0,3)
org.webjars.npm : lodash.assign jar [3.2.0,4)
org.webjars.npm : rsvp jar [3.0.21,4)

Project Modules

There are no modules declared in this project.

Leek

Build Status

Initial implementation was based on Insight.

Track Events:

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'
});

Track Errors:

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
  });
}

Track command hits:

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'
});

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 = 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

var Leek = require('./lib/leek');
var leek = new 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 Scope Session
  • Add a second Custom Dimenstion with the Name Node Version and Scope Session as well
  • Make sure they are both active and you have everything you need to get the tracking running properly

Versions

Version
0.0.24
0.0.21