@every-analytics/react-analytics-provider
v0.4.0
Published
<p align="center"> <a href="https://everyanalytics.github.io/web-analytics-handbook/docs/react-analytics-provider/intro" target="blank"> <img src="https://user-images.githubusercontent.com/3839771/128202563-2f5b9fc6-6b7d-4baf-9861-0cff67993be1.png"
Downloads
1
Readme
Super convenient analytics provider for React
- 💙 Typescript support
- 👨👩👧👦 GA4 support
- 🏃 Currently maintaining
1. Getting Started
npm i --save @every-analytics/react-analytics-provider
# or
yarn add @every-analytics/react-analytics-provider
2. Usage
You can check examples here
import {AnalyticsProvider} from '@every-analytics/react-analytics-provider';
<AnalyticsProvider
onInitialize={() => console.log('initialized')}
onPageView={(params) => console.log('pageview', params)}
onEvent={(name, params) => console.log('event', name, params)}
onClick={(name, params) => console.log('click', name, params)}
onSetUserId={(userId) => console.log('setUserId', userId)}
>
<App />
</AnalyticsProvider>
3. Contributors
This project exists thanks to all the people who contribute. [Contributing]
4. License
Licensed under the MIT License, Copyright (c) 2021 EveryAnalytics.
See LICENSE for more information.