ta-react-webseismotracker
v2.0.1
Published
Track hits in Webseismo.
Downloads
7
Maintainers
Readme
Webseismo-Tracker Component
Installation
yarn add ta-react-webseismotracker
Usage
import WebseismoTracker from 'ta-react-webseismotracker';
// ...
class YourComponent extends React.Component {
componentDidMount() {
// Get the Webseismo statistics object from Newsnet API here
// NOT ACTUAL IMPLEMENTATION!
this.setState({
webseismoTrackingObject: data.statistics.webseismo
})
}
render() {
return <WebseismoTracker {this.state.webseismoTrackingObject}/>
}
}
API
WebseismoTracker
Tracker component to render an invisible pixel image that tracks the hits on the page on the Webseismo screen.
Meta
- version: 2.0
webseismoTracker
Activates a call to a tracking pixel; based on the current content width it will call a different URL.
Parameters
props
object
Returns XML A TrackingPixel react element.
Contributing
Development
Code resides in /src
. Test cases are provided
using Storybook. Add test cases in
/stories/index.js
,
and run them with
yarn run storybook
They will appear on http://localhost:9001.
This repository follows the Standard JS style. To fix your code, run
yarn run fix
Building & Releasing
Babel is used to provide ES5 compatible code. To compile run
yarn run dist
Changes should go into the changelog. The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Update the Readme with the current API using
yarn run docs