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

0.3.1
latest
npmnpm
Version published
Weekly downloads
1
Maintainers
3
Weekly downloads
 
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 tracker = GATracker.create(trackingId)

tracker.pageview({ dp: "/contacts", dt: "Contacts" })

Where trackingId is your app tracking id (like UA-XXXXXXXXX-X).

Available methods:

  • set(key, value) – set any global var (like user params)

  • pageview({ dl, dh, dp, dt }) – track page viewing (Docs)

  • timing({ utc, utv, utt, utl }) – track custom timings (Docs)

Errors

NetworkError

import GATracker from "@umbrellio/ga-tracker"

GATracker.Errors.NetworkError

Throws when there was an error while sending a http request.

ConnectionError

import GATracker from "@umbrellio/ga-tracker"

GATracker.Errors.ConnectionError

Throws when unable to send a http request.

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 03 Oct 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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.