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

@snowplow/browser-tracker-core

Package Overview
Dependencies
Maintainers
3
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@snowplow/browser-tracker-core

Core functionality for Snowplow Browser trackers

  • 3.22.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
3
Weekly downloads
 
Created

What is @snowplow/browser-tracker-core?

@snowplow/browser-tracker-core is a core library for Snowplow's browser tracking. It provides the essential functionalities to track user interactions and events on web pages, enabling detailed analytics and insights.

What are @snowplow/browser-tracker-core's main functionalities?

Initialize Tracker

This feature allows you to initialize a new Snowplow tracker instance. You need to provide a tracker namespace, the collector endpoint, and optional configuration settings such as the application ID.

const { newTracker } = require('@snowplow/browser-tracker-core');

const tracker = newTracker('sp1', 'my-collector.com', { appId: 'my-app-id' });

Track Page View

This feature enables tracking of page views. It sends an event to the collector whenever a page is viewed, which is essential for understanding user navigation and engagement.

tracker.trackPageView();

Track Custom Events

This feature allows you to track custom events by defining a self-describing event schema and data. It is useful for capturing specific user interactions that are not covered by standard event types.

tracker.trackSelfDescribingEvent({
  schema: 'iglu:com.acme/event/jsonschema/1-0-0',
  data: {
    eventCategory: 'category',
    eventAction: 'action',
    eventLabel: 'label',
    eventValue: 'value'
  }
});

Track Structured Events

This feature enables tracking of structured events, which are predefined event types with specific properties. It is useful for capturing common user interactions like clicks, form submissions, and more.

tracker.trackStructEvent({
  category: 'category',
  action: 'action',
  label: 'label',
  property: 'property',
  value: 'value'
});

Other packages similar to @snowplow/browser-tracker-core

FAQs

Package last updated on 13 Mar 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