You can use Optimizely Data Platform (ODP) to push real-time messaging to your web and mobile customers, even if they are not active on your site.
Prerequisites
- HTTPS – Use HTTPS in your website to let your customers subscribe to web push notifications.
- ODP Integration – Your website must already use an ODP integration, like the Javascript Web SDK, Shopify, Magento, Google Tag Manager, or Tealium integration.
-
Installation – If your website is not a Shopify site, you must install the
zaius-notification-service.js
file in the root of your website to enable web push. If your website is a Shopify site, you must install an ODP app instead.
Create a web push integration
- Go to Data Setup > Integrations > Web Push.
- Click New Web Push Site and complete the following:
- Name – The display name for this integration. This name displays any time you select your integration for use in ODP.
- Short Identifier – An identifier used primarily for internal reference and event generation. You cannot change this after you save it.
- External Name – The website name displayed to customers and in notification settings depending on the browser and operating system. You should match the brand instead of matching the website URL.
-
Website URL – The base URL of the website. For example, if your website address is
https://example.website/home/
, your base URL ishttps://example.website
. - Notification Icon URL – The URL of the default icon for push notifications sent from this integration. You can upload and host the image on ODP or manually specify the icon URL using the HTTPS of an existing image.
- Click Next Step.
- Enable the browsers where you want this web push integration available.
- Click Save & Continue to validate your configuration.
- Customize how the web push notification displays by adjusting the Card, Title, Subtitle, Button, and Cancel options. Customize the customer's opt-in experience by adjusting the following Settings:
- Position – The location of the window on the page.
- Show Delay – The amount of time to wait before showing the window.
- Popup Frequency – The minimum time between automatic popups of the window. This is specific to the subscription window and controls how frequently you should ask for permission to send notifications to the customer if they do not interact with it.
- Minimize Delay – The time to wait before automatically minimizing the window.
- Cancel Duration – The minimum time to wait before showing the window after the user cancels it.
You can return to this step to customize the pop-up notification window. - Click Save & Continue.
- Implement the JavaScript Tag on all your website's pages, preferably in the header section. You can find this tag in Settings > Integrations > JavaScript Tag.
- If you are configuring web push for your Shopify site, expand Shopify and follow the instructions to authorize the ODP Shopify app to set the required files on your site.
- If your website does not use Shopify, download the
zaius-notification-service.js
file and upload it to the root of your website. For example, if your website ishttps://example.website/
, the file should be available athttps://example.website/zaius-notification-service.js
.
- Click Verify & Continue after the files are on your website or ODP is authorized in Shopify. Optimizely checks for the file on your website to confirm you installed it correctly.
- Toggle the Automatically initialize web push on this site to On and click Finish when ready to enable web push. If you are performing a manual web push integration or want to enable web push later, you can finish without enabling the automatic integration. Return to this step to change your website's behavior.
- Wait a few minutes for your changes to take effect.
Custom subscribe experience
To customize the web push subscription experience further, see the developer documentation on Web Push in the Web SDK.
Article is closed for comments.