🚀 DAY 3 OF LAUNCH WEEK: Introducing Webhook Events for Pull Request Scans.Learn more →
Socket
Book a DemoInstallSign in
Socket

@umbrellio/ga-tracker

Package Overview
Dependencies
Maintainers
3
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@umbrellio/ga-tracker

Google Analytics tracker

npmnpm
Version
0.1.1
Version published
Maintainers
3
Created
Source

@umbrellio/ga-tracker

Coverage Status Build Status

Google Analytics tracker for web env (no window object required).

Install

$ yarn add @umbrellio/ga-tracker

Usage

import GATracker from "@umbrellio/ga-tracker"

const emitter = GATracker.Emitter.create(<tracking-id>, <uuid>)

emitter.pageView("/contacts")

Where tracking-id is your app id (like UA-XXXXXXXXX-X), and uuid is your customer unique identifier.

Available methods:

  • setVisitor({ identifier, uuid }) – set visitor's identifiers

  • commit() – send batch of tracked events

  • pageView(path) – track page viewing

    path - request path (eg. "/contacts")

  • time(category, name, duration) – track custom time

    category – measurement category

    name – measurement name

    duration – measurement duration

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/umbrellio/ga-tracker.

License

Released under MIT License.

Authors

Created by Aleksei Bespalov,

Supported by Umbrellio

FAQs

Package last updated on 21 Sep 2020

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