Server Side updates to support cardgrid CTA
Categories
(Firefox :: New Tab Page, enhancement, P1)
Tracking
()
People
(Reporter: pdahiya, Assigned: mmiermans)
References
Details
Scope of this bug is to update feeds to support spocs variant in Bug 1566545
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Comment 1•5 years ago
|
||
NI Mathijs for feedback and scope work needed on server side. Thanks!
Comment 2•5 years ago
|
||
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
Assignee | ||
Comment 4•5 years ago
•
|
||
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.
Comment 5•5 years ago
|
||
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?
Assignee | ||
Comment 6•5 years ago
|
||
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.
Updated•5 years ago
|
Reporter | ||
Comment 7•5 years ago
|
||
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>'
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 8•5 years ago
|
||
:pdahiya: I have a PR ready for the Proxy Server to return two new fields for spocs
sponsor
will be equal tocontext
without "Sponsored by " prefix. That way the client can render it to match the design.cta
(optional) will be set to the CTA copy if it's present in AdZerk.
Reporter | ||
Comment 9•5 years ago
•
|
||
(In reply to mathijs from comment #8)
:pdahiya: I have a PR ready for the Proxy Server to return two new fields for spocs
sponsor
will be equal tocontext
without "Sponsored by " prefix. That way the client can render it to match the design.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.
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Comment 10•5 years ago
•
|
||
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
Comment 11•5 years ago
|
||
We won't be testing promo units in the hero for 70 so we can push supporting CTAs for hero stories to 71.
Updated•5 years ago
|
Assignee | ||
Comment 12•5 years ago
|
||
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?
Assignee | ||
Updated•5 years ago
|
Reporter | ||
Comment 13•5 years ago
•
|
||
(In reply to mathijs from comment #12)
Punam: We will set
cta_variant
tobutton
if it should be rendered as a button and tolink
if it should be a link. Ifcta_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.
Reporter | ||
Updated•5 years ago
|
Assignee | ||
Comment 14•5 years ago
|
||
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.
Comment 15•5 years ago
|
||
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.
Comment 16•5 years ago
|
||
That's correct Mathijs, we would like to be able to enable/disable the CTA from the layout.
Updated•5 years ago
|
Assignee | ||
Comment 18•5 years ago
|
||
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.
Description
•