viewgle

1.1.8 • Public • Published

viewgle

A small analytics platform for express and mongo to leverage server side rendering. If you want to add viewgle to your client side application see our plugins:

  1. Vue: viewgle-vue
  2. React: Coming soon...

Usage

In your express app file:

  1. Set up your viewgle options like so:
let opts: {
  dbConnect: process.env.MONGO_CONNECT_STRING, // this is on you
  skipAssets: true
};
  1. Tell your express app to use the viewgle router - this will create a catch all for collecting data across all urls in your app, this will also create a /viewgle route to view your analytics:
// use the viewgle router
app.use(viewgle.router);
 
// set up viewgle options
app.use(
  viewgle.define({
    opts
  })
);

Available options:

Option Type Description
dbConnect String The string value for your mongodb database connection
skipLocalhost Boolean Boolean for skipping logging of localhost url or not
skipAssets Boolean Boolean for skipping logging of assets like .js and .css

Dependencies (4)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i viewgle

    Weekly Downloads

    8

    Version

    1.1.8

    License

    MIT

    Unpacked Size

    12.4 kB

    Total Files

    6

    Last publish

    Collaborators

    • kevin-wynn