0.0.5 • Published 7 years ago
multiplytix-react v0.0.5
Multiplytix React
🚧 WIP 🏗 UNDER CONSTRUCTION 🚧
React context provider for Multiplytix, the unified analytics API.
- Mixpanel
- Google Analytics
- Google Remarketing Tag
- Facebook pixel
- Reddit pixel
- Twitter pixel
- Hotjar
Install
npm install --save multiplytix multiplytix-reactor
yarn add multiplytix multiplytix-reactUsage
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
Providerfrommultiplytix, give it a configuration, and have it wrap the<App>component. - In App.js we obtain
multiplytixViewandmultiplytixEventfrom the providedcontext. - In Cart.js we obtain
multiplytixEventfrompropswith the help ofwithMultiplytixconsumer.
Upcoming API changes
❓📦🤷♀️
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.
License
MIT © Cofab