Giter Site home page Giter Site logo

usage-stats-cli's Introduction

view on npm npm module downloads Build Status Coverage Status Dependency Status js-standard-style

usage-stats-cli

A minimal, offline-friendly Google Analytics Measurement Protocol client for tracking usage statistics in shell and javascript applications.

This is a low-level API client, it doesn't hold any opinion of how usage tracking should be done. If you're looking for a convention which leverages the power and flexibility of Custom Metrics and Dimensions, take a look at app-usage-stats.

Synopsis

Tracking statistics in shell scripts:

# Track an event: category 'Backup', action 'start'
usage-stats event --tid UA-98765432-1 --ec Backup --ea start

# Perform the backup
cp files/** backup/

# Track an event: category 'Backup', action 'complete'
usage-stats event --tid UA-98765432-1 --ec Backup --ea complete

Protocol Parameters

See here for the full list of Google Analytics Measurement Protocol parameters.

Sent by default

All parameters are send on demand, beside this list.

  • Operating System version (sent in the UserAgent)
  • Client ID (a random UUID, generated once per OS user and stored)
  • Language (process.env.LANG, if set)
  • Screen resolution (terminal rows by columns, by default)

CLI Reference

To install the command line client:

$ npm install -g usage-stats-cli

Running the tool with no arguments will print the usage guide:

usage-stats

  A minimal, offline-friendly Google Analytics Measurement Protocol client for
  tracking usage statistics in shell and javascript applications.

Synopsis

  $ usage-stats <command> <command-options>
  $ usage-stats <command> --help

Commands

  screenview   Track a screenview
  event        Track an event
  exception    Track an exception

© 2016-17 Lloyd Brookes <[email protected]>. Documented by jsdoc-to-markdown.

usage-stats-cli's People

Contributors

75lb avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.