@abskmj/google-analytics-tracker
This has a functionality to pass client details to GA server for geographic and other demographics.
Last updated 3 years ago by abskmj .
MIT · Original npm · Tarball · package.json
$ cnpm install @abskmj/google-analytics-tracker 
SYNC missed versions from official npm registry.

Google Analytics Tracker for Nodejs

This has a functionality to pass client details to GA server for geographic and other demographics.

         client ip & ua                 client ip & ua
CLIENT ------------------ NODE SERVER ------------------- GA SERVER

Traditional Server side GA trackers

         client ip & ua                 server ip & ua
CLIENT ------------------ NODE SERVER ------------------- GA SERVER

All the tracking requests to GA server is via node server. Hence, geographic demograhics will have server details only.

Example

var options = {
    debug: true
};

var tracker = require('@abskmj/google-analytics-tracker')('UA-XXXXXXXX-X', options);

var event = {
    category: 'click',
    action: 'search',
    label: 'google',
    value: 10
};

var override = {
    ip: '2XX.X.1X3.X'
};

tracker.trackEvent(event, override, function (error, response) {
    console.log(response.body);
});

Current Tags

  • 0.0.2                                ...           latest (3 years ago)

2 Versions

  • 0.0.2                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 3
Last Month 9
Dependencies (3)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |