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

amplitude

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amplitude

A node wrapper for Amplitude analytics

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
17K
decreased by-16.02%
Maintainers
1
Weekly downloads
 
Created
Source

amplitude

Server side implimentation of amplitude analytics.

Install

npm install amplitude --save

Initialization

var Amplitude = require('amplitude');
// Initialize with user id
var amplitude = new Amplitude('api-token', { user_id: 'some-user-id' });
// Or initialize with device id
var amplitude = new Amplitude('api-token', { device_id: 'some-device-id' });

Track an event

Pass in any keys listed on the Amplitude http api. The only required key is event_type.

var data = {
  event_type: "some value", // required
  event_properties: { 
    //... 
  },
  user_properties: { 
    //... 
  }
}
amplitude(data);

Track an event with an optional callback

amplitude(data, function(error, response){
  // If post was succesful, error will be null
  // Currently, the response returned from the amplitude api is an empty object
  //... do something
});

Keywords

FAQs

Package last updated on 26 Jun 2015

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