Package Exports
- react-tweeker-js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-tweeker-js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
react-tweeker-js
Simple a/b and multivariate testing in React.
A simple React library to include the Tweeker embed code on your site.
If you're using vanilla js, check out our ES6 Library. This react library uses that under the hood.
Installation
To use, first sign up for an account on https://tweeker.io
Then in your javascript install the module using npm
or yarn
.
npm install react-tweeker-js
or
yarn add react-tweeker-js
Usage
Import the component into your main App
component:
import React from "react"
import ReactDOM from "react-dom"
import TweekerEmbed from "react-tweeker-js"
const App = () => (
<>
<TweekerEmbed
businessId="YOUR_BUSINESS_ID"
embedVersion="YOUR_EMBED_VERSION"
/>
{...your other components}
</>
);
ReactDOM.render(<App />, document.body)
The <TweekerEmbed>
component should run on every page of your site.
Also make sure you replace the arguments YOUR_BUSINESS_ID
and YOUR_EMBED_VERSION
with your accounts values. You can get these values at https://app.tweeker.io/embed