Web3Analyitcs.init
Web3Analytics must be initialized with appKey by invoking the init method at the top level of the application before using other methods.
Usage
Copy Web3Analytics . init ( { appKey : ' YOUR APP KEY ' } ) ; Defaults to false. Enable consoles for all the tracking events.
By default, SDK will track all data
points. But you can limit them by passing the desired datapoints .
Defaults to 30. This field takes time in mins to specify the inactivity duration in which the session will expire.
Defaults to false. Opt users out of tracking.
Defaults to false. Enable testing version of SDK in which SDK will interact with testing servers.
Defaults to false. Enable test mode in which you can test tracking events without logging data onto the server in order to avoid storing testing data.
Web3Analytics.walletProvider
Pass web3 provider to track wallet connections and transaction status that are submitted or rejected on the dApp.
Wallets that are not included in Supporting Wallets will be classified as Other wallet type.
Copy Web3Analytics . walletProvider ( window . ethereum) ; In case of handling multiple wallets on the dApp. Example in React.
EIP-1193 Standard Provider or Web3Provider-compatible Provider
Web3Analytics.trackWalletConnection
To track the wallet type for wallets that are not part of Supporting Wallets .
Usage
Web3Analytics.trackPageView
Track all the pages visited on a DApp.
Path of the page. e.g. '/about', '/dashboard/stats'
Query string of the page. eg: '?id=ab02'
Web3Analytics.optOutTracking
Opt user out from tracking.
Default 365. Duration in days for which the user is opt-out
Web3Analytics.optInTracking
Opt user in tracking.
Default 365. Duration in days for which the user is opt-in
Web3Analytics.hasOptedOutTracking
Getter method for the status of user tracking consent.
Argument
Return Type
Description
Status of user tracking consent
For the custom on-click implementation of widget button.
A unique campaign ID belongs to the widget.
Redirect URL set on the campaign button click.