With button location
When there is more than one button on a page, we should specify their location so that Analytics can differentiate between them.
The location should have one of two values: top
or bottom
.
When this parameter is passed, its value is reflected in the data-action
attribute (i.e “Unsubscribe-button-top”). When the flag is not present, data-action
defaults to “Subscribe-button” or “Unsubscribe-button”, depending on the state of the button.
How it looks (preview)
How to call this example
<%= render "govuk_publishing_components/components/single_page_notification_button", {
base_path: "/current-page-path",
js_enhancement: true,
button_location: "top"
} %>