diff --git a/website/src/components/Playground/CodeGenerators.js b/website/src/components/Playground/CodeGenerators.js index c901dfb6..21b7f185 100644 --- a/website/src/components/Playground/CodeGenerators.js +++ b/website/src/components/Playground/CodeGenerators.js @@ -66,7 +66,19 @@ export default class CodeGenerators extends Component { copied: false, }; - onClick = ({key}: {key: string}) => this.setState({showModal: key}); + _ref: ?HTMLTextAreaElement; + + onClick = ({key}: {key: string}) => { + this.setState({showModal: key}); + if (window.ga) { + window.ga('send', { + hitType: 'event', + eventCategory: 'CodeGenerators', + eventAction: 'show', + eventLabel: key, + }); + } + }; onCopy = () => { if (this._ref) {