Closed Bug 1566547 Opened 5 years ago Closed 5 years ago

Server Side updates to support cardgrid CTA

Categories

(Firefox :: New Tab Page, enhancement, P1)

enhancement
Points:
8

Tracking

()

RESOLVED FIXED
Iteration:
70.4 - Aug 19 - Sep 1

People

(Reporter: pdahiya, Assigned: mmiermans)

References

Details

Scope of this bug is to update feeds to support spocs variant in Bug 1566545

Blocks: 1566545
Flags: needinfo?(mathijs)

NI Mathijs for feedback and scope work needed on server side. Thanks!

This unit should support ads for brands and Mozilla promotions like featuring Firefox products and services.

If a user has turned off sponsored content they should not see brand ads, however they should still see Mozilla promotions.

This unit should support all the properties the SPOC unit does in addition to displaying a CTA

Brand Ad Requirements

  • CTA copy e.g. "Learn more"
  • Link for CTA is the same as the link for the promo

Mozilla Promo Requirements

  • Label copy e.g. "Message from Firefox"
  • CTA copy e.g. "Learn more"
  • Link for CTA is the same as the link for the promo

Design Spec
https://www.figma.com/file/eGdZVYlZ5evvePHUCtKnYg7u/New-Tab-Spec-for-Fx-70?node-id=77%3A0

I see this as two parts:
1. Adding a CTA button that's the same link as the ad. This only requires client-side changes, so no work on the backend.
2. Mozilla Promo requirements. This sounds like a pretty significant change. It's introducing a third category besides organic recs and spocs.

We should talk live about (2) before our Monday triage meeting.

Flags: needinfo?(mathijs) → needinfo?(wkonu)

Note we need copy for the CTA e.g. learn more, this should be set on the backend.

Re: mozilla promo is this something we can add later?

Flags: needinfo?(wkonu) → needinfo?(mathijs)

Forgot about the CTA copy: yeah that would need to come through from the backend of course. It's easy to add fields to spocs.

Having a promotion that's not a regular spoc is more of a paradigm shift. I have a few ideas on how to do this, but in any case it would require Firefox changes as well as server-side changes.

Flags: needinfo?(mathijs)
Priority: -- → P1

I believe in addition to CTA copy, we need spocs context for Variant A that should return just text 'Sponsored'. As of now spocs context returns 'Sponsored by <domain name>'

Flags: needinfo?(mathijs)
Iteration: --- → 70.2 - Jul 22 - Aug 4
Points: --- → 8
Iteration: 70.2 - Jul 22 - Aug 4 → 70.3 - Aug 5 - 18

:pdahiya: I have a PR ready for the Proxy Server to return two new fields for spocs

  1. sponsor will be equal to context without "Sponsored by " prefix. That way the client can render it to match the design.
  2. cta (optional) will be set to the CTA copy if it's present in AdZerk.
Flags: needinfo?(mathijs)

(In reply to mathijs from comment #8)

:pdahiya: I have a PR ready for the Proxy Server to return two new fields for spocs

  1. sponsor will be equal to context without "Sponsored by " prefix. That way the client can render it to match the design.
  2. cta (optional) will be set to the CTA copy if it's present in AdZerk.

:mathijs looks good and should work. One last ask from server side is to change layout API to indicate against a component if CardUI should render cta as a link or button. A property cta_variant (optional) in JSON, something like:

   {
     type: "CardGrid",
     cta_variant: true,
     properties: {
       items: 21,
     },...

If cta_variant exists with value true, CardUI will display button variation, if its false or doesn't exist, by default Card UI shows link if cta is found in spoc.

Flags: needinfo?(mathijs)

NI @wolasi to clarify scope of this bug is to show cta in cards shown inside both CardGrid and Hero component if cta is available for a spoc. Thanks

Flags: needinfo?(wkonu)

We won't be testing promo units in the hero for 70 so we can push supporting CTAs for hero stories to 71.

Flags: needinfo?(wkonu)
Assignee: nobody → ssami

Punam: We will set cta_variant to button if it should be rendered as a button and to link if it should be a link. If cta_variant is missing then the CTA shouldn't be rendered. Does that sound good?

Flags: needinfo?(mathijs) → needinfo?(pdahiya)
Summary: Server Side updates to support spocs variants → Server Side updates to support cardgrid CTA

(In reply to mathijs from comment #12)

Punam: We will set cta_variant to button if it should be rendered as a button and to link if it should be a link. If cta_variant is missing then the CTA shouldn't be rendered. Does that sound good?

In nightly as of now, if CTA is rendered or not is controlled by if a record has cta property and if found by default display it as link. If cta is not found its not rendered. If a cta_variant is set as true in layout it displays as button.

Is there a possibility when we don't want to show cta even when the record has cta set? I am ok going with your suggestion if we want layout API to control CTA display irrespective of the value in record. To implement your suggestion will need a small UI patch updating DSCard to handle exact values of cta_variant from layout API.

Flags: needinfo?(wkonu)
Flags: needinfo?(pdahiya)
Flags: needinfo?(mathijs)
Flags: needinfo?(wkonu)

I'm making an assumption here, but I'm fairly sure it would be desired from a product standpoint that the CTA can be enabled/disabled from the layout.

Flags: needinfo?(mathijs)

Tawanda/Wolasi - can you chime in on this assumption?

(In reply to mathijs from comment #14)

I'm making an assumption here, but I'm fairly sure it would be desired from a product standpoint that the CTA can be enabled/disabled from the layout.

Flags: needinfo?(wkonu)
Flags: needinfo?(tkanhema)

That's correct Mathijs, we would like to be able to enable/disable the CTA from the layout.

Flags: needinfo?(tkanhema)

That sounds reasonable to me.

Flags: needinfo?(wkonu)
Assignee: ssami → mathijs
Iteration: 70.3 - Aug 5 - 18 → 70.4 - Aug 19 - Sep 1

Deployed two new layouts to production:

layout_variant=3-col-7-row-cta-button
layout_variant=3-col-7-row-cta-link

These respectively contain "cta_variant": "button" and "cta_variant": "link" in the CardGrid.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.