Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from 'react';
- import ReactGA from 'react-ga';
- export default class SomeComponent extends React.Component {
- handleClick() {
- ReactGA.event({
- category: 'Navigation',
- action: 'Clicked Link',
- });
- }
- render() {
- return (
- <div>
- <a onClick={()=>{this.handleClick()}}>Link</a>
- </div>
- );
- }
- }
Add Comment
Please, Sign In to add comment