React context for Multiplytix, a unified analytics API
npm install multiplytix-react
> React context provider for Multiplytix, the unified analytics API.
- Mixpanel
- Google Analytics
- Google Remarketing Tag
- Facebook pixel
- Reddit pixel
- Twitter pixel
- Hotjar
``bash`
npm install --save multiplytix multiplytix-react
or
`bash`
yarn add multiplytix multiplytix-react
Wrap your App in a Provider, and receive multiplytixEvent or multiplytixView as props with the help of withMultiplytix wrapper, or receive them from the context through contextTypes.
Check the example project in this repository.
- In index.js we import a Provider from multiplytix, give it a configuration, and have it wrap the component.multiplytixView
- In App.js we obtain and multiplytixEvent from the provided context.multiplytixEvent
- In Cart.js we obtain from props with the help of withMultiplytix` consumer.
#### ❓📦🤷♀️
We're exploring how to implement the context provider with the new React Context API. Please check the draft proposal and state your preferences in the issues section. Thank you.
MIT © Cofab