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

@snowplow/browser-tracker

Package Overview
Dependencies
Maintainers
0
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@snowplow/browser-tracker

Browser tracker for Snowplow

  • 4.1.1-dev.1
  • react-native
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created

What is @snowplow/browser-tracker?

@snowplow/browser-tracker is a JavaScript library for tracking user interactions and events on web pages. It is part of the Snowplow Analytics platform, which provides a comprehensive solution for collecting and analyzing event data. The browser tracker allows you to capture a wide range of events, including page views, clicks, form submissions, and custom events, and send them to a Snowplow collector for further processing and analysis.

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

Track Page Views

This feature allows you to track page views on your website. The `newTracker` function initializes a new tracker instance, and the `trackPageView` function sends a page view event to the Snowplow collector.

const { newTracker, trackPageView } = require('@snowplow/browser-tracker');
newTracker('sp1', 'collector.example.com');
trackPageView();

Track Custom Events

This feature allows you to track custom events. The `trackSelfDescribingEvent` function sends a custom event with a specified schema and data to the Snowplow collector.

const { trackSelfDescribingEvent } = require('@snowplow/browser-tracker');
trackSelfDescribingEvent({
  schema: 'iglu:com.example_company/save-game/jsonschema/1-0-0',
  data: {
    saveId: '4321',
    level: 23,
    difficulty: 'HARD'
  }
});

Track Form Submissions

This feature allows you to track form submissions. The `trackFormSubmission` function sends an event when a form with the specified ID, classes, or name is submitted.

const { trackFormSubmission } = require('@snowplow/browser-tracker');
trackFormSubmission({
  formId: 'signup-form',
  formClasses: ['form-class'],
  formName: 'Signup Form'
});

Track Link Clicks

This feature allows you to track link clicks. The `trackLinkClick` function sends an event when a link with the specified ID, classes, or name is clicked.

const { trackLinkClick } = require('@snowplow/browser-tracker');
trackLinkClick({
  linkId: 'example-link',
  linkClasses: ['link-class'],
  linkName: 'Example Link'
});

Other packages similar to @snowplow/browser-tracker

Keywords

FAQs

Package last updated on 16 Dec 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