Socket
Socket
Sign inDemoInstall

arcane-fire-analytics

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    arcane-fire-analytics

A JavaScript library for integrating Google Analytics.


Version published
Weekly downloads
6
decreased by-90.48%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

arcane-fire-analytics

A JavaScript library for integrating Google Analytics into your applications.

Installation

To install arcane-fire-analytics, use npm:

npm install arcane-fire-analytics

Usage

const { initializeAnalytics, trackEvent, trackPageView } = require('arcane-fire-analytics');

// Initialize Google Analytics
const analytics = initializeAnalytics('YOUR_TRACKING_ID');

// Track an event
trackEvent(analytics, 'category', 'action', 'label', value);

// Track a page view
trackPageView(analytics, '/path');

API

initializeAnalytics(trackingId, options)

Initialize Google Analytics with a tracking ID and custom options.

  • trackingId: The Google Analytics tracking ID.
  • options (optional): Additional options for initializing Google Analytics.

trackEvent(analytics, category, action, label, value)

Track an event in Google Analytics.

  • analytics: The Google Analytics instance returned by initializeAnalytics.
  • category: The category of the event.
  • action: The action of the event.
  • label: The label of the event.
  • value: The value of the event.

trackPageView(analytics, path)

Track a page view in Google Analytics.

  • analytics: The Google Analytics instance returned by initializeAnalytics.
  • path: The path of the page view.

Keywords

FAQs

Last updated on 17 Apr 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc