diff --git a/add-on/src/lib/ipfs-companion.js b/add-on/src/lib/ipfs-companion.js index 6a29da729..0d3c1d7a0 100644 --- a/add-on/src/lib/ipfs-companion.js +++ b/add-on/src/lib/ipfs-companion.js @@ -179,7 +179,8 @@ export default async function init () { function onTelemetryMessage (request, sender) { if (request.trackView) { - return trackView(request.trackView) + const { version } = browser.runtime.getManifest() + return trackView(request.trackView, { version }) } } diff --git a/add-on/src/lib/telemetry.js b/add-on/src/lib/telemetry.js index f3e5a2b7c..3d1932cc8 100644 --- a/add-on/src/lib/telemetry.js +++ b/add-on/src/lib/telemetry.js @@ -34,9 +34,9 @@ export function handleConsentFromState (state) { } const ignoredViewsRegex = [] -export function trackView (view) { +export function trackView (view, segments) { log('trackView called for view: ', view) - metricsProvider.trackView(view, ignoredViewsRegex) + metricsProvider.trackView(view, ignoredViewsRegex, segments) } export const startSession = (...args) => metricsProvider.startSession(...args)