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

@waves/event-sender

Package Overview
Dependencies
Maintainers
5
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@waves/event-sender

An interface for sending analytics events from Waves JS applications

  • 0.4.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-80%
Maintainers
5
Weekly downloads
 
Created
Source

Event Sender

An interface for sending analytics events from Waves JS applications.


Usage:

import EventSender from '@waves/event-sender';

// EventSender is a singleton, so any new attemps at instantiation
// will return a reference to a previously created instance
const sender = new EventSender();

// E.g.
const sender2 = new EventSender();
sender === sender2 // true


// Static method .inactive() returns an instance of EventSender that queues events,
// but does not send them until .activate() method is called
const sender = EventSender.inactive();

// (!) If an EventSender instance has been activated before, this will
// return a reference to it, so it WILL be active.



/** Queue custom event */
sender.push('Product', 'GetClientClick', 'my_custom_label', 2.0);

/**
 * Queue page view
 * Useful for SPA page transitions when no
 * pageView event is tracked by default.
 */
sender.pushPageView(window.location.href, document.referrer);


// Enables sending events, including those queued before.
sender.activate();


// EventSender methods are chainable:
sender
  .activate()
  .push('Product', 'GetClientClick', 'my_custom_label', 2.0)
  .pushPageView(window.location.href, document.referrer)
  .push('Home', 'Subscribe');

FAQs

Package last updated on 13 Dec 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