name: Intervention description: An area that contains personalised content to the user body: | The intervention is used to show personalised content. For instance, if the user has visited multiple pages in the same area of the site, we might want let them know that there are other pages on GOV.UK that would be useful to them. This component would be used to add this personalised content and would indicate to the user that this is not normally part of the page, but has been added for them specifically. The dismiss link works without Javascript by pointing to the current URL with the "hide-intervention" query string parameter set to "true". It's progressively enhanced and sets a cookie to remember that the user has dismissed the banner before. The cookie requires a "name" parameter, the value of which is stored in the cookie to distinguish which campaign banner the user has dismissed. accessibility_criteria: | The intervention component must: - have a border colour contrast ratio of more than 4.5:1 with its background to be visually distinct - prevent screen readers from announcing the dismiss link icon shared_accessibility_criteria: - link accessibility_excluded_rules: - landmark-unique # aria-label attributes will be duplicated in component examples list uses_component_wrapper_helper: true examples: default: data: suggestion_text: You should renew your permit every 6 months. with_suggestion_link: data: suggestion_text: Based on your browsing you might be interested in suggestion_link_text: "Travel abroad: step by step" suggestion_link_url: /travel-abroad with_dismiss_link: description: | Name is required in order to set a cookie. The name value should be distinct to the campaign for the banner, so that other banners using this component are not hidden by accident. data: suggestion_text: You should renew your permit every 6 months. dismiss_text: Hide this suggestion name: campaign-name with_hide: description: | This example is for when we want to hide by default and display to the user based on some logic, either in the backend or with Javascript. data: suggestion_text: You should renew your permit every 6 months. suggestion_link_text: You may be invited to fill in a questionnaire suggestion_link_url: /questionnaire hide: true open_suggestion_link_in_new_tab: description: | When sending users to another online task, you don't want to completely hijack their original flow on GOV.UK. Adding the option to open links in a new tab helps to address this. Link text should tell the user that the link opens in a new tab. Note: "(opens in a new tab)" is added to link text if the phrase isn't included. data: suggestion_text: You should renew your permit every 6 months. suggestion_link_text: You can now apply for a permit online suggestion_link_url: www.google.com/permit new_tab: true without_ga4_tracking: description: | Disables GA4 tracking on the banner. Tracking is enabled by default. This includes link tracking on the component itself, event tracking on the 'Hide' link, and allows pageviews to record the presence of the banner on page load. data: disable_ga4: true suggestion_text: Based on your browsing you might be interested in suggestion_link_text: "Travel abroad: step by step" suggestion_link_url: /travel-abroad dismiss_text: Hide this suggestion name: another-campaign-name