Socket
Socket
Sign inDemoInstall

@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.


Version published
Weekly downloads
152K
increased by1.41%
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 25 Apr 2021

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