beanpoll-mixpanel

    0.0.1 • Public • Published

    Example:

    bootstrap.js:

     
    var beanie = require('beanie');
     
    beanie.
    loader().
    require('beanpoll-mixpanel').
    require('trackTime').
    load();
     

    somePlugin.js:

     
    exports.plugin = function(router) {
        
     
        router.on({
     
            'pull -http /*': function(req, res, mw) {
     
                var start = Date.now();
     
                res.on('end', function() {
     
                    router.push('track', { event: 'page load time' }, { time: Date.now() - start });
                });
     
                nw.next();
            }
        })
    }

    Keywords

    none

    Install

    npm i beanpoll-mixpanel

    DownloadsWeekly Downloads

    2

    Version

    0.0.1

    License

    none

    Last publish

    Collaborators

    • avatar