Closed Bug 1842071 Opened 1 year ago Closed 1 year ago

Implement triggers and targeting for the 3 Fakespot feature callouts

Categories

(Firefox :: Messaging System, enhancement, P1)

enhancement
Points:
7

Tracking

()

RESOLVED FIXED
119 Branch
Iteration:
119.2 - Sept 11 - Sept 22
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:

https://www.figma.com/file/Wu4kaHSfKSQnzkym7qek3R/Shopping-Experience-MVP?type=design&node-id=2599-82364&mode=design&t=Gk8jntOfCC0FjKIj-4

Iteration: --- → 117.1 - July 3 - July 14
Depends on: 1821826, 1842366
Priority: -- → P1
Iteration: 117.1 - July 3 - July 14 → 117.2 - July 17 - July 28
Whiteboard: [omc]
Blocks: 1845201
Summary: Show Messaging Tooltip after shopping sidebar closes → Add Feature Callout ASRouterTriggerListener that triggers when shopping sidebar closes
Attached image Shopping Tooltip.png

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:

  1. if user is opted in/out (targeting)
  2. when user closes the sidebar (trigger)
  3. how many times user has closed the sidebar (probably a pref)
  4. if the sidebar was closed previously in this session (probably a pref)
  5. user visits a product page (trigger, I guess it should be fired by the same method that opens the shopping sidebar)
Summary: Add Feature Callout ASRouterTriggerListener that triggers when shopping sidebar closes → Implement triggers and targeting for the 3 Fakespot feature callouts
Iteration: 117.2 - July 17 - July 28 → 118.1 - July 31 - Aug 11
Assignee: nobody → shughes
Status: NEW → ASSIGNED
Points: --- → 7
Iteration: 118.1 - July 31 - Aug 11 → 118.2 - Aug 14 - Aug 25

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.

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.

Depends on: 1846044
No longer depends on: 1842366
Iteration: 118.2 - Aug 14 - Aug 25 → 119.1 - Aug 28 - Sept 8
Iteration: 119.1 - Aug 28 - Sept 8 → 119.2 - Sept 11 - Sept 22
Pushed by shughes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d374e55d4625 Add Fakespot feature callout triggers. r=omc-reviewers,shopping-reviewers,Mardak,jhirsch

Backed out for causing bc failures related to shopping.

Flags: needinfo?(shughes)
Pushed by shughes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/de6c7081c5a3 Add Fakespot feature callout triggers. r=omc-reviewers,shopping-reviewers,Mardak,jhirsch
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: