ta-react-ga

1.0.0-0 • Public • Published

Google Analytics Component

Component for adding Google Analytics code into a page.

Installation

npm install ta-react-componentname --save

Usage

import GoogleAnalytics from 'ta-react-ga';
 
...
 
class YourComponent extends React.Component {
  render() {
  
    const trackerDefinitions = [
                                 {
                                     "id": "UA-111111-1",
                                     "name": "example1",
                                     "refresh": "01.11.2016 13:42:47",
                                     "cache": "false"
                                 },
                                 {
                                     "id": "UA-111111-7",
                                     "name": "example2",
                                     "refresh": "01.11.2016 13:42:47",
                                     "cache": "false"
                                 }
                             ]
 
    return (
      <GoogleAnalytics trackers={trackerDefinitions} />
    )
  }
}
 

API – 1.0.0

Props

Property Type Required Description
trackers [object] yes An array of tracker definitions, as seen in the example above.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0-0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0-0
    0

Package Sidebar

Install

npm i ta-react-ga

Weekly Downloads

0

Version

1.0.0-0

License

ISC

Last publish

Collaborators

  • xeophin