1.0.0 • Published 7 years ago
ta-react-polymorphic-tracking v1.0.0
Polymorphic Tracking
Component to track visits to a website, accessing the Newsnet API for all tracking information. Currently supports GTM, WEMF and Webseismo. Additional Providers need to be added separately.
Version: 1.0
- Polymorphic Tracking(#module_Polymorphic Tracking)
- module.exports(#exp_module_Polymorphic Tracking--module.exports) ⇐ React.PureComponent ⏏
- new module.exports()(#new_module_Polymorphic Tracking--module.exports_new)
- instance
- .componentDidMount()(#module_Polymorphic Tracking--module.exports+componentDidMount)
- static
- .trackWithImage(src)(#module_Polymorphic Tracking--module.exports.trackWithImage)
- module.exports(#exp_module_Polymorphic Tracking--module.exports) ⇐ React.PureComponent ⏏
module.exports ⇐ React.PureComponent ⏏
Kind: Exported class
Extends: React.PureComponent
new module.exports()
Param | Type | Description |
---|---|---|
props.articleId | string | The article ID of the link article in the CD. If not available will assume that content is being loaded in an iframe. |
module.exports.componentDidMount()
Called after component has been mounted. This should only be called once within the component lifecycle, even with state and props changing.
Kind: instance method of module.exports(#exp_module_Polymorphic Tracking--module.exports)
module.exports.trackWithImage(src)
Track a visit using an image.
Kind: static method of module.exports(#exp_module_Polymorphic Tracking--module.exports)
Param | Type | Description |
---|---|---|
src | string | The URL of the tracking pixel to use as the image source. |
Installation
yarn add ta-react-componentname
Usage
import Component from 'ta-react-componentname';
// more code...
class YourComponent extends React.Component {
render() {
return (
<Component propName="example" />
)
}
}
1.0.0
7 years ago