### [How to Set Up PushEngage Web Push Notifications on a Base44 App](https://www.pushengage.com/documentation/how-to-set-up-pushengage-web-push-notifications-on-a-base44-app/)

**Published:** November 27, 2026
**Author:** Abhishek Rijal

**Content:**

Would you like to send web push notifications to the people who use your Base44 app? You can collect subscribers on your own Base44 domain by adding the PushEngage installation code and a one-line service worker file through Base44’s AI chat. In this tutorial, we’ll show you how to set up PushEngage web push notifications on a Base44 app.

**Requirements:** Your Base44 app needs to be published and set to **Public**. An app that asks visitors to log in blocks the service worker file, so web push can’t be installed on it.

---

### 1. Creating and Publishing Your Base44 App

Web push needs a live, public address, so the first step is to publish your app. If your app is already published and public, then you can skip ahead to the next section.

1. To start, sign in to [your Base44 account](https://base44.com/) and create an app. You can describe what you want in the chat, and the AI builds it for you.
2. Next, click **Publish App** in the top right corner of the editor.
3. In the panel that opens, check that **App visibility** is set to **Public**, so visitors can open your app without signing in.
4. Then, click **Publish**. Base44 gives you a live URL that looks like `https://your-app.base44.app`.

![Publish your Base44 app with App visibility set to Public](https://www.pushengage.com/wp-content/uploads/2026/11/Publish-App-panel-in-Base44-with-App-visibility-set-to-Public.png)**Note:** Push subscribers are tied to the exact address they subscribed on. If you plan to move your app from its `base44.app` address to a custom domain, then connect the custom domain before you start collecting subscribers. If you change the domain later, your subscribers need to subscribe again. For more details, see our guide on [what happens to subscribers when a site’s domain changes](/documentation/changing-your-site-domain-and-what-happens-to-the-subscribers/).

### 2. Adding Your Site in PushEngage

Once your app is live, you’ll add it to PushEngage as a new site and copy its installation code.

1. First, log in to [your PushEngage dashboard](https://app.pushengage.com/) and go to **Site Management » Add New Site**. Then, fill in these fields: 
    - **Site Name:** A name for your site. It needs to start and end with a letter or a number.
    - **Site URL:** The published URL of your Base44 app. If you plan to use a custom domain, then connect it in Base44 first and enter that address here.
    - **Sub Domain:** Any name you like. You won’t use this address when you collect subscribers on your own domain.

![Fill in the Add New Site form in PushEngage](https://www.pushengage.com/wp-content/uploads/2026/11/Fill-in-the-Add-New-Site-form-in-PushEngage.png)2. In the onboarding that opens, choose **Web Push**.
3. When you reach the **Install** step, copy the installation code. Go ahead and keep this tab open, since you’ll come back to it after the next section.

![Copy the installation code from the Install step in the PushEngage onboarding](https://www.pushengage.com/wp-content/uploads/2026/11/Installation-code-on-the-PushEngage-Install-step.png)### 3. Adding the Service Worker and Installation Code in Base44

PushEngage needs 2 things in your app: the installation code on every page, and a service worker file at the root of your domain. A service worker is a small file that lets the browser receive notifications even when your app isn’t open.

Base44 serves everything in your project’s `public` folder from the root of your app. This means a file saved as `public/service-worker.js` is live at `https://your-app.base44.app/service-worker.js`, which is exactly where web push looks for it. You don’t need server or root access.

The file itself is a single line that loads the PushEngage service worker, so you won’t need to edit it again when we release updates. PushEngage also registers the file for you once the installation code loads, so there’s nothing else to set up.

1. To begin, open your app in Base44 and send the message below in the AI chat. Before you send it, replace the placeholder line with the installation code you copied from PushEngage.

```
1. Create the file public/service-worker.js containing exactly this one line and nothing else:
importScripts("https://clientcdn.pushengage.com/sdks/service-worker.js");
2. Add this PushEngage installation code to the root layout so it loads on every page:
[Paste your PushEngage installation code here]
Do not create any other service worker.
```

![Send the service worker and installation code message in the Base44 AI chat](https://www.pushengage.com/wp-content/uploads/2026/11/Service-worker-and-installation-code-message-in-the-Base44-AI-chat.png)2. After the AI finishes, check where it placed the code. Base44 usually adds it to `src/routes/__root.jsx`, inside the `` tag and next to ``. That placement works.
3. Next, click **Publish App**, then click **Publish** again. Your changes only reach the live app after you publish.
4. Finally, open `https://your-app.base44.app/service-worker.js` in your browser, using your own app’s address. If you see the `importScripts` line, then the file is in the right place.

![The importScripts line shown at the service-worker.js address of the live Base44 app](https://www.pushengage.com/wp-content/uploads/2026/11/Service-worker-file-live-on-the-Base44-app.png)**Note:** If the address shows a 404 page instead of the `importScripts` line, then the file isn’t in the `public` folder or the app hasn’t been published yet. Ask the AI chat to create the file again, then publish your app.

### 4. Completing the PushEngage Setup

Now that the code is live, you can return to the PushEngage tab and finish the onboarding.

1. On the **Install** step, click **Confirm and Check Status**. PushEngage checks for HTTPS, the service worker, and the installation code. When everything is in place, you’ll see **3 of 3 checks passed**.

![PushEngage Install step showing 3 of 3 checks passed](https://www.pushengage.com/wp-content/uploads/2026/11/PushEngage-Install-step-with-3-of-3-checks-passed.png)2. Next, click **Continue to Popup Design**. On the **Popup** step, choose a style for your opt-in popup, such as **Large Safari**, then click **Looks Good, Continue**. Please don’t skip this step, because it switches subscriber collection to your own Base44 domain.
3. The **Audiences** and **Automations** steps are optional, so you can skip them for now and finish at **Summary**.
4. Lastly, go to **Design » Popup Modals**, click **Edit Popup** on your active popup, and open **Display Options**. Here, make sure that **Quick Install** is turned off.

![Quick Install turned off in the popup Display Options](https://www.pushengage.com/wp-content/uploads/2026/11/Make-sure-Quick-Install-is-turned-off-in-Display-Options.png)**Note:** New sites start with Quick Install turned on, and the Install step passes either way. While Quick Install is on, visitors subscribe on a PushEngage subdomain instead of your Base44 domain, and they need to subscribe again if you switch later. For more details, see our guide on [switching Quick Install off](/documentation/guide-to-turning-off-quick-install/).

### 5. Enabling Web Push on iPhone and iPad

This section is optional. On iOS and iPadOS 16.4 and later, web push works once a visitor adds your app to their Home Screen and opens it from the icon. It doesn’t work in a regular Safari tab.

1. In your PushEngage dashboard, go to **Design » Widgets** and turn on **Add to Home Screen**. This widget is off by default, and it prompts iPhone and iPad visitors to add your app.
2. Your visitor then opens your app in Safari, taps **Share**, and chooses **Add to Home Screen**.
3. After that, the visitor opens your app from the new Home Screen icon, taps the allow button in the opt-in popup, and then taps **Allow**.

![Add to Home Screen widget turned on in Design, Widgets](https://www.pushengage.com/wp-content/uploads/2026/11/Turn-on-the-Add-to-Home-Screen-widget.png)**Note:** We tested this flow on an iPhone running iOS 27. On versions earlier than iOS 26, the Add to Home Screen flow needs a web app manifest link, which Base44 apps don’t include. On those versions, the Home Screen icon opens your app in Safari, so web push doesn’t work there. To learn more about how web push works on Apple devices, check out our guide to [web push on iOS and iPadOS](/documentation/setting-up-web-push-notifications-for-ios-ipad/).

### 6. Testing Your Setup

Always test on your published URL in a fresh browser window. The preview inside the Base44 editor can show the opt-in popup, but it blocks the service worker, so subscribing only works on your published app.

1. First, open your live app. The opt-in popup appears after a short delay, which is 8 seconds by default.
2. Next, click the allow button on the popup, then click **Allow** in the browser prompt.

![PushEngage opt-in popup on the live Base44 app](https://www.pushengage.com/wp-content/uploads/2026/11/PushEngage-opt-in-popup-on-the-live-Base44-app.png)3. In your PushEngage dashboard, go to **Audience » Subscribers** to see your new subscriber. Dashboard numbers can take a few minutes to update.
4. To finish, go to **Campaign » Push Broadcasts** and send yourself a test notification. In our testing, it arrived in about 30 seconds, and clicking it opened the right page.

### Troubleshooting

If something isn’t working, then this table covers the issues we see most often on Base44 apps.

ProblemCauseFixThe `service-worker.js` address shows a 404 page.The file is missing, or the app isn’t published.Create `public/service-worker.js` through the AI chat, then publish again.The `service-worker.js` address shows a login or “not authorized” page.The app requires visitors to log in.Set **App visibility** to **Public**, then publish again.Subscribing doesn’t work in the Base44 editor preview.The editor preview blocks the service worker.Test on your published URL instead.The opt-in popup doesn’t appear on the live app.The installation code is missing, or the change isn’t published.Look for the PushEngage code in the page source, then publish again.The live `service-worker.js` address or the app still shows the old version after you publish.The publish hasn’t fully gone live yet.Publish your app a second time, then check again.The opt-in popup doesn’t appear in a private or incognito window.PushEngage turns web push off in private browsing.Test in a normal browser window.Visitors subscribe on a PushEngage subdomain page.Quick Install is turned on.Turn off **Quick Install** in **Display Options**, then save.The opt-in popup shows on an iPhone, and no subscriber appears.The app was opened in a Safari tab.Add the app to the Home Screen, then open it from the icon.For other installation issues, our guides on [fixing service worker errors](/documentation/404-403-service-worker-installation-error/) and [a popup that doesn’t show](/documentation/cannot-see-popup-after-installing-pushengage/) go into more detail.

### Frequently Asked Questions

#### Do I need root or server access to my Base44 app?

No. Base44 serves your project’s `public` folder from the root of your app, so the AI chat can place the service worker file where web push needs it.

#### Can I use PushEngage on a Base44 app that requires my visitors to log in?

Not with this setup. An app that requires login answers every address with a “not authorized” error, and that includes the service worker file. Your app needs to be public for the installation to work.

#### Will PushEngage work inside the mobile app I publish to the App Store or Google Play with Base44?

No. A Base44 store app shows your web app inside a web view, and web push isn’t available there. For people who install from the App Store or Google Play, Base44 offers [its own built-in push notifications](https://docs.base44.com/Building-your-app/Mobile-experience).

PushEngage web push reaches everyone else: people who use your app in a browser, and people who added it to their Home Screen. You can use both side by side.

#### I turned off visitor tracking in Base44. Does PushEngage still work?

Yes. That setting only blocks analytics tools, and PushEngage keeps working when it’s off.

#### Is the browser notifications setting in my Base44 account related to this?

No. That setting alerts you, the builder, when the AI finishes a prompt. It doesn’t send notifications to the people who use your app.

#### Which browsers and devices can I expect this to work on?

We’ve tested this setup on a public Base44 app in Chrome, Firefox, Edge, and Safari on desktop, in Chrome on Android, and on an iPhone running iOS 26 or later from the Home Screen. We haven’t verified iPad or Base44 apps on a custom domain yet. iPhones on versions earlier than iOS 26 can’t subscribe on a Base44 app, as covered in the iPhone and iPad section above.

That’s it! You can now collect web push subscribers on your Base44 app and send them notifications from PushEngage.

Next, would you like your opt-in popup to match your app’s look? Check out our tutorial on [styling your subscription popup](/documentation/how-to-edit-the-styling-of-two-step-opt-in/) for all the details.

If you run into any issues, please feel free to [contact us](/contact-us/?utm_source=website&utm_medium=helpdocs&utm_campaign=contact-us). Our support team will be able to help you.

**Doc Categories:** Website Platforms

---

