File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
dotcom-rendering/src/components Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -261,6 +261,10 @@ export const ManyNewsletterSignUp = ({
261
261
return undefined ;
262
262
} ) ;
263
263
264
+ const marketingOptInType = marketingOptIn
265
+ ? 'similar-guardian-products-optin'
266
+ : 'similar-guardian-products-optout' ;
267
+
264
268
if ( ! response ?. ok ) {
265
269
const responseText = response
266
270
? await response . text ( )
@@ -271,6 +275,7 @@ export const ManyNewsletterSignUp = ({
271
275
renderingTarget ,
272
276
{
273
277
listIds,
278
+ ...( marketingOptIn !== undefined && { marketingOptInType } ) ,
274
279
// If the backend handles the failure and responds with an informative
275
280
// error message (E.G. "Service unavailable", "Invalid email" etc) this
276
281
// should be included in the event data.
@@ -289,6 +294,7 @@ export const ManyNewsletterSignUp = ({
289
294
renderingTarget ,
290
295
{
291
296
listIds,
297
+ ...( marketingOptIn !== undefined && { marketingOptInType } ) ,
292
298
} ,
293
299
) ;
294
300
setStatus ( 'Success' ) ;
You can’t perform that action at this time.
0 commit comments