New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

balena-universal-ga

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

balena-universal-ga

A CommonJS wrapper for both Node.js and browser (async) version of Google Analytics library

  • 2.0.1-fix-loader-inclusion-c2e664c50af611544ee72477ef97254d7407da92
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

Balena Universal GA Wrapper

Loads the universal-analytics module in Node.js and (asynchronously) the library from the CDN in the browser.

Browser usage needs Webpack, Browserify or other bundler that tolerates the browser field in package.json.

Installing

$ npm install balena-universal-ga

Debugging in the browser

In the browser the global GA_CUSTOM_LIB_URL variable can be set to make GA loader load a different GA implementation (for example, mocked or with extra debug info).

The official debug version from Google is https://www.google-analytics.com/analytics_debug.js.

FAQs

Package last updated on 15 Jul 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