Prompt & Bell settings
Extended API for custom permission prompt call
New API for registerUserForPush
Opt-in (pre-subscription window) is configured in our service by the following parameters.
There are three of them at the top level:
brandingEnabled(does not change)
desktopProps
mobileProps
Within each, there are settings for positioning, color, opt-in type, and text.
It is possible to set the following types of opt-in:
- MODAL
- TOAST
- BELL
- NATIVE
The New API allows you to select a single item, or several and override them.
Example:
Gravitec.push([
"registerUserForPush",
console.log,
{ mobileProps: { type: "MODAL" }, desktopProps: { type: "MODAL" } }
]);
// The code will set the opt-in type to desktop and mobile in MODAL
Gravitec.push([
"registerUserForPush",
null,
{
desktopProps: {
subscTexts: [
{ lang: "default", value: "Overrided text for subscription prompt" }
]
}
}
]);
// The code will set the main text to the desktop opt-in.
If you need to overwrite several languages, you need to pass the whole new array.
Gravitec.push([
"registerUserForPush",
null,
{
desktopProps: {
subscTexts: [
{
lang: "default",
value: "Overrided text for subscription prompt"
},
{ lang: "en", value: "Special text for english version" },
{ lang: "ru", value: "Текст на русском" },
{ lang: "ua", value: "Текст для української версії" }
]
}
}
]);
Gravitec.push([
"registerUserForPush",
null,
{
desktopProps: {
subscTexts: [
{ lang: "en", value: "Overrided text for subscription prompt" }
],
allowTexts: [{ lang: "en", value: "Over allow" }],
blockTexts: [{ lang: "en", value: "Over block" }]
}
}
]);
// The code will set all texts for the desktop opt-in
To control opt-in call after blocking, there is a special parameter ignoreBlockedCookie, which is true by default for the registerUserForPush manual call. It ignores the cookie variable that is set after the visitor blocks on the opt-in. This variable and does not allow the subscription to be shown in the browser session.
Calling registerUserForPush manually will, by default, always show the opt-in. The cookie variable will be deleted.
The ignoreBlockedCookie parameter can be overwritten:
Gravitec.push([
"registerUserForPush",
null,
{
ignoreBlockedCookie: false,
desktopProps: {
subscTexts: [
{ lang: "default", value: "Overrided text for subscription prompt" }
]
}
}
]);
Permission Prompt
Permission Prompt
When opening a website that has been integrated with the Gravitec service, visitors have the opportunity to subscribe to push notifications. Subscription is done through the subscription window, the appearance of which can be configured.
Subscription window configuration settings are required::
-Click Prompt & Bell in the side menu of the site;
-Select the Permission Prompt tab.
The subscription window settings page has the following appearance:
To customize the subscription window, you should fill in the following parameters and fields:
- Select the needed settings tab.
- Platform - a switch that allows you to select settings for each platform (Desktop and Mobile)
- Appearance - a switch that allows you to choose the form and type of the subscription window. By default - Toast.
The native subscription window is not available anymore, if this type was specified in the settings, you need to change it.
4. Location - a switch that allows you to select a subscription window location (top/bottom, left/right corner of the screen or center);
5. Show - three events to display the subscription window:
- Delay, the parameter of time of stay on the site, after which the subscription window will be shown;
- Scroll, the page scrolling parameter in percentage, at reaching which the subscription window will be shown;
- Pages view, the number of pages viewed during one session on the site, after which the subscription will be shown;
It is necessary to take into account that the countdown is after all the scripts of the site will be downloaded;
6. Button Color, Request Text Color - a text field in which you can enter the code of color, or select from a palette.
7. Subscription prompt translation configuration - multi-language setup of the subscription window.
To add a new language for the subscription window it is necessary:
-Click the Edit button (pencil) and in the pop-up window select the necessary languages;
-Set the values for the Allow Button, Discard Button, and Text message;
-Save.
The owner (Administrator) sets the default language for the site in html and sets the default text value in the subscription window through the service. The service also defines the browser language of the subscriber when entering the site. If there are values for this language in the settings, the subscription window is displayed on it, if not - the default value.
8. Allow Button, Discard Button, and Text message - text fields. Fill in the default value or for several languages, and visitors to the site will see this text.
9. Block Preview. Visual view of the subscription window taking into account parameters 2-8.
10. Save button block. It is possible to save the entered data, or to undo changes.
The subscription window for the mobile platform is filled out separately. If no changes are made, the subscription window will have default values.
If there is some unsaved data when switching to another tab of subscription settings and widgets, confirm-popup will be displayed. The user will have an opportunity to apply or reset the corrections made.
For Free tariff owners, branding of the service will be displayed on the subscription window.
Block override(+re-engagement)
Block override (+re-engagement)
Gravitec service clients have access to an unblock subscription widget. The configuration of this widget-bell allows subscribers:
- Get tips on how to unblock a subscription;
- Configure conditions for subscription window to be displayed again.
Widget deactivation/activation is available only for Business tariff.
To configure the widget you need:
-Select the Prompt & Bell item in the side menu;
-Go to Block override.
The tab has the following appearance:
To configure this widget, you must set the following parameters:
- Unblock subscription - checkbox, which activates and deactivates the widget;
If you deactivate the widget, the preview mode is not available.
2. Main color - a text field in which you can enter the color code, or select from an existing palette.;
3. Bell position - a drop-down list. Allows you to specify on what side the widget will be displayed;
4. Preview - a visual representation of the widget, considering the selected color;
5. Preview on your site - a visual representation of the widget, considering its color and location.;
There are two options for choosing the condition of re-opening the subscription window:
6. Through a certain number of read links on the site;
Page refreshing is also considered as a link.
7. After a certain number of days/hours after a previous click on the Block button in the subscription window..
The time of reopening the subscription window is fixed in a cookie. Once you close your browser, the cookie is not deleted, and when you re-open the site, the time counter goes on.
8. Save button block. It is possible to save changes or undo them.
If there is some unsaved data when switching to another tab of subscription settings and widgets, confirm-popup will be displayed. The user will have an opportunity to apply or reset the entered corrections..
Bell Configurator
Bell Configurator
Service Gravitec.net allows you to configure the appearance and functionality of the widget bell. This widget allows subscribers to view previously received, unread push campaigns. Also the bell allows subscribers to personalize the preferences of content and get only interesting information, increasing loyalty to the site.
For the beginning of widget settings you should open the Prompt & Bell item in the side menu of the site, and go to the Bell tab.
As long as the bell functions are not activated, it remains inactive and is not displayed to subscribers.
To begin with, you need to determine how this widget will look like for subscribers. To do this, you need to set the following parameters:
- Main color - If you know exactly the code of the desired color, you can specify it in the text field. Clicking on a color opens a palette, where you can choose the color yourself.
The selected color is immediately displayed in the preview block.
Branding of the service will be displayed for Free tariff owners.
If unblock bell functionality was activated earlier, please note that these are different widgets and their colors may be different.
2. The position of the bell - a drop-down list. The bell can be placed in the left or right bottom corner.
Bell Functions
- Push inbox
This feature allows you to increase the number of crossings, as subscribers can open previously unread notifications. When you activate the function in the Preview on your website block, a widget is displayed, considering the settings of color and position..
The history of push notifications opens when you click on a bell and has the following appearance and elements:
You can close the history by clicking on the corresponding X button.
2. Notification configurator
Allows subscribers to receive notifications that meet their interests. For configuration you need to:
-Activate the Notification configurator function;
-Fill in the Title field. In the field you can specify that you can select interests;
-Fill in the Text field. You can specify additional information in this field;
-Default interest. Category of content to be received by subscribers who have not specified interests.
-Tag. Allows you to bind a tag to a certain interest;
-New item. Adds a new value to the list of interests;
-Navigation buttons. Allows you to arrange interests in the necessary order;
-Remove button.
Entered values are available in the preview.
If several bell functions are activated, they are displayed as separate tabs.
After making changes, you can save or undo them.
If there is some unsaved data when switching to another tab of subscription settings and widgets, confirm-popup will be displayed. The user will have an opportunity to apply or reset the corrections made.