Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug 1885857] Remove non standard page load events #2158

Merged
merged 6 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions src/telemetry/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ import GleanMetrics from "@mozilla/glean/metrics";

import { googleAnalytics } from "./ga";

// Glean generated metrics and pings files
import * as pageMetrics from "./generated/page";
abhi-agg marked this conversation as resolved.
Show resolved Hide resolved
import { pageView as pageViewPing } from "./generated/pings";

// detecting "do not track" via these instructions:
// https://dev.to/corbindavenport/how-to-correctly-check-for-do-not-track-with-javascript-135d
const isDNTEnabled =
Expand Down Expand Up @@ -66,12 +62,6 @@ export function submitPageViewTelemetry(path) {
});
}

// Use the standard events.
// Use the standard (built-in Glean) page load events.
GleanMetrics.pageLoad({ url: path });

// Send telemetry to Glean.
pageMetrics.loaded.set();
// Remove query params and trailing `/` characters.
pageMetrics.path.set(path.split("?")[0].replace(/\/$/, ""));
pageViewPing.submit();
}
38 changes: 0 additions & 38 deletions src/telemetry/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,3 @@

---
$schema: moz://mozilla.org/schemas/glean/metrics/2-0-0
abhi-agg marked this conversation as resolved.
Show resolved Hide resolved

page:
loaded:
type: datetime
lifetime: ping
send_in_pings:
- page-view
description: |
The time the page was loaded.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1741582
data_reviews:
- https://github.com/mozilla/glean-dictionary/pull/1015#issuecomment-996051009
data_sensitivity:
- interaction
notification_emails:
- brizental@mozilla.com
- glean-team@mozilla.com
expires: never
path:
type: string
lifetime: ping
send_in_pings:
- page-view
description: |
The path of the page that was loaded.

Query arguments will be stripped before recording.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1741582
data_reviews:
- https://github.com/mozilla/glean-dictionary/pull/1015#issuecomment-996051009
data_sensitivity:
- interaction
notification_emails:
- brizental@mozilla.com
- glean-team@mozilla.com
expires: never
13 changes: 0 additions & 13 deletions src/telemetry/pings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,3 @@

---
$schema: moz://mozilla.org/schemas/glean/pings/2-0-0

page-view:
description: |
A ping that will be sent everytime a new page is visited.
include_client_id: true
send_if_empty: false
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1741582
data_reviews:
- https://github.com/mozilla/glean-dictionary/pull/1015#issuecomment-996051009
notification_emails:
- brizental@mozilla.com
- glean-team@mozilla.com