Setting up Web Push Notifications on VTEX


Questo articolo è attualmente disponibile in inglese e spagnolo. Puoi fare riferimento a questa documentazione mentre arriva nella tua lingua.

The second step to integrate your Connectif account with your VTEX Legacy store, is to set up Connectif Web Push notifications. This way, you can start creating workflows in which you ask users to subscribe to your push notifications.

In this article, you’ll learn how to set up web push notifications.

Implementation time: 15 min.
Difficulty: Low.
When to use it: When you open your Connectif account.


STEP 1. Download the ServiceWorker


For Connectif to manage push subscriptions and display notifications, the store must make its ServiceWorker file public from its own domain.
Find more information about the ServiceWorker and how it works in this article.

1. In your Connectif account, go to "Integrations > Web System" y and click   Edit.


2. Go to the Push Notifications tab and click    Download.


3. Save the service-worker.js file on your computer.


STEP 2. Installing the ServiceWorker in the VTEX Legacy Store


To install the ServiceWorker in your store, follow the steps in the VTEX documentation.

4. From the admin portal of your VTEX store, go to "Store settings > Checkout" and click (Settings).


Don’t close this window, you’ll need it later.


5. In the Code, tab add a new file by clicking New > Upload file.


6. Enter the name "service-worker.js" and locate the file downloaded from Connectif on your computer.


7. Click    Save.



STEP 3. Configuring the push channel in Connectif

8. Go back to the Connectif section where you downloaded the file (step 1) and enter your URL in the ServiceWorkerURL field.


This URL must be in the following format: https://STOREDOMAIN/files/service-worker.js

9. Click    Save.




The configuration of web push notifications in your store is now ready.


Keep learning!

To make the most of your Connectif account, we recommend reading these articles next:

Questo articolo ti è stato utile?
Utenti che ritengono sia utile: 0 su 0