Notorious Puppy Memes

    koa-ga-pageview

    1.0.0 • Public • Published

    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.

    Install

    npm i koa-ga-pageview

    DownloadsWeekly Downloads

    3

    Version

    1.0.0

    License

    ISC

    Last publish

    Collaborators

    • tyler-murphy