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

@binance-chain/analytics

Package Overview
Dependencies
Maintainers
4
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@binance-chain/analytics

Simple wrapper of analytics Layer

0.0.16
latest
npm
Version published
Weekly downloads
4
100%
Maintainers
4
Weekly downloads
 
Created
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

Package last updated on 13 May 2021

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