Skip to content

Commit

Permalink
Add additional custom dimension to track traffic from the add-on (#435)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxxcrawford committed Nov 16, 2022
1 parent 6c910af commit 24bd849
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/js/shared/metrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@
async function sendRelayEvent(eventCategory, eventAction, eventLabel) {
// "dimension5" is a Google Analytics-specific variable to track a custom dimension.
// This dimension is used to determine which browser vendor the add-on is using: Firefox or Chrome
// "dimension7" is a Google Analytics-specific variable to track a custom dimension,
// used to determine where the ping is coming from: website, add-on or app
return await browser.runtime.sendMessage({
method: "sendMetricsEvent",
eventData: {
category: `Extension: ${eventCategory}`,
action: eventAction,
label: eventLabel,
dimension5: await getBrowser(),
dimension7: "add-on",
},
});
}
Expand Down

0 comments on commit 24bd849

Please sign in to comment.