Skip to content

Commit

Permalink
adding telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
cauemarcondes committed Mar 11, 2021
1 parent db0e811 commit bc9b8cc
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,18 @@ export function TimeComparison() {
defaultMessage: 'Comparison',
})}
checked={comparisonEnabled}
onChange={(e) => {
if (e.target.checked === false) {
onChange={() => {
const nextComparisonEnabledValue = !comparisonEnabled;
if (nextComparisonEnabledValue === false) {
trackApmEvent({
metric: 'time_comparison_disabled',
});
}
urlHelpers.push(history, {
query: {
comparisonEnabled: Boolean(e.target.checked).toString(),
comparisonEnabled: Boolean(
nextComparisonEnabledValue
).toString(),
},
});
}}
Expand Down

0 comments on commit bc9b8cc

Please sign in to comment.