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

@analytics/core

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@analytics/core

Lightweight analytics library for tracking events, page views, & identifying users. Works with any third party analytics provider via an extendable plugin system.

  • 0.12.15
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
141K
increased by0.3%
Maintainers
1
Weekly downloads
 
Created

What is @analytics/core?

@analytics/core is a lightweight, modular analytics library for tracking events, page views, and user data. It provides a simple API for integrating with various analytics services and managing analytics data in a consistent way.

What are @analytics/core's main functionalities?

Track Events

This feature allows you to track custom events within your application. The `track` method is used to log events with specific properties such as category and label.

const Analytics = require('@analytics/core');
const analytics = Analytics({
  app: 'my-app',
  version: 100
});

analytics.track('buttonClicked', {
  category: 'UI Interaction',
  label: 'Signup Button'
});

Page Views

This feature allows you to track page views. The `page` method logs a page view event, which can be useful for understanding user navigation patterns.

const Analytics = require('@analytics/core');
const analytics = Analytics({
  app: 'my-app',
  version: 100
});

analytics.page();

Identify Users

This feature allows you to identify users and associate them with specific traits. The `identify` method is used to log user information such as name and email.

const Analytics = require('@analytics/core');
const analytics = Analytics({
  app: 'my-app',
  version: 100
});

analytics.identify('user-id-123', {
  name: 'John Doe',
  email: 'john.doe@example.com'
});

Other packages similar to @analytics/core

Keywords

FAQs

Package last updated on 29 Jul 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