Telemetry sent directly by FeatureCallout.sys.mjs doesn't include the screen id, only the base message_id
Categories
(Firefox :: Messaging System, defect, P2)
Tracking
()
People
(Reporter: aminomancer, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: good-first-bug, Whiteboard: may-intern)
Most telemetry events in a feature callout are emitted from the React component. For example, this action telemetry. In the React component, message_id is not actually msg.message_id. It is ${props.message_id}_${order}_${currentScreen.id}.
This allows us to use a handy technique in experiments, where we give every treatment branch the same message_id (and content.message_id), but have them differ only in their screen ids. Then, they will all share impressions. If we didn't do that, users could see duplicate messages. Say Treatment A (message_id: MSG_A) wins and we roll it out. Users who were in the experiment and saw Treatment B would have recorded impressions like MSG_B, so when we evaluate whether to show them MSG_A, they would count as below the frequency caps, because they are two different message ids. By sharing message ids across branches, we avoid that problem completely.
There are other workarounds for this, but they're clunky. For example, when rolling out a winning treatment, you could add message-level targeting to it that reimplements the frequency caps for all the experimental message ids. But we have a real frequency capping system, so it's a bit silly to reinvent the wheel inside of JEXL.
The problem is that we have some additional telemetry that isn't recorded from the React component, but from the FeatureCallout wrapper.
- The Escape key handler
- The
page_event_listenershandler - Another
DISMISSsource
And none of these include the screen id. So if you used the approach I suggested, those events would all look the same regardless of which branch the user was in. That's not the end of the world, because all of these events can be joined with each other and with the nimbus dataset, so it's always possible to A) link these events up (by client_id) to an impression event that includes the screen id; or B) link them (also by client_id) with the experiment data that directly specifies the branch.
But it's still sort of problematic, because that only tells us which variant and which branch the user was on. In the case of a multi-screen message, we may actually want to know which screen the user was on. We don't check the DISMISS event very often, because it's not necessary to get a clickthrough rate. For that you just need to divide CTA clicks by impressions. And page_event_listeners is not used that often, and when it is, we rarely care about the telemetry. So this is not practically that important, but it is definitely a correctness issue.
So what we should be doing is probably something like this:
let message_id = this.config?.id.toUpperCase();
let screen_id = this.currentScreen?.id;
let order = this.config?.startScreen;
this.win.AWSendEventTelemetry?.({
event: "DISMISS",
event_context: {
source: `KEY_${event.key}`,
page: this.location,
},
message_id: `${message_id}_${order}_${screen_id}`,
});
(We shouldn't uppercase the screen_id because the React component currently doesn't.)
| Comment hidden (obsolete) |
| Reporter | ||
Updated•4 months ago
|
Comment 2•3 months ago
|
||
The severity field is not set for this bug.
:jprickett, could you have a look please?
For more information, please visit BugBot documentation.
Updated•3 months ago
|
Comment 3•3 months ago
|
||
Hi, could I please be assigned to this bug?
Description
•