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

@amplitude/analytics-node

Package Overview
Dependencies
Maintainers
20
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amplitude/analytics-node

Official Amplitude SDK for NodeJS

  • 1.1.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
72K
decreased by-51.55%
Maintainers
20
Weekly downloads
 
Created

What is @amplitude/analytics-node?

@amplitude/analytics-node is an npm package that allows you to integrate Amplitude's analytics capabilities into your Node.js applications. It provides functionalities for tracking events, identifying users, and setting user properties, which can help you understand user behavior and improve your product.

What are @amplitude/analytics-node's main functionalities?

Track Events

This feature allows you to track events that occur in your application. The code sample demonstrates how to log a 'user_signup' event with associated properties.

const amplitude = require('@amplitude/analytics-node');
const client = amplitude.init('YOUR_API_KEY');

client.logEvent({
  event_type: 'user_signup',
  user_id: 'user123',
  event_properties: {
    plan: 'premium'
  }
});

Identify Users

This feature allows you to identify users and set their properties. The code sample shows how to identify a user and set their email and name.

const amplitude = require('@amplitude/analytics-node');
const client = amplitude.init('YOUR_API_KEY');

client.identify({
  user_id: 'user123',
  user_properties: {
    $set: {
      email: 'user@example.com',
      name: 'John Doe'
    }
  }
});

Set User Properties

This feature allows you to set or update properties for a user. The code sample demonstrates how to set the age and gender properties for a user.

const amplitude = require('@amplitude/analytics-node');
const client = amplitude.init('YOUR_API_KEY');

client.identify({
  user_id: 'user123',
  user_properties: {
    $set: {
      age: 30,
      gender: 'male'
    }
  }
});

Other packages similar to @amplitude/analytics-node

FAQs

Package last updated on 06 Apr 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