@binance-chain/analytics-plugin-ga
TypeScript icon, indicating that this package has built-in type declarations

0.0.16 • Public • Published

Google Analytics

How to use

Below is an example of how to use the browser plugin.

Using npm:

import Analytics from '@binance-chain/analytics';
import Ga from '@binance-chain/analytics-plugin-ga';

const analytics = Analytics({
  app: 'awesome-app',
  plugins: [
    Ga({
      id: 'UA-167308739-1',
    }),
  ],
});

/* Track a page view */
analytics.page();

/* Track a custom event */
analytics.track('playedVideo', {
  category: 'Videos',
  label: 'Fall Campaign',
  value: 42,
});

/* export the instance for usage in your app */
export default analytics;

Readme

Keywords

none

Package Sidebar

Install

npm i @binance-chain/analytics-plugin-ga

Weekly Downloads

6

Version

0.0.16

License

MIT

Unpacked Size

6.85 kB

Total Files

13

Last publish

Collaborators

  • binance-chain-npm