multiplytix-react
v0.0.5
Published
React context for Multiplytix, a unified analytics API
Downloads
11
Readme
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-react
or
yarn add multiplytix multiplytix-react
Usage
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
frommultiplytix
, give it a configuration, and have it wrap the<App>
component. - In App.js we obtain
multiplytixView
andmultiplytixEvent
from the providedcontext
. - In Cart.js we obtain
multiplytixEvent
fromprops
with the help ofwithMultiplytix
consumer.
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