How to use the universal-analytics.createFromSession function in universal-analytics

To help you get started, we’ve selected a few universal-analytics examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / types / universal-analytics / universal-analytics-tests.ts View on Github external
visitor.pageview('/').send();
visitor.pageview('/').pageview('/contact').send();
visitor.pageview('/landing-page-1').event('Testing', 'Button color', 'Blue').send();
visitor.pageview('/landing-page-1').send();
visitor.event('Testing', 'Button color', 'Blue', 42, { p: '/landing-page-1' }).send();

visitor
    .event({ ec: 'Mail Server', ea: 'New Team Member Notification sent' })
    .event({ ea: 'Invitation sent' })
    .send();

visitor.set('uid', '123456789');

app.use(ua.middleware('UA-XXXX-Y', { cookieName: '_ga' }));

ua.createFromSession({ cid: 'some-string' });

ua('UA-XXXX-XX').debug();

ua('UA-XXXX-XX', {
    requestOptions: {
        proxy: '…',
    },
});

universal-analytics

A node module for Google's Universal Analytics tracking

MIT
Latest version published 3 years ago

Package Health Score

68 / 100
Full package analysis