Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@abskmj/google-analytics-tracker

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@abskmj/google-analytics-tracker

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

  • 0.0.2
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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);
});

FAQs

Package last updated on 26 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc