react-ga-hoc
Send GA pageview safely with async data.
Installation
$ npm install react-ga react-ga-hoc --save
Usage
- As HOC
;; // SDK Setupga; // Use HOC with Container <div/>;
- ES7 decorator
@Component { return <div/>; }
API
: HigherOrderComponent
Arguments | Default | Description |
---|---|---|
path |
current path | path to be sent a pageview |
Test
$ npm run lint
$ npm run test:watch
CONTRIBUTING
- ⇄ Pull requests and ★ Stars are always welcome.
- For bugs and feature requests, please create an issue.
- Pull requests must be accompanied by passing automated tests (
$ npm test
).