Drop-in client-side implementation of the WebSub based email subscription API
The general purpose of the subscription widget is to provide a way for visitors to a company website to sign up for news emails from that particular company.
Under the hood, this subscription widget uses our WebSub functionality described under the API section of the documentation.
The script below will load the widget onto the website and hook up the functionality for subscribing to different types of Press Releases.
This widget is implemented as a Datablocks widget and uses the Datablocks JS-Loader to load the widget. Where <TOKEN> is a unique Datablocks widget token.
There are a few hidden fields that exist if a bad email is submitted or the GDPR box is not checked. Remember to test this out to style them accordingly.
Example
Below is an example where the customer has added styling
Example styling
Below is some example styling for the subscription widget. For a coherent look with the website, change dark blue to another color that matches the rest of the website.
CSS
Options
We provide a number of options configurable from our backend, such as:
What checkboxes are available (IR, PR, reports, annual reports)
Which of these are checked by default
Checkboxes to choose locale for the email subscription
Ability to have the email subscription follow the locale of the widgets locale setting
For example, you can request to not have the checkboxes for locale with this enabled
There are a number of classes attached to the elements provided by the widget to be able to style the widget.
We recommend not hiding elements by the classes provided, but instead request configured email subscription widgets from our backend.