🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@amplitude/analytics-node

Package Overview
Dependencies
Maintainers
0
Versions
49
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.3.8
latest
Source
npm
Version published
Weekly downloads
257K
0.26%
Maintainers
0
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 03 Mar 2025

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