profitwell-component

0.1.2 • Public • Published

profitwell-component

npm package

Simple react component to track by profitwell.

Usage

You can add tracking code by following.

import Profitwell from 'profitwell-component';

const App = ({email}) => {
  return (
    <div>
      <h1>Hello World</h1>
      <Profitwell authToken="YOUR_PROFITWELL_TOKEN" email={email} />
    </div>
  )
}

And use shouldNotLoad prop, you can run only specific environment.

import Profitwell from 'profitwell-component';

const App = ({email}) => {
  const isDevelopment = process.env.NODE_ENV !== 'production'
  return (
    <div>
      <h1>Hello World</h1>
      <Profitwell
        authToken="YOUR_PROFITWELL_TOKEN"
        email={email}
        shouldNotLoad={isDevelopment}
      />
    </div>
  )
}

Readme

Keywords

Package Sidebar

Install

npm i profitwell-component

Weekly Downloads

2

Version

0.1.2

License

MIT

Unpacked Size

27.3 kB

Total Files

7

Last publish

Collaborators

  • hideokamoto