1.0.0 • Published 8 years ago

koa-ga-pageview v1.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
8 years ago

#Install

npm install --save koa-ga-pageview

#Use

app = require('koa')();
app.use(require('koa-ga-pageview')('UA-000000-1', '_ga'));
app.use(function* () {
    this.body = 'tracked!';
});
app.listen(8080);

#Options

The first argument is the GA property ID. To send pageviews to more than one property, use the middleware more than once.

The second argument is the name of the cookie to use for cid storage.