Frequently asked questions
1. How can I configure push notifications on my site?
Add your site to the control panel and choose the platform "For website" -> "Chrome". Then follow the instructions that are given during the registration process. instructions for setting up Gravitec Web Push on your site can also be rather helpful.
2. I already use push notifications from Gravitec on the one of my websites. How can I register another one in the control panel?
Open control panel, find and click "Add website", in the main dashboard. After that, follow the instructions that are given during the installation process.
3. I activated my site in Gravitec, made some changes and the integration disappeared after that. How can I get the code for installing push notifications on my site again?
Open the "Settings" menu for your site and go to "Integration" tab. You can copy the code for integrating Gravitec with your site from here.
4. Can I send push notifications directly from my website instead of using the control panel?
Yes, it’s possible to send push notifications from your own server using our API. Here is the documentation for developers: https://docs.gravitec.net/hc/en-us/articles/360001415573-Send-Push-Notification-V3
5. How can I send personal notifications to individual subscribers?
Give unique names (aliases) to your subscribers. Usernames, phone numbers or emails can be used for this purpose.
Send unique messages to unique users using their aliases. Use our API for setting aliases for users. Here is the documentation for developers: https://docs.gravitec.net/hc/ru/articles/208958285-Website-SDK-API
6. How can I group and target certain subscribers?
You can create subscriber groups using special tags. Use these tags for segmenting and grouping your subscribers. You can use as many tags as you want. Use our API for setting tags for users. Here is the documentation for developers: https://docs.gravitec.net/hc/ru/articles/208958285-Website-SDK-API
7. I have more questions. Where can I get answers?
Feel free to ask us: support@gravitec.net
We will surely help you with your issue!
Create push campaign
The main functionality of the service is the creation and sending of campaigns. It is possible to create and send them manually, as well as to send them automatically. If you need to send a single campaign, you need to open the Create campaign in the side menu. The campaign creation page looks as follows::
- Fast mode switch - allows you to fill in the data for the campaign in 1 click. For this purpose it is necessary to activate the switch and fill in the URL field for link redirection (the link to which the push will be redirected when clicking on the push). When you click on the Autofill button, the title, text and icon of the push will be substituted from the URL. You can see the result of autocomplete fields in the Notification contents block (2). If the contents of the fields fit, the campaign can be sent immediately.
If the user wants to fill out the campaign content himself, he should fill out the data in the Notification contents block (2)
- Notification header is a text field. It has a length limit. It is possible to add an emoji;
- Notification text - a text field. It has a length limit, it is possible to add an emoji;
- Destination URL is a text field that accepts only links as input. When you open the push it will redirect to the specified link;
- Autofill button - Quick mode functionality (1);
- UTM is a switcher that activates a specialized parameter in the URL that marketers use to track the resources from which traffic is passed;
When the switcher is activated, an additional optional field Campaign name is displayed.
After filling the content, you can see an approximate view of the campaign for different browsers, operating systems in the Preview block (3) . Also in this block it is possible to set an icon for the push. There are two ways to do this:
- When you add a destination URL, images are parsed from the site. It is possible to select an image from the site;
It is possible to crop the selected image.
- Change icon - download the image on your computer through Explorer . The uploaded image can be cropped (trimmed);
Campaigns in terms of time are scheduled and instant. For instant campaigns, you do not need to change the fields in the Scheduled campaign box: (4). If the campaign is to happen in the future, it is necessary to fill the following parameters:
-
Select a date from the calendar that opens;
- Specify time - a controller that allows you to set the time to the exact minute. It has a 24-hour format;
- Select a time zone - searchable drop-down list;
It is not possible to schedule a campaign sending for a time and date (considering the time zone) that is in the past.
Depending on the selected time zone displays information on whether it has daylight saving time or not.
или
If you click Cancel, you can reset all settings of the scheduled campaign, and the campaign becomes immediate.
If a scheduled campaign is created, the Send Campaign(9) button changes to Schedule Campaign.
There are also additional campaign time parameters (5):
- Campaign Category field is a text field. By specifying a campaign theme, the subscribers who clicked on the theme will be assigned the appropriate tags; (If not specified when adding the UTM);
- TTL - setting the parameters of the campaign sending time, during which the subscriber can receive push campaign;
- Slow Send switcher. The service allows you to do the campaign in small parts every 5 minutes for a specified interval.
The campaign can also have additional content. Its settings are available in the Rich Notification(6). Push can contain up to two buttons, which also have destination links and a big image.
The first button is the switcher that activates the button display. When activated, the fields of the button settings become available:
Button name is a text field.
Button icon - drop-down list with emoji;
Button to remove the icon;
Destination URL is a text field. Clicking the button in the notification will take you to the specified link;
UTM is a switcher that activates a specialized parameter in the URL that marketers use to track the resources from which traffic is passed;
Настройка второй кнопки происходит также.
Clicking on Add Big Image opens an explorer, through which you can select an image from your local device. The uploaded image can be cropped (trimmed).
Example of filled fields.
Button settings and big image settings are also available in the preview mode.
Without filling in the targeting options, the campaign will be sent to all subscribers. If you want to limit the campaign to specific groups of subscribers, use the Targeting block (7).
Фильтрация подписчиков происходит по следующим параметрам:
Targeting by tags;
Aliases;
Browsers;
Countries;
Cities;
OS;
Language.
After you set the filters, a recalculation button is displayed next to the Total targeted subscribers in the campaign field. Clicking the button will display the actual number of subscribers that the campaign will go to..
It is also possible to send a campaign to a segment. You can select an existing segment or create a new one.
After filling in all the required fields and parameters, you can see how the push will be displayed to the end subscribers, but without sending. To do this, click on the Test notification button (8).
If all the data and appearance of the push are correct, you must click Send Campaign (for Instant) or Schedule Campaign (for Scheduled) to send. If the user did not fill in any required field, an alert will be displayed when the user attempts to send the push.
When a campaign is sent successfully, success-popup is displayed. In this window you can create another campaign or Go to Campaign History for detailed statistics.
If a user has created a scheduled campaign, he has the ability to cancel or edit it. To do this, it is necessary to:
- Go to the Campaign history via success-popup or the side menu item.
- Find a specific campaign of your interest;
- Click on her record;
- In the detail page's header select the required operation.
Clicking the Edit Campaign button opens the edit page, which has the same appearance as the campaign creation page. To cancel, click Cancel Campaign and confirm the operation in the popup window.
If a user has copied a campaign for the same site and wants to submit it, a duplicate check is triggered.
How to integrate push notifications on the site
Manual push notification integration on your site:
- Register at https://push.gravitec.net/register
- Add your websites to your account
3. The integration code with our service is installed on your site.
4. For HTTPS resources, install the SDK files. In the personal account in the site settings, you need to download the SDK files and place them in the root folder of the site, so that they can be accessed via links: https://sitename.com/push-worker.js, https://sitename.com/manifest.json.
The basic principle of the technology is that the base is formed solely from subscribers who have personally confirmed their desire to receive notifications. You can segment subscribers by the characteristics you need (gender, age, geography, interests, etc.) both during the collection process and later.
Learn more about segmentation here: https://docs.gravitec.net/hc/ru/articles/208958285-Website-SDK-API.
Aliases for personal communication with subscribers
An alias is a personal identifier. This is a marker that allows you to send personalized offers, and trigger notifications. How are aliases assigned to subscribers? When a push subscriber visits the website and logs in there, their personal identifier from the website will be stored in the push system. It can be their email address, login, token, etc. After that, the subscriber can be identified and you can send them push notifications individually.
A subscriber is assigned one alias, but can also have many tags.
Using REST API, you can perform the automated distribution of transactional messages (payment reminders, order confirmations, etc.).
Integration with service on the Tilda website
Website constructors do not allow the placement of files in the root folder of the site. The technology of push notifications requires the installation of files SDK (push-worker.js and manifest.json) in the root of the site.
It is possible to integrate your site on tilda with our service on the principle of http sites.
Initially, the push technology was created by Google for https sites. To use it on http sites, our service generates a subdomain of the type https://sitename.gravitec.net and subscription is performed in 2 clicks: once on the main domain (widget), and the second time in the subdomain of Gravitec.
For this purpose you need:
1. Register an account by clicking the link - https://push.gravitec.net/register.
2. When entering the account, add a site with your protocol(http or https) by selecting WiX/TILDA type of integration - http://joxi.ru/D2Pow0qfJ8x6Vm.
3. Copy the generated subscription script for the added site.
Here is an example of how you can integrate from a tilda by installing a subscription script using these examples - http://help.tilda.ws/tips/javascript.
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.
Push history
Push campagin history
The user is able to view the data and statuses of all types of campaigns sent. It is also possible to see scheduled manual and automatic campaigns. To do this, go to the side menu item Campaign History.
The page has:
1. Filter panel
Show scheduled automations - checkbox to activate the display of automatic campaigns to be sent during the day;
Select period - the calendar that allows you to set the reporting period;
Select type - drop-down list with all types of campaigns, with multiple choices;
- Simple message;
- Transactional push;
- Push Digest;
- RSS automation;
- Drip campaigns;
- Tweet to push.
Reset button - resets the set reporting parameters.
2. A data table with the following fields:
- Icon - an image of the campaign;
- Text - header and text of the notification;
- Date and time - time when the campaign was sent (considering the time zone settings)
- Sent - the total number of the subscribers in current campaign;
- Delivered - the number of delivered notifications and the percentage in relation to the total number subscribers in current campaign;
- Seen - the number of notifications that were shown in the browsers of subscribers, i.e. viewed by recipients;
- Opened - the number of open notifications and the percentage in relation to the total number of seen;
- TTL - determines how long the system will monitor a subscriber's device status so that a push notification can be delivered;
- Type - campaign type icon.
The table contains data on the following types of campaigns:
- Scheduled automatic campaigns in the next day;
- Already sent campaigns;
- Scheduled manual campaigns;
If the campaign did not send, you can see the reason and status in the history:
- The limit of automatic sending for Free tariff is exceeded;
- Not enough campaigns to form a digest;
If you click on the interesting campaign, you will be taken to the Push Campaign Info page;
On the push campaign info page, the user can view detailed campaign statistics and copy the push to another site.
Campaign History tab also allows you to export a report of campaigns. To do this, you must:
1. Click Export Campaign stats.
2. In the modal that opens, set the parameters:
- Which sites to include in the report - a drop-down list with all of the user's sites. It is possible to select all of them, as well as to use the search on the list;
- Start Date and End Date - the calendar that sets the reporting period;
The end date cannot be less than the start date, but can equal it (if you need to make export only for 1 day)
3. Click the Export button.
Profile tab
Profile tab
On this tab the user has the option to:
- Enter, modify or delete personal data, industry information and position within the company;
- Add or delete contacts of employees who are responsible for payments;
- Change login and password to enter the service;
The tab has the following elements:
1. Tab Switch Panel;
2. Firstname, lastname - text field;
3. Phone - text field;
4. Skype - text field;
5. Industry - dropdown list;
6. Position - dropdown list;
7. Additional information - a text field in which comments can be entered or data can be specified if they were not in the list Industry and Position;
8. Block for changing login and password;
9. Invoice details form - сompany information that is used for downloading the payment receipt.
10. Contact for billing - text field. Accepts only email values;
11. Contact for receiving reports - text field. Accepts only email values;
12. Update - if you have made any changes on the page, they will be saved when you click the button..
Adding user information
To update your profile information, you need:
-Enter data in fields 2 to 7.
-Click Update button.
Changes are saved and displayed in the profile.
Adding billing information
The administrator of the service can specify the contacts who are responsible for payments in the company. For this purpose, you need to:
-Enter the required email into fields 10;
-Press the Add(+) button.
After adding the email is displayed above the field.
You can add up to five emails for each of your contacts.
Adding reporting information
The administrator of the service may specify the contacts who are responsible for the analysis of the service usage. For this purpose, it is necessary:
-Enter the required email into fields 11;
-Press the Add(+) button.
After adding the email is displayed above the field.
You can add up to five emails for each of your contacts.
Change the user login
User's Email is at the same time a login to the service. The user has the ability to change it.
The block for changing the login/password has the following elements:
- Email - current value of user's email. (Can not be changed manually, by analogy with the field firstname, lastname);
- Password - current value of the password (in encrypted form);
- Change email - clicking on the button will open a form for changing email.;
- Change password - clicking on the button opens a password change form;
To change your email you need:
- Click the Change email button (point 3 above);
- In the opening form, fill in the fields:
-New email address - new email, to which the service account will be linked.;
It is not possible to specify the email of an existing user.
-Confirm your password - enter a current password from the service.;
- Click the Change button;
After you send a request to change your email, you will be notified that you need to activate a new email address. A box informing you about the request status is also displayed.
Activation email is sent to your current account email.
If you click the Cancel button, the request becomes cancelled and the e-mail with activation becomes inactive.
- Open the received letter and click the Confirm button.;
After confirming the change of email, the new value is displayed in the profile.
If a user created an account via WordPress plugin and did not activate it at the onboarding stage, the password field is not available on the profile page..
The first change of email is available without entering a password:
A confirmation letter for email change is sent to the new address. When you confirm your email, a password is also set.
Password change
To change the password it is needed to:
- Click Change Password icon;
- In the opening form, fill in the fields:
-Current password - enter current account password;
-New password - new password value;
The new password must not be the same as the old password, must be at least 8 characters long, contain numbers and Latin characters..
-Confirm New Password - Confirm New Password.
- Click Change button.
After you change your password, you will receive an email notifying you that your password has been changed. If the change of password was not initiated by you, you can reset it..
Team tab
Team tab
This Profile Settings tab allows you to add users and manage their rights and accesses to your account.
This tab is available only for users with the tariff plan Business. Clicking on the button Upgrade to Business opens the billing payment page.
When going to the tab, a table with the list of users is displayed.
The table has the following fields:
Name - User name;
Email - Email;
Status - one of the statuses: Awaiting activation, Active, Inactive;
Date activated - creation date of a new user;
Actions - activities available under the user account;
And also the button Team member.
Create a new user
To create a new user you need to:
- Click Team member button;
- In the form that opens, fill in the fields:
-
- Email - email that will be associated with the user's account;
- Name - name of the new user;
- Click Add button
New created user is displayed in the user list in status = awaiting activation. After confirming the email and setting the password, the user status changes to Active.
It is possible to resend a request to activate a new account.
Granting service permissions to new users
Created by the user you can give the permissions for all or separate sites. For this purpose you need::
- Click on the Edit button (1) in the list of interested users:
- In the list of sites(2) mark the sites to which permissions are to be granted;
- When the checkbox Select all sites(3) is activated, all sites will be selected;
- When the checkbox Access to all new sites(4) is activated, permissions will be granted automatically to all sites added later.
User deactivation
There is also a possibility to deactivate a user, i.e. to limit his access to the service. To do this, click the Deactivate button and confirm the action in the pop-up window.
When a user is deactivated, its status changes to Inactive.
It is also possible to reactivate an inactive user. To do this, just click the Activate button and confirm the action in the pop-up window. After activating a user, his status will be changed back to Active.
Access even for active users is possible only if the administrator of the service is on the Business tariff.
Added users can not change their email, only password.
RSS to Push
RSS to Push
Gravitec.net service allows you to send RSS feeds. When new content is added to the site, push campaigns are sent to subscribers.
To start setting up automated campaigns from RSS it is needed:
- Choose Automations in the side menu of the site;
- Click the Congifure button in the RSS to Push block.
The RSS feeds list is displayed on the RSS feed settings page. To add a new entry, click the Add new RSS feed button.
After you click on the button, a pop-up window will open. You should fill in the following fields:
- Name - text field;
- RSS URL - a text field, the input accepts links to the rss feed.;
- Search order for push campaign data - using the navigation buttons you can change the priority of content sources.
- When you click on the help button you can see examples of custom meta push tags.
5. Save - if you click the button, all changes are saved;
6. Cancel - the pop-up window of the notification content settings is closed, no data is saved.
After saving a new RSS feed, the pop-up window closes and the entries are added to the list in the status New.
Next, you need to configure the sending parameters. Clicking the RSS feed you are interested in or the Edit button opens the settings page. For each RSS-channel you can specify the type of Breaking news or Top news.
Setting up Breaking news
The list of breaking news is taken from your RSS feed, and as soon as there is new content corresponding to the settings of the specified categories, a push-campaing is sent (according to the set schedule and limits). To set up, you need to fill in the following fields:
- Breaking news - default settings tab;
- Selected period - slider with the ability to set the time period in which the sending push campaigns will take place;
- The limit of campaigns, per day - a slider that allows you to set a limit on the number of campaigns;
For Free tariff it is available to send no more than 5 campaigns per day..
Campaigns that have not recovered through exceeding the limit are highlighted in red and have the appropriate status in the Campaing History.
4. Select a time zone for sending campaigns - a dropdown list with a search option;
5. UTM - a switch that activates a specialized parameter in the URL used by marketers to track resources from which traffic is transferred;
When the switch is activated, an additional optional UTM Campaign Name field is displayed.
6. Information on how to automatically send campaigns based on RSS feeds and a link to the service's blog;
7. Default icon upload block for automatic campaigns;
8. Send to - campaign sending parameters for certain subscribers. Sending campaigns to:
-All - all subscribers of the current website.;
-Categories - only the specified categories of publications in rss feed are sent;
-Segments - sending is performed only for the specified segments of subscribers. There is an option to specify additional restrictions by categories and number of campaigns.
9. Search order for push campaign data - using the navigation buttons you can change the priority of content sources.
10. Add Buttons - additional settings, which allow you to set up buttons displaying in the push that a subscriber receives. Clicking the buttons will take you to the specified link.
11. Save - when the button is pressed, all changes are saved;
12. Save and activate - when the button is pressed, all changes are saved, RSS feed status becomes Active;
13. Cancel - the settings pop-up window is closed, data are not saved.
TOP News Setting
Sending Top news is based on published articles in rss feed. The service defines those publications that have the largest number of views in the specified period of time. From these publications and will be formed sending of top news. (Subscribers receive a push campaign which contains the most popular news item for a calculated interval.)
To configure the settings, go to the Top News tab. The list of settings is the same as for Breaking News, except for the option Send to.
Top news are sent to the entire database of subscribers.
After the sending options are set up, there is an option:
-Pause/Activate automated campaigns;
-Edit settings.
After the settings and activation of sending, you can see the summary information about them. When you click on the History button, you will be redirected to the Campaign History.
Also, the time when the top news campaigns will be sent during the day displays in the Campaign History when toolbar 1 switched.
Drip campaigns
Drip campaigns
Drip campaigns allow you to create multiple push campaigns which will be sent to all new subscribers according to a set schedule.
To access the Drip campaigns page, you must:
- Choose Automations in the side menu of the site;
- Press the Configure button in the Drip campaigns block.
The Drip campaigns Settings page has the following items:
-A table of statistics with metrics (number + percentage):
- Sent
- Delivered
- Seen
- Opened
- Closed
-Information block with general information about Drip campaigns and a link to the service blog..
-Button New drip campaign.
Create new drip campaign
Creation of a drip campaign can be divided into 2 steps: sending settings and adding campaigns.
Sending Settings
- Click button New drip campaign;
- On the opened page, specify the following parameters:
- Name - required text field. Name of the drip campaigns;
- Start date - calendar, required field. Day, starting from which the chain of notifications will be started.;
3. End date - calendar. The end day of the chain of notifications will be ended. This parameter is not required to be filled in;
4. Default campaign interval (days): 1 - slider. Defines the interval between sending the next campaign.
5. Send the first campaign at - selector, which allows you to specify the start time of the first campaign.
- After successfully filling in the drip campaign parameters press the Next button(6).
In case you change your mind, click Discard changes(7), but then the entered data will be lost.
Adding campaigns
-In the appeared field Paste URL add campaign URL;
-Click Add to Campaign button;
-Fill in the required fields and parameters in the opened Notification Content window:
1.Tab Content;
2. Title - text field, it is possible to add an emoji;
3. Text - text field, it is possible to add an emoji;
4. UTM - a switcher that activates a specialized parameter in the URL used by marketers to track resources from which traffic is forwarded.
5. Utm campaign (not required) - text field which is displayed if the UTM switcher is active;
6. Upload icon - allows you to upload the image from your local computer. The changes made are immediately displayed in the Preview.
7. Select a time zone for the campaign - a searchable drop-down list.
8. Daylight saving time - checkbox, which takes into account the presence of summer time for a given time zone.;
9. Preview - allows the user to see the appearance of push for different browsers and operating systems;
10. Additional options - a tab with button settings and a big picture for push notification;
11. Add big image - enables you to upload an image from a local computer. The changes made are immediately displayed in the Preview;
12. First button is a switcher, when activated there is a possibility to add a button to the push notifications.;
13. The Title of the button is a text field, it is possible to insert emoji. The changes you have made are immediately shown in the Preview;
14. Icon button is a dropdown list, it is possible to add emoji. Clicking the Trash button deletes the icon;
15. Button link is a text field, accepts only links to the input. When you click on the button in the push notification, it will redirect the subscriber to the specified URL;
16. UTM - a switcher that activates a specialized parameter in the URL used by marketers to track resources from which traffic is forwarded;
17. Second button is a switcher that activates the settings block for the second button;
18. The settings block for the second button is similar to the fields and elements from 13-16.;
19. Preview - allows the user to see the appearance of push for different browsers and operating systems;
20. Save - when the button is pressed, all changes are saved.;
21. Cancel - the pop-up window of the notification content settings is closed, no data is saved..
After adding a campaign, the notification is displayed in the campaign list. You can do the following with the campaigns:
1. Delete notification;
2. Edit;
3. Change the notification order in the list.
Drip campaign while saving can be immediately activated.
The service allows you to create several drip campaigns, edit them, activate/deactivate and view information about completed drip campaigns.
When you click on the History button, you will be redirected to the Campaing History. It allows you to see the planned campaigns for the next 24 hours.
On the Free tariff plan, the system sends no more than 5 automated push campaigns per day. To send more than 5 automated campaigns per day, you need upgrade to Business tariff.
Push Digest
Push-digest
Gravitec.net service allows to automate generation and distribution of push-digests for subscribers. The digest contains the most popular/viewed publications (news) of the day and/or week.
- Digest activation
To activate the digests, if this was not done when you created your account, you need to:
-Select the Automations item of the site side menu and press the Configure button in the Push-Digest block;
After clicking the Configure button, a page with a list of digests will open. The page looks like a table, which has the following fields and elements:
- FREQUENCY - digest sending frequency. There are two types of distribution: daily and weekly;
- DAY- shows on which day/days of the week the sending takes place;
- TIME - shows at what time the sending starts;
- NUM. OF ITEMS - number of top news that will be added to the digest;
- PERIOD - period of time during which the digest will be formed;
- STATUS - displays the status of this type of digest. Existing digest statuses: Ready to create, Active, Inactive;
- + - button Create digest;
- Preview test digest - allows the user to see which view the push digest will have.
You can open this push and see the digest. If there is not enough news, you will see the blank news.
2. Digest creation
When you press the button +(Create digest) opens the digest creation page. The page has the following form:
The following options, fields and elements are available on the Digest creation page:
- Digest type - two types of digest are available: Simple(from push-campaigns) and Smart digest:
Simple(from push-campaigns) - This digest is generated on the basis of push- campaigns. The System chooses all push-campaigns for a specified period of time, determines those that were most open and forms a digest from them.
Smart digest - It differs from the first type in that it works only if the site has an active RSS feed and may not include articles that the subscriber has already read(Step 8 in the picture above).
2. Digest day(s) - multiselector, allows you to specify the days on which the digests will be distributed.
There is no way to select more than one day for the weekly digest.
3. Select all - check box, on activation of which all days of the week are selected.
This checkbox is not available for the weekly digest.
4. Digest Time - a selector that allows you to specify the time when the digest starts to be distributed.
5. Select a time zone for sending out - a searchable dropdown list. It is taken into account for the Digest Time parameter.
6. News limit in digest - a dropdown list in which you can select the number of top news items from which the digest will be generated. Available values are 6, 8 and 10 top news items.
If there are less news/publications than in the settings, the digest will not be sent.
News/publications must be unique.
7. Article UTM -a switcher that activates a specialized parameter in the URL used by marketers to track campaigns. Default parameter values are
utm_source=”gravitec” and utm_medium=”push”.
8. Checkbox - may not include articles that the subscriber has already read. This checkbox is available only for Smart digest.
9. Title - text field, it is possible to insert an emoji. The changes you have made are immediately displayed in the Preview.
10. Text - text field, it is possible to insert an emoji. The changes you have made are immediately displayed in the Preview.
11. Push UTM - a switcher that activates a specialized parameter in the URL used by marketers to track campaigns. Default parameter values are
utm_source=”gravitec” and utm_medium=”push”
12. Upload icon - allows you to upload the image from your local computer as well. The changes made are immediately displayed on the Preview.
13. Preview - allows the user to see the appearance of push for different browsers and operating systems.
14. Preview test digest - allows the user to see which view the push digest will have.
15. Notes - more information about digest types.
16. Save button block. There are several options for saving the entered data:
- Save - save all changes made, but without activating the digest.;
- Save and activate - save all made changes and digest activation;
- Back - returns to the list of digests, no changes are saved..
After entering and saving all data, the digest creation page is closed and digest parameters are displayed in the table.
3. Viewing and editing digests
After the digest is created, its status changes, new actions are available.
- The status of the created digest can be: Active or Inactive. If the digest is disabled, no campaign will be sent.
- Edit button. Clicking on this opens the digest settings page where you can edit existing settings.
- Digest activation/deactivation toolbar.
After the push-digest is created, the Campaign History is available on the main Automations page.
Website SDK Overview
To get Gravitec Push Notifications running on your website, follow these two steps.
Requirements
W3C Web Push Notifications are currently supported by Chrome 50+, Opera 42, Firefox 44+, Safari 7.0+, Yandex 16.3+.
This includes Chrome for Windows, Mac OSX, Linux, Chrome OS and Android. Chrome for iOS is not yet supported by Google.
- Follow our Website SDK HTTPS Installation guide if your website uses an HTTPS connection.
- Or follow our Website SDK HTTP Installation guide if your website is Non-HTTPS. (Uses an HTTP connection).
Website SDK HTTPS Installation
Gravitec SDK Installation for Chrome websites (desktop + mobile)
Requirements
W3C Web Push Notifications are currently only supported by Chrome 42+
- Includes Chrome for Windows, Mac OS X, Linux, Chrome OS, and Android. Chrome for iOS is not yet supported.
HTTP and HTTPS
If some of your pages are served via HTTP instead of HTTPS, then you will need to follow our HTTP Installation Guide instead.
If possible, we encourage you to migrate all your pages to HTTPS first, and then continue using this guide.
1. Download the SDK
1.1 Download the latest version of Gravitec Chrome Web SDK after the registration of your site in the Gravitec Dashboard.
1.2 Copy push-worker.js and manifest.json from gravitec_sdk_ directory and paste it into the top-level directory (root folder) of your site.
2. Include Required Files
2.1 Link https://cdn.gravitec.net/storage/APP_KEY/client.js and manifest.json to each page of your website by adding some code between <head> and </head> tags. Update APP_KEY with your Gravitec AppId. Most likely, you will have to do it just once in the file, which helps to generate a layout of the site. The resulting HTML should look like this:
3. Customize Gravitec (Optional)
3.1 Your custom button or event.
Call Gravitec.push(["init"]) from a javascript file that is included in every page. Create or use your button and update YOUR_CUSTOM_BUTTON_ID with your button id.
The user will see a window asking for permission to receive notifications from your site immediately after clicking on the button.
You can create your own logic and call registerPush() method.
Important
You must keep all the SDK files together. https://cdn.gravitec.net/storage/APP_KEY/client.js, push-worker.js and manifest.json must be placed in the root directory of your site.
Link to https://cdn.gravitec.net/storage/APP_KEY/client.js must be added between <head> and </head> tags for every page on your website. Linking files this way allows us to be sure that: - any page can subscribe to notifications - any page can be opened from a notification (if set) - changes to the Google Registration id can be updated - session count can be accurately calculated.
That's It!
That’s it for now - the setup is complete. See our Web SDK API for more functions.
var Gravitec = Gravitec || [];
Gravitec.push(["init", {"autoRegister":false}]);
window.onload = function(){
//Replace YOUR_CUSTOM_BUTTON_ID with your button id
document.getElementById("YOUR_CUSTOM_BUTTON_ID").onclick = registerPush;
function registerPush() {
Gravitec.push(["registerUserForPush", function(success){
if (success) {
//your custom action
}
}]);
}
}
Website SDK HTTP Installation
Gravitec SDK Installation for Chrome websites (desktop + mobile)
HTTP vs. HTTPS
This is the guide for using Google Chrome push notifications on websites that have some pages served via HTTP instead of HTTPS.
If you are sure that each page is served only via HTTPS, then you should follow Website SDK HTTPS Installation guide.
Requirements
W3C Web Push Notifications are currently only supported by Chrome 42+
- Includes Chrome for Windows, Mac OS X, Linux, Chrome OS and Android. Chrome for iOS is not yet supported by Google.
1. Include Required GravitecSDK.js
1.1 Include https://cdn.gravitec.net/storage/APP_KEY/client.js in the the <head> HTML tag of each of your website pages. Update APP_KEY with your Gravitec AppId. The best way is to add it to the code that generates the layout for each of your webpages. The resulting HTML should look like this:
<head>
<script src="https://cdn.gravitec.net/storage/c98ddb5b4e54032b1f012127a3c5aec3/client.js/" async></script>
</head>
2. Customize Gravitec (Optional)
2.1 Init with your custom button or event.
Call Gravitec.push(["init"]) from a javascript file that is included in every page. Create or use your button and update YOUR_CUSTOM_BUTTON_ID with your button id.
That's It!
That’s it for now - the setup is complete. See our Web SDK API for more functions.
var Gravitec = Gravitec || [];
Gravitec.push(["init", {"autoRegister":false}]);
window.onload = function() {
//Replace YOUR_CUSTOM_BUTTON_ID with your button id
document.getElementById("YOUR_CUSTOM_BUTTON_ID").onclick = registerPush;
function registerPush() {
Gravitec.push(["registerHttp");
}
}
Website SDK API
JavaScript Async
The example assumes that you have the following code placed defined before calling Gravitec functions.
Update APP_KEY with your Gravitec AppId.
<script src="https://cdn.gravitec.net/storage/APP_KEY/client.js" async></script>
<script>var Gravitec= Gravitec || [];</script>
List of Functions
init
This is the only required method that you need to call for setting up Gravitec to receive push notifications. Call it from each page of your site.
- Parameters
- JSON options
- Boolean autoRegister (Optional) - Automatically show browser prompt to accept notifications. You can pass in "false" to delay this pop-up and then call registerUserForPush to prompt them later.
- Boolean createButton (Optional) It creates a default button that generates a window for receipt of the notifications, which appears after clicking.
- String tooltipText (Optional, use only with createButton) - Default: "One click subscription to our newsletter!" Set the text that will be shown to users on a default button.
Example:
var Gravitec = Gravitec || [];
Gravitec.push(["init", {"autoRegister":false}]);
registerUserForPush
Call it when you want to prompt the user to accept push notifications. Only call if you set "false" in autoRegister: when called "init".
Example:
var Gravitec = Gravitec || [];
Gravitec.push(["registerUserForPush", callback]);
segmentation.addTag
The method tags a subscriber basing on on app event of your choice, so that later you will be able to create segments to target users with the tag. It is recommended to use addTags rather than addTag if you need to add more than one tag in one operation.
Parameters:
- string value - set this to addTag.
- string value - value to set – tag name.
- Call back - set here call back to be fired when tag was successfully added and response from our server has been returned.
- Call back - set here call back to be fired, when tag was not added or error.
When error is encountered, err object is returned:
{
error:true,
message: 'something went wrong'
}
Example 1:
First call back is called when tag has been successfully added, second call back is called if some error has occurred during a tag addition:
var Gravitec = Gravitec || [];
Gravitec.push([
"segmentation.addTag","Tag1",
function() {console.log("Tag has been added")},
function(err) console.log(err.message)
}])
Example 2:
Call back is called when tag has been successfully added:
var Gravitec = Gravitec || [];
Gravitec.push([
"segmentation.addTag", "Tag1",
function() {console.log("Tag has been added")
}])
Example 3:
Without call back functions:
var Gravitec = Gravitec || [];
Gravitec.push([
"segmentation.addTag", "Tag1"
])
segmentation.addTags
Add provided tag(s) to subscriber’s tags. Thus, a push segment based on these tags could be created.
Parameters:
- string value - set this to addTags.
- Array of strings - JSON array of string value(s) – tag(s) to add.
- Call back - set here call back to be fired when tag was successfully added and response from our server has been returned.
- Call back - set here call back to be fired when tag was not added or error occured
When error is encountered, err object is returned:
{
error:true,
message: 'something went wrong'
}
Example 1:
First call back is called if tags have been successfully added, second call back is called if error has occurred during tags addition:
var Gravitec = Gravitec || [];
Gravitec.push([
"segmentation.addTags", [“new”,”new1”,”new2”],
function() {console.log("Tags has been added")},
function(err){console.log(err.message)
}])
Example 2:
Call back is called if tags have been successfully added:
var Gravitec = Gravitec || [];
Gravitec.push([
"segmentation.addTags",[“new”,”new1”,”new2”],
function() {console.log("Tags has been added")
}])
Example 3:
Without call back functions:
var Gravitec = Gravitec || [];
Gravitec.push([
"segmentation.addTags", [“new”,”new1”,”new2”]
])
segmentation.setTags
Clear all existing user tags and set new tags for the user.
Parameters:
- string value - set this to setTags.
- Array of strings - JSON array of string value(s) – tag(s) to set.
- Call back - set here call back that to be fired when tag was successfully added and response from our server has been returned.
- Call back - set here call back to be fired when tag was not added or error occured.
When error is encountered, err object is returned:
{
error:true,
message: 'something went wrong'
}
Example 1:
First call back is called if tags have been successfully set, second call back is called if error has occurred during tags setting:
var Gravitec = Gravitec || [];
Gravitec.push([
"segmentation.setTags", ["value1", "value2"],
function() {console.log("Tags has been set")},
function(err){console.log(err.message)
}])
Example 2:
Call back is called if tags have been successfully set:
var Gravitec = Gravitec || [];
Gravitec.push([
"segmentation.setTags",["value1", "value2"],
function() {console.log("Tags has been set")
}])
Example 3:
Without call back functions:
var Gravitec = Gravitec || [];
Gravitec.push([
"segmentation.setTags", ["value1", "value2"]
])
segmentation.removeTag
The method deletes a provided tag that was previously set for a user with addTag, addTags or setTags. Use removeAllTags if you need to delete all user’s tags.
Parameters:
- string value - set this to removeTag.
- string value - tag name to be removed.
- Call back - set here call back that to be fired when tag was successfully added and response from our server has been returned.
- Call back - set here call back that to be fired, when tag was not added or error.
When error is encountered, err object is returned:
{
error:true,
message: 'something went wrong'
}
Example 1:
First call back is called if tag has been successfully removed, second call back is called if error has occurred during a tag removal:
var Gravitec = Gravitec || [];
Gravitec.push([
"segmentation.removeTag", "value",
function() {console.log("Tag has been removed")},
function(err){console.log(err.message)
}])
Example 2:
Call back is called if tag has been successfully removed:
var Gravitec = Gravitec || [];
Gravitec.push([
"segmentation.removeTag ","value",
function() {console.log("Tag has been removed")
}])
Example 3:
Without call back functions:
var Gravitec = Gravitec || [];
Gravitec.push([
"segmentation.removeTag ", "value"
])
segmentation.removeAllTags
The method deletes all user’s tags that were previously set for a user with addTag, addTags or setTags.
Parameters:
- string value - set this to removeAllTag.
- Call back - set here call back to be fired, when tag was successfully added and response from our server has been returned.
- Call back - set here call back to be fired, when tag was not added or error.
When error is encountered, err object is returned:
{
error: true,
message: 'something went wrong'
}
Example 1:
First call back is called if all tags have been successfully removed, second call back is called if error has occurred during tags removal:
var Gravitec = Gravitec || [];
Gravitec.push([
"segmentation.removeAllTags",
function() {console.log("All tags has been removed")},
function(err){console.log(err.message)
}])
Example 2:
Call back is called if all tags have been successfully removed:
var Gravitec = Gravitec || [];
Gravitec.push([
"segmentation.removeAllTags",
function() {console.log("All tags has been removed")
}])
Example 3:
Without call back functions:
var Gravitec = Gravitec || [];
Gravitec.push([
"segmentation.removeAllTags"
])
getTags
Returns list of tag objects, associated with a subscriber.
Code:
var Gravitec = Gravitec|| [];
Gravitec.push(["getTags", callback]);
Example:
This code prints an array of the subscriber’s tags.
Gravitec.push(['getTags', function(tags) {
var newArray = [];
tags.map((tag)=>newArray.push(tag));
console.log(newArray);
}])
segmentation.setAlias
Set an alias(user identifier) for subscriber to target the one.
Parameters:
- string value - set this to setAlias.
- string value - value to set – alias name.
- Call back - set here call back to be fired, when tag was successfully added and response from our server has been returned.
- Call back - set here call back to be fired, when tag was not added or error.
When error is encountered, err object is returned:
{
error:true,
message: 'something went wrong'
}
Example 1:
First call back is called if alias has been successfully set, second call back is called if some error has occurred during alias setting:
var Gravitec = Gravitec || [];
Gravitec.push([
"segmentation.setAlias", "value",
function() {console.log("Alias has been set")},
function(err){console.log(err.message)
}])
Example 2:
Call back is called if alias has been successfully set:
var Gravitec = Gravitec || [];
Gravitec.push([
"segmentation.setAlias","value",
function() {console.log("Alias has been set")
}])
Example 3:
Without call back functions:
var Gravitec = Gravitec || [];
Gravitec.push([
"segmentation.setAlias", "value"
])
getSubscriptionData
To get visitor’s subscription detail such as subscription status, REGid, permission status and browser use this method. The method returns a subscription object in a resolved promise.
Parameters:
- string value - set this to getSubscriptionData.
- Call back - set here call back to be fired, when subscription data have been successfully fetched, data object contains subscription details.
- Call back - set here call back to be fired, when an error occurred.
When error is encountered, err object is returned:
{
error:true,
message: 'something went wrong'
}
Example 1:
var Gravitec = Gravitec || [];
Gravitec.push([
"getSubscriptionData", function(data) {
console.log(data.permission);
console.log(data.subscription);
if(data.subscription) {
console.log(data.subscription.regID);
}
}, function(err) {
console.log(err.message);
}
])
afterSubscription
Callback that is called after the device is successfully registered with Gravitec. Return token.
Example:
var Gravitec = Gravitec || [];
Gravitec.push(["afterSubscription", function (token) {
console.log(token);
//Your action
}]);
subscriptionResult
The method fires a callback after visitor interacted with subscription prompt. Visitor can press Allow, Block or just close the prompt in all these cases the method returns a relevant data.
Parameters:
- string value - set this to subscriptionResult.
- Call back - set here call back to be fired, when visitor press Allow, Block or closed the prompt, data object contains subscription details.
- Call back - set here call back to be fired, when an error occurred.
When error is encountered, err object is returned:
{
error:true,
message: 'something went wrong'
}
Example 1:
var Gravitec = Gravitec || [];
Gravitec.push([
"subscriptionResult", function(data) {
console.log(data.permission);
console.log(data.subscription);
if(data.subscription) {
console.log(data.subscription.regID);
}
}, function(err){
console.log(err.message);
}
])
getSubscription
Lets you retrieve the Google Registration ID. Your handler is called after the device is successfully registered with Gravitec.
Example:
var Gravitec = Gravitec || [];
Gravitec.push(["getSubscription", function (subscriptionId) {
if (subscriptionId) {
console.log(subscriptionId);
}
}]);
isSubscribed
Shows if user give permission to send notifications. Return true or false.
Example:
var Gravitec = Gravitec || [];
Gravitec.push(["isSubscribed", function (success) {
console.log(success);
//Your action
}]);
Generating your own Push Notification Key
STEP 2: Generate push notification keys
2.1 At the bottom of the page, in the Web Configuration section, select "Generate key pair".
3.1 Copy the received key and send it to the Support specialist marked as Public Key
3.4 Copy the key you received and give it to Support specialist marked Private Key
Example: Private Key - O678UMYlpVhoaJcFLerHYc5N1g1fzffRU5poA4mhfC4I
As a result, it is necessary to pass the Public and Private Key to the Support specialist.
Example:
Public Key - BP7E0SP1S90AgpyBX-dTvEOfeXSSqnqLAKmHalqOrTYfIA_vK5EkEjGF0NyYUQG4Kpzs4-BVUCWXlYvEsCKyYBM
Private Key - O678UMYlpVhoaJcFLerHYc5N1g1fzfRU5poA4mhfC4I
Generating your own Safari Push Notification Certificate
1. Create Certificate Signing Request
1.1 Open Keychain Access on your Mac (it is located in Applications/Utilities) and choose the menu option Request a Certificate from a Certificate Authority….
1.2 Save Certificate
You should now see the following window (pic. 1).
Enter your email address here. Some people recommend using the same email address that you used to sign up for the iOS Developer Program, but it seems to accept any email address just fine.
Check Saved to disk and click Continue.
2.1 Press "plus" button on the Website Push IDs.
2.3 On the next pages press Register and the Done buttons.
2.6 Press "Choose File..", select the "certSigningRequest" file you saved in Step 1, open, and then press "Generate".
3.1 Open the website_aps_production.cer file you downloaded in the last step by double clicking on it in Finder.
3.2 After a few seconds the "Keychain Access" program should pop up. Select Login > Keys, then right click on your key in the list and select "Export"
3.3 Give name the .p12 file the same as sertificate ID (example: "web.net.0000001.gravitec"). You will have an option to protect the file with a password. Generating safari ID set the password: 1111
4. Send your p12 file to Gravitec support (support@gravitec.net)
Server API Overview
About API
Our API is a REST API, which supports HTTP error codes to indicate API errors and use basic HTTP authentication to authenticate user’s account. All requests body must be in JSON format, we do not support other formats. However, we’re open-minded team and we are opened for any suggestions on formats or API logic. Please, write us support@gravitec.net if you have got any suggestions or issues with the API.
In addition to the REST API we provide to our clients WEB SDK API, which is essentially a JavaScript API designed to manage your subscriber’s database. For example, this SDK provides functions for tagging and setting aliases to your subscribers. Those tags and aliases could be useful for marketing purposes, such as – segmentation of subscribers’ database by their behavior or by their preferences.
Authentication
Authenticate your account when using the API by including your APP KEY and APP SECRET keys in the request. You can find your APP keys in the Site Settings page.
Your APP key allows to send push messages to all your subscribers database, so be careful and keep them in secret!
Authentication to the APP is performed via HTTP Basic Auth:
- Provide your application key ("APP_KEY") as the basic AUTH username value
- Provide your application secret ("APP_SECRET") as the basic AUTH password value
- All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
Code example:
// via shell
// example APP_KEY = 1e26f7bb3f81e1ab789d3e20b9cf6325
// example APP_SECRET = 9bb59fcbff38b85647c421c65cca06ce
curl -X \
-u "1e26f7bb3f81e1ab789d3e20b9cf6325:9bb59fcbff38b85647c421c65cca06ce" \
-H "Content-Type: application/json" \
https://uapi.gravitec.net/api/v3/push
// or
curl -X \
-u "1e26f7bb3f81e1ab789d3e20b9cf6325:9bb59fcbff38b85647c421c65cca06ce" \
-H "Content-Type: application/json" \
https://uapi.gravitec.net/api/v3/push
Send Push Notification V3
Resources
Definition
Method: POST
Endpoint: https://uapi.gravitec.net/api/v3/alias
Request parameters:
- regId - subscriber’s token [Required, 1-255 symbols string]
- name - desired alias name [Required, 1-255 symbols string]
NOTE: All request parameters names and values are case-sensitive.
Request URL example:
https://uapi.gravitec.net/api/v3/alias?regId=someregid&name=newalias
200 OK
The alias was successfully added
400 Required String parameter "name" is not present
"name" parameter was not provided in request
400 Required String parameter "regId" is not present
"regId" parameter was not provided in request
422 Unprocessable Entity
No follower with regID provided was found
Body:
{
"httpStatus": "UNPROCESSABLE_ENTITY",
"error": "Incomplete by wrong param(s)!",
"errorDescription": "There is no follower with this regId!"
}
422 Unprocessable Entity
Provided alias name length was more than 255 symbols
Body:
{
"httpStatus": "UNPROCESSABLE_ENTITY",
"error": "Incomplete by wrong param(s)!",
"errorDescription": "Max alias length is 255!"
}
Definition
Method: POST
Endpoint: https://uapi.gravitec.net/api/v3/tag
Request parameters:
- regId - subscriber’s token [Required, 1-255 symbols string]
- name - desired tag name [Required, 1-255 symbols string]
NOTE: All request parameters names and values are case-sensitive.
NOTE: Tags saving method behaves with case sensitive values like:
First tag will be saved in exact case it provided, if another tag, which in case-insensitive comparison is the same one, provided, it will not be added as a new tag – the system considers it as the same as previous.
Request URL example:
https://uapi.gravitec.net/api/v3/tag?regId=someregid&name=tagname
200 OK
Tag was successfully added
400 Required String parameter "name" is not present
"name" parameter was not provided in request
400 Required String parameter "regId" is not present
"regId" parameter was not provided in request
422 Unprocessable Entity
No follower with regID provided was found
Body:
{
"httpStatus": "UNPROCESSABLE_ENTITY",
"error": "Incomplete by wrong param(s)!",
"errorDescription": "There is no follower with this regId!"
}
422 Unprocessable Entity
Provided tag name length was more than 255 symbols
Body:
{
"httpStatus": "UNPROCESSABLE_ENTITY",
"error": "Incomplete by wrong param(s)!",
"errorDescription": "Max alias length is 255!"
}
Definition
Method: DELETE
Endpoint: https://uapi.gravitec.net/api/v3/tag
Request parameters:
- regId - subscriber’s token [Required, 1-255 symbols string]
- name - desired tag name [Required, 1-255 symbols string]
NOTE: All request parameters names and values are case-sensitive.
Request URL example:
https://uapi.gravitec.net/api/v3/tag?regId=someregid&name=tagname
200 OK
Tag was successfully deleted
400 Required String parameter "name" is not present
"name" parameter was not provided in request
400 Required String parameter "regId" is not present
"regId" parameter was not provided in request
422 Unprocessable Entity
No follower with regID provided was found
Body:
{
"httpStatus": "UNPROCESSABLE_ENTITY",
"error": "Incomplete by wrong param(s)!",
"errorDescription": "There is no follower with this regId!"
}
422 Unprocessable Entity
Provided tag was not found for the subscriber with provided regId.
Body:
{
"httpStatus": "UNPROCESSABLE_ENTITY",
"error": "Incomplete by wrong param(s)!",
"errorDescription": "The follower doesn't have this tag!"
}
422 Unprocessable Entity
Provided tag name length was more than 255 symbols
Body:
{
"httpStatus": "UNPROCESSABLE_ENTITY",
"error": "Incomplete by wrong param(s)!",
"errorDescription": "Max alias length is 255!"
}
Definition
Method: GET
Endpoint: https://uapi.gravitec.net/api/v3/alias
Request parameters:
- regId - subscriber’s token [Required, 1-255 symbols string]
NOTE: All request parameters names and values are case-sensitive.
Request URL example:
https://uapi.gravitec.net/api/v3/alias?regId=someregid
regIdExists [boolean]
- Is "true" if provided in request regId is an actual subscriber’s token
- Set in "false" if provided in request regId does not exists as actual subscriber’s token
aliasExists [boolean]
- Is "true" if provided in request regId is an actual subscriber’s token and there is an active alias for that token
- Is "false" if provided in request regId is an actual subscriber’s token and there is no active alias for that regID
- Does not present in response if regIdExists is "false"
isActiveFollower [boolean]
- Is "true" if provided in request regId is a token of an active subscriber
- Is "false" if provided in request regId is a token of an inactive subscriber
- Does not present in response if regIdExists is "false"
alias [string]
- Is an actual and active alias for provided in request regId
- Does not present in response if regIdExists is "false"
200 - OK
400 - Required String parameter regId is not present
RegId property was not in request
Request:
https://uapi.gravitec.net/api/v3/alias?regId=
Response code:
400 - Required String parameter regId is not present
RegId exists as actual subscriber’s token
Request:
https://uapi.gravitec.net/api/v3/alias?regId=okf8kj589ktGF5g3gF#gf3#46g^^6gfGfgfgfg%g5g
Response code:
200 - OK
Response body:
{
"regIdExists": "false"
}
There is no active alias for regID
Request:
https://uapi.gravitec.net/api/v3/alias?regId=okf8kj589ktGF5g3gF#gf3#46g^^6gfGfgfgfg%g5g
Response code:
200 - OK
Response body:
{
"regIdExists": "true",
"aliasExists": "false",
"isActiveFollower": "true"
}
There is an active alias for regID and subscriber is not in an active state
Request:
https://uapi.gravitec.net/api/v3/alias?regId=okf8kj589ktGF5g3gF#gf3#46g^^6gfGfgfgfg%g5g
Response code:
200 - OK
Response body:
{
"regIdExists": "true",
"aliasExists": "true",
"isActiveFollower": "false",
"alias": "alias1"
}
There is an active alias for regID and subscriber is in an active state
Request:
https://uapi.gravitec.net/api/v3/alias?regId=okf8kj589ktGF5g3gF#gf3#46g^^6gfGfgfgfg%g5g
Response code:
200 - OK
Response body:
{
"regIdExists": "true",
"aliasExists": "true",
"isActiveFollower": "true",
"alias": "alias1"
}
Definition
Method: POST
Endpoint: https://uapi.gravitec.net/api/v3/push
Headers: Content-Type: application/json
Request body properties:
{
"send_date": "",
"ttl": "",
"push_tag":"",
"display_time": "",
"is_transactional": "",
"segments": [""],
"payload": {
"message": "",
"title": "",
"icon": "",
"image": "",
"redirect_url": "",
"buttons": [{
"title": "",
"url": ""
}]
},
"audience": {
"tokens": [""],
"aliases": [""],
"tags": [""],
"tags_segment": [{""}]
}
}
Properties list
send_date
Optional
default: ""
type: String or Int
Date and time, when you want your push to be sent. For delayed push, you must set the desired date and time, which have to be in the future and for immediate sending set it to "now".
NOTE: Time must be in UNIX_TIME format, which is essentially the number of milliseconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970, minus the number of leap milliseconds that have taken place since then
Example:
"send_date": "" - immediate sending
"send_date": 1509058800000 – send push at 2017.Oct.26 23:00:00
ttl
Optional
default: 28800
type: Int
The number of seconds that a message may be stored if the user is not immediately available.
NOTE: The number must be in between 0 and 2 419 200
NOTE: Keep in mind that a TTL value of 0 means messages that can't be delivered immediately to users are discarded. However, because such messages are never stored, this provides the best latency for sending notification messages
Example:
"ttl ": 28800 - time-to-live is set to 8 hours
push_tag
Optional
type: String
Tags push campaign so that a comparative analysis among such tags may be available.
NOTE: A tag's length must be between 1 and 100 characters
Example:
"push_tag": "news" - tags a campaign with "news" tag
display_time
Optional
default: 60
type: Int
The number of seconds that a message will be displayed on participant’s screen
NOTE: If set in 0 – the message will be displayed until user clicks on it
NOTE: Maximum time is 2419200
is_transactional
Optional
default: false
type: boolean
Marks a push message as Transactional, thus the message will not be displayed in the main campaign history section of the web application (https://push.gravitec.net). Use this if you send a great deal of small messages, which are by itself contains transactional data like personal notifications for your users, reminders, etc.
NOTE: If omitted, false" value will be set for a push message
segments
Optional
type: array
Send push campaign to a segment.
NOTE 1: You can not include both the segments and the audience section in request.
NOTE 2: You can only send to one segment. In case more than one segment included the system will not send the campaign
NOTE 3: If segment has been deleted or does not exists the system will not send the campaign
payload
Required
The "Payload" section is required, whereas some arguments within the section are not required.
message
Required
type: String
Text, which will be displayed as push message text
NOTE: Maximum length of the message is 1000 symbols.
title
Optional
default: Title
type: String
Title or header of the message.
NOTE: Max length of title is 1000 symbols.
icon
Required
type: String
URL of notification's icon. Sets the notification icon to specified image URL. Image must be at least 80x80 pixels and with 1:1 ratio. Pictures without that ratio will be resized with its aspect ratio and put on a white square.
NOTE: Provide correct URL, without spaces or tabs at the start and at the end of the URL and with ending .jpg, .jpeg or .png, otherwise the error will be fired.
NOTE: Maximum length of the URL is 1000 symbols.
NOTE: Not specifying an "icon": will set the default icon of the site, which can be set on the page "Site Settings".
image
Optional
type: String
URL of big picture to display below the notification main body. For the best results provided image must be with 1.5:1 sides ratio and size at least 360x240 pixels.
NOTE: Provide correct URL, without spaces or tabs at the start and at the end of the URL and with ending .jpg, .jpeg or .png, otherwise the error will be fired
NOTE: Maximum length of the URL is 1000 symbols.
NOTE: Pictures, which are not in 1.5:1 ratio or less then 360x240 and will be resized according to their aspect ratio and put on top of a white image of 360x240 px
redirect_url
Required
type: String
URL which will be opened in user’s browser if user clicks on the notification.
NOTE: Maximum length of the URL is 1000 symbols.
NOTE: Provide correct URL, without spaces or tabs at the start and at the end of the URL, otherwise the error will be fired.
Example:
"redirect_url": "http://yoursite.com/news"
Optional
Specify in this array one or two action buttons, which will be displayed below the notification main body:
title
Required
type: String
Provide appropriate title for the button.
NOTE: Max length of title is 48 symbols
url
Required
type: String
URL which will be opened in user’s browser if user clicks on the notification.
NOTE: Maximum length of the URL is 1000 symbols.
NOTE: Provide correct URL, without spaces or tabs at the start and at the end of the URL (rfc3986)
audience
Optional
The "Audience" section is optional.
NOTE: If omitted, the system shall send push message to all subscribers.
NOTE: If set - the section must contain only one of these variables (in other case, error will be fired):
tokens
Optional
type: Array
Specifying a list of subscribers’ IDs in this parameter means that message will be send exactly to the list of subscribers specified. You can get subscriber’s ID by using getSubscription function from our Web SDK API.
NOTE: Array size is limited to 100 IDs.
Example:
"tokens": ["dec301908b9ba...8df85e57a58e40f96f", "523f4c2068674f1fe...2ba25cdc250a2a41"]
aliases
Optional
type: Array
Specifying a list of aliases means that message will be sent exactly to the list of subscribers who are associated with aliases provided in the list. You can set an alias by using setAlias function from our Web SDK API.
Example:
"aliases": ["own_id_device_1", "own_id_device_2", "own_id_device_3"]
Optional
type: Array
Specifying a list of tags means that message will be send exactly to the list of subscribers who were tagged with tags provided in the list. You can tag your subscribers by using addTag or setTags function from our Web SDK API.
Example:
"tags": ["tag1", "tag2", "tag3"]
Optional
type: Array
In order to send campaign to a part of your audience, which is an intersection two or more segments of tagged subscribers, you can provide such a condition by using logic operators AND, AND_NOT, OR, OR_NOT followed by a tag. Such conditions should be put in array of json elements.
AND – include all followers tagged by the tag followed with AND logical operator
AND_NOT - include all followers who hasn’t been tagged by the tag followed with AND logical operator
OR - include all followers tagged by the tag followed with OR logical operator
OR_NOT - include all followers who hasn’t been tagged by the tag followed with OR logical operator
NOTE: Tags array must contain not less that 1 and not more than 256 elements
NOTE: Tag name must contain not less that 1 and not more than 255 symbols
NOTE: You must provide logical operator only from the list: AND, AND_NOT, OR, OR_NOT
NOTE: Tag name provided must be case-insensitive unique among the elements in the array (Example: CARS and cars are not unique)
NOTE: It is not allowed to use both tags_segment and tags directive simultaneously
NOTE: You must provide tags that exists in the system
Example:
The system shall send the campaign to all followers with tag tag1 and without tag2:
"tags_segment": [{
"association": "AND",
"name": "tag1"
}, {
"association": "AND_NOT",
"name": "tag2"
}]
The system shall send the campaign to all followers without tag tag1 or with tag2:
"tags_segment": [{
"association": "AND_NOT",
"name": "tag1"
},{
"association": "OR",
"name": "tag2"
}]
200 OK - Standard response for successful HTTP requests
Request
{
"payload": {
"message": " Test massage",
"title": "Test message",
"redirect_url": "https://gravitec.net"
}
}
Response
{
"id": "1590394828308348928",
"send_date": "1516718700678",
"ttl": 86400,
"display_time": 60,
"payload": {
"title": "Test message"
}
}
403 FORBIDDEN - authorization failed
Request
POST /api/v3/push HTTP/1.1
Host: api.gravitec.net
Content-Type: application/json
Authorization: Basic Z2hqZ2hqZ2g6aGdtamdoag==
Cache-Control: no-cache
{
"payload": {
"message": "Test massage",
"title": "Test message",
"redirect_url": "https://gravitec.net"
}
}
Response
{
"status": "incomplete by bad auth",
"error_message": "There is no web site with appKey: 5459059059405940gpgkj"
}
Definition
Method: GET
Endpoint: https://uapi.gravitec.net/api/v3/messages/
Request parameters:
- campaignID - Campaign ID [Required, Id from “Send Push Notification V3]
NOTE: All request parameters names and values are case-sensitive.
Request URL example:
https://uapi.gravitec.net/api/v3/messages/1603861504654835713
200 OK
Request successfully received
Body:
{
"status": "SENT",
"send": 2,
"received": 2,
"clicked": 1,
"closed": 1
}
400 Required parameter "campaignID" is not present
"campaignID" parameter was not provided in request
422 Unprocessable Entity
No Push Campaign with campaignID provided was found
Body:
{
"httpStatus": "UNPROCESSABLE_ENTITY",
"error": "Incomplete by wrong param(s)!",
"errorDescription": "There is no message with this id!"
}
How to find your Rest API keys
Tab "Rest API"
To locate your API Key in your Gravitec account, please follow these steps:
- Log into your Gravitec account
- Select a site
- Click "Settings" from the Left Menu
- Click on "REST API" tab
- Copy/Paste the App key and App secret
This tab displays the key pair for the service's REST API. API access allows you to send push campaigns directly.
For Free plan only 10 push campaigns per day are available through API.
Zapier integration
When you start creating a Gravitec Zap, you will be asked to connect your Gravitec account.
Next, you'll be asked to enter your Gravitec Username as App key and Password as App secret.