Promotional components
Promotional components let you display widgets and pop-ups that show shoppers which seQura products you offer and how they work. This helps increase average order value and conversion rates. Both components are dynamic and load asynchronously via seQura's JavaScript library.
seQura's JavaScript library renders promotional widgets and sets up pop-up triggers on your chosen DOM elements.
1. Loading seQura JavaScript library
Include this script in your page header with the required configuration:
<script>
var sequraConfigParams = {
merchant: "YOUR_MERCHANT", // Your merchant reference given by seQura.
assetKey: "YOUR_ASSET_KEY", // Your asset key given by seQura.
products: ["i1", "pp3"], // List of seQura products that you want to include components.
scriptUri: "SCRIPT_URI", // seQura Javascript library uri for production or sandbox.
decimalSeparator: ",", // Decimal separator used in currencies formatting. Optional, default `,`.
thousandSeparator: ".", // Thousand separator used in currencies formatting. Optional, default `.`.
locale: "es-ES", // Language and country codes separated by hyphen -. Optional, default `es-ES`.
currency: "EUR", // Currency code available for chosen locale. Optional, default `EUR`.
};
(function(i, s, o, g, r, a, m) {i["SequraConfiguration"] = g;i["SequraOnLoad"] = [];i[r] = {};i[r][a] = function(callback) {i["SequraOnLoad"].push(callback);};(a = s.createElement(o)), (m = s.getElementsByTagName(o)[0]);a.async = 1;a.src = g.scriptUri;m.parentNode.insertBefore(a, m);})(window, document, "script", sequraConfigParams, "Sequra", "onLoad");
</script>Configuration parameters
| Key | Mandatory | Default value | Description |
|---|---|---|---|
merchant | Yes | Your merchant reference given by seQura. | |
assetKey | Yes | Your asset key given by seQura. | |
products | Yes | List of products for the components that you want to include in the page. | |
scriptUri | Yes | seQura Javascript library URI for production or sandbox | |
decimalSeparator | No | , | Decimal separator used in all number formatting included in the components. |
thousandSeparator | No | . | Thousand separator used in all number formatting included in the components. |
locale | No | es-ES | Locale configuration used for display format settings. |
currency | No | EUR | Currency code used for currency format, this should be available for the chosen locale configuration. |
2. Setting up placeholder elements
When loaded, seQura's JavaScript library finds all DOM elements with classes sequra-promotion-widget and sequra-educational-popup and configures them dynamically.
Promotion widget
Add a placeholder element with the class sequra-promotion-widget and product and amount attributes for the seQura product you want to promote. You can add multiple promotion widgets.
| Key | Mandatory | Default | Description |
|---|---|---|---|
class | Yes | Must be sequra-promotion-widget | |
type | No | text | Configures the layout. Must be one of text or banner. |
size | No | M | Configures the size. Must be one of S (small), M (medium) or L (large). |
font-color | No | #353735 | Configures the font color used. Must be a valid css color. |
background-color | No | transparent | Configures the main color used. Must be a valid css color. |
alignment | No | center | Configures the alignment of the widget. Must be one of left, center or right. |
branding | No | default | Configures the logo displayed in the widget. Must be one of none (no seQura logo), white (white seQura logo), black (black seQura logo) or default (seQura original logo). |
starting-text | No | only | Starting text options for pp3/pp6 text type. Must be only or as-low-as. |
amount-font-size | No | Configures the font size in pixels for the displayed amounts. Must be a number. | |
amount-font-color | No | Configures the font color for the displayed amounts. Must be a valid css color. | |
amount-font-bold | No | Configures font weight for displayed amounts. Must be true or false. | |
link-font-color | No | Configures the + info links color. Must be a valid css color. | |
link-underline | No | Configures the + info links underline presence. Must be true or false. | |
border-color | No | Configures the border colors. Must be a valid css color. | |
border-radius | No | Configures the border radius in pixels. Must be a number. | |
no-costs-claim | No | free | Sets all the promotional components texts that say “¡Gratis!” to “¡Sin costes!” if it's set to without-cost. Must be free or without-cost |
Note The configuration will fallback to default parameter value if any parameter is invalid
We strongly recommend setting a fixed height on the sequra-promotion-widget placeholder to prevent layout shift while the widget loads. Layout shift can hurt SEO and usability. Set the height in your CSS or directly with a style attribute.
Usage example
Instalment simulator with black logo
<div
class="sequra-promotion-widget"
data-amount="15000"
data-product="pp3"
data-size="L"
data-branding="black"
style="height:80px;"
></div>
Invoicing claim with green logo
<div
class="sequra-promotion-widget"
data-amount="1500"
data-product="i1"
data-alignment="center"
></div>
Educational pop-up
Add a placeholder element with the class sequra-educational-popup and a product attribute for the seQura product you want to promote. You can add multiple educational pop-ups. Optionally configure amount and campaign. The library renders a hidden pop-up and adds a click event listener to open it.
Parameters
| Key | Mandatory | Description |
|---|---|---|
| class | Yes | Must be sequra-educational-popup |
| product | Yes | seQura product that you want to promote. |
| amount | No | Amount of the purchase or product that you want to display the pop-up. Must be in cents, for instance 15,00 € is represented as 1500. |
| campaign | No | seQura campaign that you want to promote. Mandatory for pp5 product. |
Example
<span
class="sequra-educational-popup"
data-amount="15000"
data-product="pp3"
></span>
<span
class="sequra-educational-popup"
data-amount="1500"
data-product="i1"
></span>3. Updating pricing
When prices change, refresh the components by calling Sequra.refreshComponents() after updating the amount attributes.
Since seQura's JavaScript library loads asynchronously, wrap static calls to
refreshComponentsinSequra.onLoad:
Sequra.onLoad(function () {
Sequra.refreshComponents();
});Updated 20 days ago