diff --git a/src/templates/QuickstartDetails.js b/src/templates/QuickstartDetails.js index 14416685f..ff093401d 100644 --- a/src/templates/QuickstartDetails.js +++ b/src/templates/QuickstartDetails.js @@ -51,12 +51,13 @@ const QuickstartDetails = ({ data, location }) => { }, ]; - const viewRepoClick = () => - tessen.track('instantObservability', 'QuickstartViewRepoClick', { + const trackButtonClick = (action, quickstart) => () => + tessen.track('instantObservability', action, { quickstartName: quickstart.name, quickstartId: quickstart.id, quickstartUrl: quickstart.packUrl, }); + const tessenTabTrack = (action, quickstart) => (id, count) => { tessen.track('instantObservability', action, { QuickstartTabState: id, @@ -178,7 +179,10 @@ const QuickstartDetails = ({ data, location }) => { margin: 1rem 0 0 0; } `} - onClick={viewRepoClick} + onClick={trackButtonClick( + 'QuickstartViewRepoClick', + quickstart + )} > {
  • - tessen.track( - 'instantObservability', - 'QuickstartDetailsSignUpClick', - { - quickstartName: quickstart.name, - quickstartId: quickstart.id, - } - ) - } + onClick={trackButtonClick( + 'QuickstartDetailsSignUpClick', + quickstart + )} > Sign Up {' '} for a free New Relic account or{' '} - tessen.track( - 'instantObservability', - 'QuickstartDetailsLoginClick', - { - quickstartName: quickstart.name, - quickstartId: quickstart.id, - } - ) - } + onClick={trackButtonClick( + 'QuickstartDetailsLoginClick', + quickstart + )} > Log In {' '}