Skip to content

Commit 1948bd0

Browse files
authored
Merge pull request #1900 from mozilla/1886443-click-events-in-web-sample
Bug 1886443 - automatic click events in web sample project
2 parents fc89e7f + a8fa49f commit 1948bd0

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

samples/browser/web/src/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
<title>Glean.js Website Sample</title>
88
</head>
99
<body>
10-
<button id="record" role="button" aria-pressed="false">
10+
<button id="record" role="button" aria-pressed="false" data-glean-id="record-button" data-glean-label="record">
1111
Record
1212
</button>
13-
<button id="glean" role="button" aria-pressed="false">
13+
<button id="glean" role="button" aria-pressed="false" data-glean-id="submit-button" data-glean-label="submit">
1414
PUSH 👏 THIS 👏 BUTTON
1515
</button>
1616
<p id="console-warn">

samples/browser/web/src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ import * as metrics from "./generated/sample.js";
1010

1111
Glean.setLogPings(true);
1212
Glean.setDebugViewTag("glean-from-website");
13-
Glean.initialize("glean-sample-website", true);
13+
Glean.initialize("glean-sample-website", true, {
14+
enableAutoElementClickEvents: true
15+
});
1416

1517
metrics.pageLoaded.set();
1618

0 commit comments

Comments
 (0)