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

@amplitude/analytics-core

Package Overview
Dependencies
Maintainers
21
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@amplitude/analytics-core

  • 2.5.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
21
Created

What is @amplitude/analytics-core?

@amplitude/analytics-core is a core library for Amplitude's analytics tracking. It provides essential functionalities for tracking events, user properties, and managing user sessions. This package is designed to be lightweight and flexible, making it suitable for various environments and use cases.

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

Event Tracking

This feature allows you to track events within your application. The code sample demonstrates how to initialize the Amplitude client and log a 'button_click' event with associated properties.

const amplitude = require('@amplitude/analytics-core');

const client = amplitude.init('YOUR_API_KEY');

client.logEvent({
  event_type: 'button_click',
  event_properties: {
    button_name: 'signup'
  }
});

User Identification

This feature allows you to identify users and set user properties. The code sample shows how to set a user ID and user properties such as age and gender.

const amplitude = require('@amplitude/analytics-core');

const client = amplitude.init('YOUR_API_KEY');

client.setUserId('user_12345');
client.setUserProperties({
  age: 25,
  gender: 'female'
});

Session Management

This feature allows you to manage user sessions. The code sample demonstrates how to start and end a session using the Amplitude client.

const amplitude = require('@amplitude/analytics-core');

const client = amplitude.init('YOUR_API_KEY');

client.startSession();
// Perform some actions
client.endSession();

Other packages similar to @amplitude/analytics-core

FAQs

Package last updated on 21 Oct 2024

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