Socket
Socket
Sign inDemoInstall

@binance-chain/analytics

Package Overview
Dependencies
11
Maintainers
4
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @binance-chain/analytics

Simple wrapper of analytics Layer


Version published
Weekly downloads
4
increased by100%
Maintainers
4
Created
Weekly downloads
 

Readme

Source

Analytics

Install via yarn

yarn add analytics -S

How to use

/* example file src/analytics.js */
import Analytics from '@binance-chain/analytics';
import umamiPlugin from '@binance-chain/analytics-plugin-umami';

const analytics = Analytics({
  app: 'your-app-name',
  plugins: [
    // ... your analytics integrations
    umamiPlugin({
      id: '',
      reportUri: '',
    });
  ],
});

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

For SPA

import Analytics, { onRouteChange } from '@binance-chain/analytics';

onRouteChange((newRoutePath) => {
  console.log('new route path', newRoutePath);
  // trigger page view
  analytics.page();
});

FAQs

Last updated on 13 May 2021

Did you know?

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc