SecuTix Gravity Team is thrilled to release the Newsletter Widget as one of our first widgets! The Newsletter Widget is nothing but a simple code snippet which you can easily integrate into a website. In the past, your online customers could only subscribe to your newsletter via the SecuTix online sales platform by either creating an account or purchasing as a guest. With this widget, potential customers could subscribe to your newsletter from any website that has the widget embedded. This flexible, highly customisable and easy to integrate widget could help you increase your newsletter's online exposure to a great extent.
Note |
---|
Please note that this article only applies to SecuTix Gravity Newsletter Widget V1 which is released within PizBernina V2. |
How does it work?
To use a newsletter widget, you first need to integrate a code snippet into your target website. You may either contact your web agency to embed the snippet into your website's HTML code or integrate it via Google Tag Manager. The code snippet will first call the SecuTix back-end service to fetch the necessary configurations (e.g. theme and labels) and then render the user interface of the widget based on the configuration. You can put the widget anywhere in your website, e.g. inside a pop-up, inside the footer or on the secondary column of your website, to name a few. The user interface of this widget contains a simple form with various fields (e.g. email address, title, first name and last name) and a submit button. Its default style and theme are the same as the ones from the corresponding online sales platform.
Once your online customers fill in the necessary information inside the widget and click the submit button, the newsletter widget will call the SecuTix back-end service to check whether an account already exists with the given email address. If not, a new account will be created inside SecuTix with the user information provided and from then any future newsletters will be sent to the given email address. If the email is already in use, the newsletter widget will display an error message and a link which points to the login page of the corresponding online sales platform.
Example
Below is an example of the newsletter widget integrated as a pop-up inside the demo site.
Sample code snippet
Code Block | ||||
---|---|---|---|---|
| ||||
<div id="stx-newsletter"></div> <script type="text/javascript" src="https://s3.eu-central-1.amazonaws.com/pub.tnwi.p16-s3.secutix.com/stx-widgets/Newsletter/v1/Newsletter.js"></script> <script type="text/javascript"> STX.config({apiKey:"8bafa660-8bc1-4982-83da-f15fce01f4ec", hostname:"hostname of your online sales platform"}); STX.widgets.Newsletter.render({props:{activeFields: ['civility', 'firstName', 'lastName']}, locale: "fr", root:"#stx-newsletter"}); </script> |
Parameters
apiKey - the secret token generated in your point of sale configuration screen. You will find this parameter in the Sales Channels > Point of sales > Characteristics > Internet Parameters tabGravity tab.
hostname - the hostname of the point of sale URL for your online sales platform.
Note Please note that the newsletter widget will fetch the configuration (e.g. theme and labels) from the corresponding point of sale.
activeFields - (Optional) an array where you can specify which fields you want to display in your newsletter widget. Supported fields are 'civility', 'firstName' and 'lastName'.
Note Please note that an email field is always displayed regardless of the activeFields values.
- locale - (Optional) the language code which defines the language of the newsletter widget. When not set, the widget will use the main institution language by default.
By default, the widget submits the default criterion code “NEWSLET”, and default authorization code “CNIL_O”, but it is possible to configure it to send custom criterion and authorization code by putting this parameters:
criteriaFields: [
{
criterionIdCode: 'NEWSLET2',
defaultValue: [true]
}
],
authorizationFields: [
{
authorizationCode: 'OTHER_CNIL_O',
defaultValue: true
}
]
Legal mention
If you would like to display a legal disclaimer inside the newsletter widget, you can do so by using the label overriding mechanism from the light customisation screen in the corresponding online sales platform's point of sale.
Google reCAPTCHA
Since the Newsletter Widget will actually create a user account inside your SecuTix system, in order to prevent potential security issues, we integrated Google's invisible reCAPTCHA into the widget. If you encounter an error saying 'Invalid domain for site key' while integrating the Newsletter Widget, that means that your website is not in the authorised white list for our Google reCAPTCHA account. Please contact our support team to add your site to the white list.