Module for Chew Analytics
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ポール ウェッブ 8b49072685 Updated deps 1 month ago
express MAJOR UPDATE 3 months ago
fastify MAJOR UPDATE 3 months ago
lib MAJOR UPDATE 3 months ago
.editorconfig Updated deps, added config files, and improved regexes 3 months ago
.eslintrc.json MAJOR UPDATE 3 months ago
.gitignore Updated deps, added config files, and improved regexes 3 months ago
.npmrc Updated deps, added config files, and improved regexes 3 months ago
README.md Updated README 3 months ago
index.js MAJOR UPDATE 3 months ago
package.json Updated deps 1 month ago

README.md

chewit

INC download count npm version

Analytics you can count on

Installation

$ npm i chewit -S

Note that this module requires an account with Chew, currently in alpha.

Features

  • namespaced modules: just use what you need!
  • server-side analytics: no need to muddy up your beautiful front-end with tracking snippets!
  • super simple: less than 3 lines of code on your part, wonderful!

Examples

Express

const chew = require("chewit/express");

const app = express()
  // ...after setting views, body parsing, &c
  .use(chew("YOUR-SITE-ID"));

// Make sure Chew is the very last middleware in your app.
// You'll get a lot of nonsense in your analytics otherwise.
// Working on a fix for this.

Fastify

fastify.register(require("chewit/fastify"), {
  id: "YOUR-SITE-ID"
});