Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
app
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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 forSnowplow 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 a device or webpage to your local machine to collect their Snowplow events. 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.

If no events arrive, check if NepSnowplow is allowed by Windows Firewall

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

Debugging autoUpdater

First, make sure the version in package.json is lower than the latest published version.

Second, place dev-app-update.yml in the root folder, containing:

owner: PicnicSupermarket
repo: nepsnowplow
provider: github

Finally, to make sure it works in production, you can execute yarn build and run dist\<platform>-unpacked\NepSnowplow.exe. Don't forget to set the version back to the right value before pushing any commits.

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.)

About

A local Snowplow Collector and GUI to inspect collected events

Resources

License

Packages

No packages published
You can’t perform that action at this time.