0.0.5 • Published 6 years ago

multiplytix-react v0.0.5

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

Multiplytix React

NPM

🚧 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 from multiplytix, give it a configuration, and have it wrap the <App> component.
  • In App.js we obtain multiplytixView and multiplytixEvent from the provided context.
  • In Cart.js we obtain multiplytixEvent from props with the help of withMultiplytix 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