Skip to content

Marketing consent

<nsx-marketing-consent>

Overview

A legally compliant way to collect marketing consent from the user.

✨ This is an auto-generated AI summary of the nsx-marketing-consent's documentation. It may not be accurate. ✨

Use this experience pattern in any journey where there is a need to capture and submit customer marketing preferences. Only use it for this purpose – do not use it for viewing or changing existing preferences.

Examples

Guidance

Standard

Labelled diagram of nsx-marketing-consent

It is possible to change the heading and the first paragraph to suit specific context. However, we recommend using the default content as these have been signed off by the legal team.

If there is an official update to the default content, please inform the Nucleus team so that the the component can be updated.

Implementation

Placement

The nsx-marketing-consent component can only be used as a child of the <ns-form > form> element.

Specification

Attributes

has-opt-out
Property
hasOptout
Description
The toggle to indicate opt-out event handler is available or not.
Type
boolean
Default
false
name
Property
name
Type
string
Default
marketing-consent
value
Property
value
Type
string
Default
labelID
Property
labelID
Type
string
Default
heading
Property
heading
Type
string
Default
type
Property
type
Description
The type of the marketing consent.
Type
string
Options
standard light
Default
standard

Slots

SlotPermitted tagsDescription
heading<h2> <h3> The alternative heading of the marketing consent. Heading level depends on its place in the semantics of the page.
paragraph<p> The alternative content of the marketing consent.
opt-out<a> The link to update the customer preferences.

Events

NameDescription
opt-outDispatched when `chatting online` button is clicked. The button is enabled when `has-opt-out` attribute is set.
change

Figma

Please note: The nsx-marketing-consent Figma component configuration instructions are available only to members of the British Gas workspace who have access to the Nucleus Figma UI Kit.

Last updated: