Implement triggers and targeting for the 3 Fakespot feature callouts
Categories
(Firefox :: Messaging System, enhancement, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox119 | --- | fixed |
People
(Reporter: pdahiya, Assigned: aminomancer, NeedInfo)
References
(Blocks 1 open bug)
Details
(Whiteboard: [omc])
Attachments
(2 files)
Implement tooltip message that points to shopping icon using FeatureCallouts capturing three different scenarios that shows tooltip after sidebar closes for
a) ‘opted-in’ users, after user closes sidebar for the first time.
b) ‘not opted-in’ users, after user closes the sidebar for the first time.
c) ‘opted-in’ users who have closed the sidebar in a previous session and are now, in a future session (some time has passed), revisiting a PDP again. This is the ‘nudge’ to get the them back in.
Tooltip Callout figma:
Reporter | ||
Updated•1 year ago
|
Reporter | ||
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Reporter | ||
Comment 1•1 year ago
|
||
Assignee | ||
Comment 2•1 year ago
|
||
Now I think about it, this is really 2 triggers, plus some additional targeting attributes. We need to somehow record, in a way that JEXL can reference:
- if user is opted in/out (targeting)
- when user closes the sidebar (trigger)
- how many times user has closed the sidebar (probably a pref)
- if the sidebar was closed previously in this session (probably a pref)
- user visits a product page (trigger, I guess it should be fired by the same method that opens the shopping sidebar)
Assignee | ||
Updated•1 year ago
|
Reporter | ||
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Assignee | ||
Comment 3•1 year ago
•
|
||
optedIn is already a pref, we can just use the standard preferenceValue
function for that.
The 2 triggers can work in a sort of intertwined way.
- The "on closed" trigger can save a pref when it's closed for the first time, whose value is the current session ID.
- The "on product page" trigger doesn't need to reference the pref directly, but the messages can check it in targeting to require that it's not the same as the current session ID:
TelemetrySession.getMetadata("").sessionId
- We don't care how many times the sidebar was closed, since we just want to check that it's never been closed before now. (It would make sense to pass this state as trigger context, because the trigger is also going to set the pref to the current session ID, which may happen before JEXL finishes evaluating, not sure) So this is also handled by the "last close session ID" pref.
Also, not mentioned in the Figma spec, but discussed in the flow requirements, is that callout 2 should only show if 24 hours have passed since callout 1/3 was shown. That can be done with messageImpressions though:
(currentDate | date -
messageImpressions.FAKESPOT_CALLOUT_CLOSED_OPTED_IN_DEFAULT[
messageImpressions.FAKESPOT_CALLOUT_CLOSED_OPTED_IN_DEFAULT | length - 1
] | date) / 3600000 > 24 ||
(currentDate | date -
messageImpressions.FAKESPOT_CALLOUT_CLOSED_NOT_OPTED_IN_DEFAULT[
messageImpressions.FAKESPOT_CALLOUT_CLOSED_NOT_OPTED_IN_DEFAULT | length - 1
] | date) / 3600000 > 24
^ That simultaneously requires that one of them has been seen and that it was seen more than 24hrs ago.
Assignee | ||
Comment 4•1 year ago
|
||
Depends on D184994
Assignee | ||
Comment 5•1 year ago
|
||
This doesn't technically depend on bug 1842366. That's gonna be crucial for the MVP since we need the callout to follow the shopping urlbar button (and disappear when the button disappears). But that doesn't block implementation of the triggers. However, this does ultimately depend on bug 1846044, because the triggers are reusing the same ShoppingUtils logic and changing names and stuff. So it just makes things simpler to start things on bug 1846044.
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Comment 7•1 year ago
|
||
Backed out for causing bc failures related to shopping.
Comment 9•1 year ago
|
||
bugherder |
Description
•