report detailing metrics about how compass is being used

npm install compass-usage-report@0.1.0


compass-usage-report travis npm

report detailing metrics about how compass is being used

This module implements a CLI for obtaining a text report on various metrics about compass usage. The metrics included are:

  • active user count by OS
  • data on how successfully users connect to instances
  • data on how successfully users autoupdate
  • how often the app is launched per day
  • data on how quickly compass is sampling data
  • data on user session lengths

The module has two capabilities:

  • produce a command line report
  • write the report data to a mongodb collection

In order to run this module on your own machine, you must configure a .env file with the following environment variables:

INTERCOM_APP_ID=<Compass app ID on Intercom>
INTERCOM_API_KEY=<Compass Intercom API Key>
updateSuccessID=<Funnel ID of funnel for auto update success in Mixpanel>
updateCancelID=<Funnel ID of funnel for auto update canceled in Mixpanel>
instanceID=<Funnel ID of funnel for app instance connection in Mixpanel>
MIXPANEL_API_SECRET=<Compass Mixpanel API_Secret>


To produce a command line report:

compass-usage-report cli

To write to a mongodb collection:

compass-usage-report mongo [url] [db] [coll]

The optional arguments for the mongo subcommand are as follows:

  • url: a connection url (default: mongodb://localhost:27017)
  • db: a database to write into (default: test)
  • coll: the collection within the database to write into (default: compass)

The command

compass-usage-report mongo mongodb://

would write to the compass collection in the test database of the above connection url.

Note: The optional arguments are consumed in the order in which they appear. Thus, the first argument is always a connection url, the second is always the database, and the third is always the collection. If only one argument is provided, it is assumed to be a connection url, if two are provided, they are assumed to be a connection url and a database, etc.

Another Note: The connection url is assumed to not have the database name on the end. Though the connection url mongodb://localhost:27017/compass is a valid connection url and would write to the compass database on localhost, the code works by concatenating [db] to [url]. So if you would like to write to the above connection url, run on the command line:

compass-usage-report mongo mongodb://localhost:27017 compass


Apache 2.0