> For the complete documentation index, see [llms.txt](https://academy.gopersonal.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://academy.gopersonal.ai/en/developers/channels-setup/web-push-notifications.md).

# 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&#x20;

Go to Integrations and select Web push after Clicking New Integration.&#x20;

To authenticate a service account and authorize its access to Firebase services, you need to generate a private key file in JSON format.&#x20;

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.&#x20;

## 2-  Add the Service Worker to your site&#x20;

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](https://admin.gopersonal.ai/gp-firebase.js), 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](http://www.yoursite.com/gp-firebase.js). If you need to use a different name, please let us know.&#x20;

## 3- Add your opt-in personalization&#x20;

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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://academy.gopersonal.ai/en/developers/channels-setup/web-push-notifications.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
