Web Push Notifications
To send web push notifications to your customers, you must first create the integration in the gopersonal admin and complete the configuration by following these steps:
1- Create the Web Push integration
Go to Integrations and select Web push after Clicking New Integration.
To authenticate a service account and authorize its access to Firebase services, you need to generate a private key file in JSON format.
Follow these steps to generate a private key file for the service account:
In the Firebase console, go to Settings > Service accounts.
Click on Generate new private key, then click Generate key to confirm.
Download the JSON file and upload it in the Integration.
2- Add the Service Worker to your site
The Service Worker (SW) is a JavaScript script that runs even when the browser is closed. This enables GoPersonal to send web push notifications to users with an active token, regardless of their online status. GoPersonal uses Firebase to send the push message to the SW, which then displays the notification to the user.
Follow this link, right-click, and select "Save As" to download the Service Worker file. Next, upload the Service Worker file to your domain’s subpath. The SW should be accessible at www.yoursite.com/gp-firebase.js. If you need to use a different name, please let us know.
3- Add your opt-in personalization
To send web push notifications to your users, it's essential to obtain their consent and ensure they subscribe to receive them. We offer customizable templates that make it easy to add opt-in collectors to your site.
Last updated