Need private packages and team management tools?Check out npm Teams »

This package has been deprecated

Author message:

Both polymorphic and 'normal' component have been merged, please use @ta-interaktiv/react-tracking instead. No changes in your code are necessary.

ta-react-polymorphic-tracking

1.0.0 • Public • Published

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

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

module.exports.trackWithImage(src)

Track a visit using an image.

Kind: static method of 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" />
    )
  }
}
 

Install

npm i ta-react-polymorphic-tracking

DownloadsWeekly Downloads

2

Version

1.0.0

License

ISC

Last publish

Collaborators

  • avatar