A local Snowplow Collector and GUI to inspect collected events
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
schemas
server
.gitignore
.jshintrc
.prettierrc
.travis.yml
Gruntfile.js
LICENSE
README.md
app.js
icon.ico
icon.png
package.json
settings.json
yarn.lock

README.md

NepSnowplow NepSnowplow

Code style: prettier Build Status

This little gem of a tool sets up a local server that acts as a collector for Snowplow Analytics events. By default, it listens on port 3000, but this can be configured.

Getting started

Simply run:

# Install dependencies and compile styles
yarn

# Start NepSnowplow
yarn start

Usage

Point your device or webpage to your local machine and to send Snowplow events to be collected. Your IP address and listening port is listed at the bottom of the app. Events should appear within seconds.

Events

For each event, NepSnowplow will list the event details and all associated contexts. For more information about Snowplow events, check out the docs on the Snowplow Canonical Event Model.

Schemas

To validate events and contexts, you need to place their schemas in the schemas folder (or whichever folder you've defined). To get started, check out Snowplow's own set of schemas on Iglu Central.

Make sure each schema is a separate file with either no extension or .json. The recommended structure is <vendor>/<event_or_context>/jsonschema/<schema_version>. For example:

schemas
└── com.snowplowanalytics.snowplow
    ├── screen_view
    │   └── jsonschema
    │       └── 1-0-0
    └── link_click
        └── jsonschema
            └── 1-0-0

Configure

Options can be set in settings.json, the defaults are:

{
  "showSchemaValidation": false, // whether to turn validation on or off on startup
  "schemaDir": "schemas/",       // folder where Snowplow schemas are situated
  "listeningPort": 3000          // port NepSnowplow listens to
}

Depending on your operating system, the settings and schemas can be found in the following location:

  • Windows:
    • Installed version (exe): C:\Users\<username>\AppData\Local\Programs\nepsnowplow\Resources.
    • Portable version (zip): where you've extracted the *.zip file.
  • OS X: ~/Applications/NepSnowplow/Contents/Resources.
  • Linux: where you've extracted the *.tar.gz file.

Development

Style compilation

During development, one can compile new styles in one of the SCSS files using:

yarn compile

Alternatively, each change can be automatically compiled using:

yarn watch

Packaging

This electron app is packaged and published through electron-builder.

To test a package locally for distribution, use:

yarn package

Roadmap

There are a few features that are on the roadmap to be developed so as to increase further usability:

  • Schema repository support: Sync schemas with a remote Iglu repository for event and context validation.
  • Multi-device support: create the ability to show events for a specific device.
  • Tree-based event viewer: introduce the abiltiy to switch to a hierarchical tree based on event name.

Contributing

Contributions are welcome! Feel free to file an issue or open a pull request.

When submitting changes, please make every effort to follow existing conventions and style in order to keep the code as readable as possible. New code must be covered by tests. As a rule of thumb, overall test coverage should not decrease. (There are exceptions to this rule, e.g. when more code is deleted than added.)