0.1.9 • Published 2 years ago

react-segment v0.1.9

Weekly downloads
1,995
License
MIT
Repository
github
Last release
2 years ago

react-segment

Segment.io integration for React.js

Installation

// with npm
$ npm install react-segment --save

// with yarn
$ yarn add react-segment

Getting started

If you're developing using npm and CommonJS modules:

let analytics = require('react-segment');

if(process.env.NODE_ENV == 'development'){
    analytics.default.load("DEVELOPMENT KEY");
}else if(process.env.NODE_ENV == 'staging' ){
    analytics.default.load("STAGING KEY");
}else if(process.env.NODE_ENV == 'pre-production'){
    analytics.default.load("PRE-PRODUCTION KEY");
}else if(process.env.NODE_ENV == 'production'){
    analytics.default.load("PRODUCTION KEY");
}

Don't see your prop? explaining your use case, and I will add it.

Issues

Please file an issue if you find a bug, or need help.

License

The MIT License (MIT)

Copyright (c) 2022 Anish M Prasad

0.1.9

2 years ago

0.1.8

5 years ago

0.1.7

6 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.1

9 years ago