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

@automattic/node-tracks

Package Overview
Dependencies
Maintainers
43
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@automattic/node-tracks

Tracks wrapper for NodeJS

  • 0.5.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
18
decreased by-53.85%
Maintainers
43
Weekly downloads
 
Created
Source

Node Tracks

npm

A Tracks wrapper for NodeJS

⚠️⚠️⚠️⚠️ This library is for internal use at Automattic only. Join us! ⚠️⚠️⚠️⚠️

How to use

import tracker from '@automattic/node-tracks';

const trackEvent = tracker( '<valid_event_prefix>', { _ut: '<valid_event_user_type>' } ).trackEvent;
// tracker takes 2 arguments
// prefix (string): all your events will be prefixed with this
// globalParams (object): this is a global object that will be sent with all requests. `_ut` is required

trackEvent( 'eventName', extraParams, logger );
// trackEvent takes 3 arguments
// eventName (string) : Your event name
// extraParams (object): Any extra params
// logger (optional): will log to the console otherwise

Please refer to this table for a list of all extraParams

Contributing

See CONTRIBUTING.md for details on development, testing, publishing, etc.

FAQs

Package last updated on 31 Oct 2023

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