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.
- To start, sign in to your Base44 account and create an app. You can describe what you want in the chat, and the AI builds it for you.
- Next, click Publish App in the top right corner of the editor.
- In the panel that opens, check that App visibility is set to Public, so visitors can open your app without signing in.
- Then, click Publish. Base44 gives you a live URL that looks like
https://your-app.base44.app.

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.
- First, log in to your PushEngage dashboard 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.
- Sub Domain: Any name you like. You won’t use this address when you collect subscribers on your own domain.

- In the onboarding that opens, choose Web Push.
- 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.

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.
- 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.

- After the AI finishes, check where it placed the code. Base44 usually adds it to
src/routes/__root.jsx, inside the<body>tag and next to<Base44Scripts/>. That placement works. - Next, click Publish App, then click Publish again. Your changes only reach the live app after you publish.
- Finally, open
https://your-app.base44.app/service-worker.jsin your browser, using your own app’s address. If you see theimportScriptsline, then the file is in the right place.

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.
- 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.

- 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.
- The Audiences and Automations steps are optional, so you can skip them for now and finish at Summary.
- 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.

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.
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.
- 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.
- Your visitor then opens your app in Safari, taps Share, and chooses Add to Home Screen.
- 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.

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.
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.
- First, open your live app. The opt-in popup appears after a short delay, which is 8 seconds by default.
- Next, click the allow button on the popup, then click Allow in the browser prompt.

- In your PushEngage dashboard, go to Audience » Subscribers to see your new subscriber. Dashboard numbers can take a few minutes to update.
- 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.
| Problem | Cause | Fix |
|---|---|---|
The 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. |
| 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 and a popup that doesn’t show 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.
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 for all the details.
If you run into any issues, please feel free to contact us. Our support team will be able to help you.