dotcom-rendering
dotcom-rendering copied to clipboard
Marketing email promotions
What does this change?
- Add a new block element "MarketingEmailSignupBlockElement" that can be added to an article as part of the enhancement function to include a promotion for a marketing email.
- creates a component
MarketingEmailSignUpWrapperto represent the element - mostly using the same sub-components at the existingEmailSignUpWrapper- but rendering a link to the mma /email-prefs page instead of a sign-up form. - adds an "emailType" prop to the sign-up subcomponents to allow for the variations in behaviour and presentation between
MarketingEmailSignUpWrapperandEmailSignUpWrapper - extends the
enhanceNewsletterSignupfunction to check for tags corresponding to marketing emails and insert a "MarketingEmailSignupBlockElement" - defines a list of
MarketingConsentEmailrepresenting those hard-coded into the identity repo
This PR would currently have no user-facing effects as non of the defined MarketingConsentEmail have the "promotionTagId" property.
Why?
There's a long-standing request from the Guardian jobs team in-article promotions for the Guardian Job marketing email, that would work in substantially the same way as the existing sign-up blocks for editorial newsletters ie:
- The promotion is added to an article using a tag (in the case of editorial newsletters, tags with an id starting "campaign/email" are used)
- If the article is supposed to promote the email, a sign-up block is placed in the article body
This PR provides a mechanism to allowing that - when a tag is created to promote a marketing email, its Id can be added to the object describing the email in DCR.
Future work
- get design, compliance, marketing input on the new element - it is currently modelled on the editorial newsletter block, but there may be a desire for something more distinct
- PR in frontend to support the new form of sign-up request to the API
- add the tag ids to the list of
MarketingConsentEmails when a pattern/convention is agreed (these are likely to be campaign tags of some sort rather than existing keyword or sectioning tags)
Screenshots
| Before | After |
|---|---|
![]() |
![]() |

