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.2.0
Version published
Weekly downloads
3
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)

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 24 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