gaw
v0.0.4
Published
simple google analytics wrapper
Downloads
93
Keywords
Readme
gaw
simple google analytics wrapper
Usage
npm install gaw
import { Tracker } from 'gaw';
const tracker = Tracker.init({ trackingId: 'UA-XXXX-Y' });
if (traditional_web_page) {
tracker.trackCurrentPage();
}
if (single_page_application) {
tracker.startSession('pageview');
tracker.trackPage('/blabla');
// tracker.endSession('pageview');
}
tracker.trackEvent('Carousel', 'slide to left');