Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 1.01 KB

README.md

File metadata and controls

36 lines (27 loc) · 1.01 KB

Web3 Analytics Plugin

This is a plugin for Analytics, a lightweight open-source frontend analytics abstraction layer. The plugin enables sending data to Web3 Analytics, a decentralized analytics platform for web3 apps.

Installation

npm install analytics
npm install analytics-plugin-web3analytics

Usage

import Analytics from 'analytics';
import web3Analytics from 'analytics-plugin-web3analytics';

/* Initialize analytics & load plugins */
const analytics = Analytics({
  app: 'awesome-app',
  plugins: [
    web3Analytics({
      appId: YOUR_WEB3ANALYTICS_APP_ID,
      jsonRpcUrl: 'https://eth-goerli.g.alchemy.com/v2/your_key_here',
      loglevel: 'error'
    })
  ]
})

'loglevel' is an optional attribute and can be set to 'debug', 'info', 'warn' or 'error'.

More on how to get an appId and use Web3 Analytics here.

License

Apache-2.0 OR MIT