Wix Setup

How to set up OneSignal Web Push notifications on Wix sites

❗️

Deprecation Notice

OneSignal stopped supporting new apps from using Blogger, Bubble, Squarespace, Webflow, Weebly, Wix, HTTP sites, and website builders that don't support uploading Service Workers to a server (which are required for web push).

We used to provide a workaround subdomain like https://LABEL_HERE.os.tc so we would host the Service Worker files for you, but this isn't going to be supported anymore for several reasons, the most important being:

  • This doesn't work for iOS Web Push
  • It provides a bad User Experience for your users
  • Chrome is making a change detailed in their storage partitioning plans / CHIPS which when enabled prevents our SDK from checking unsubscribe stats when using the https://LABEL_HERE.os.tc/unsubscribe page.

If you currently use the the os.tc subdomain, you can continue to use it but will no longer be able to prompt for push notifications. Your existing subscriptions will continue to receive notifications. Starting September 8th, Chrome's change will prevent users from being able to unsubscribe when they visit the https://LABEL_HERE.os.tc/unsubscribe page. They will need to unsubscribe from the browser notification settings.

Sorry for the inconvenience. We know a lot of people want this. Especially for blogger, hopefully the Google Team will support this someday: Is it possible that i can build progressive web app for my Blogger blog

If you use one of these types of site builders, you may be able to work around this by following our Typical Website setup and put a CDN in front of your domain to host the OneSignalSDKWorker.js Service Worker file. But this is quite technical and we don't have any guidance on how to setup the CDN.

This guide will walk you through how to set up Web Push for your Wix site using the Website Builder setup process in the OneSignal Dashboard.

To jump back into the setup process at any point, go to App Settings and click Configure for the Google Chrome platform. Instructions for Safari are here.

Pre-requisites:

  • A Wix site on a premium plan with a custom domain

Step 1. Choose Integration

In the OneSignal Dashboard, click New App/Website from the All Applications page.

On the screen that appears, fill in the name of the app.

If your account is part of an Organization, select the name of the organization that the app should belong to from the list.

Select Web Push from the list of platforms, then click Next: Configure Your Platform.

On the screen that appears, select Website Builder > Wix.

Step 2. Site Setup

Once you've selected Wix as your integration, you must fill out information about your site.

Site URL

You will need to enter in your primary domain that you have set up in Wix. See managing your domain in Wix to learn how to find this domain.

Auto Resubscribe

Recommended: This feature is only for HTTPS sites and if you do not select "My site is not fully HTTPS". This allows users to automatically resubscribe upon returning to the site without being prompted if they clear their browser cache or if you are transferring to OneSignal from another push provider.

Default Notification Icon URL

Enter a link to an icon file that is at least 80x80 pixels. Recommended size is 192x192. The file must be .png, .jpg, or .gif.

Choose a Label

Wix implementations must choose a unique label that will be displayed as the originating subdomain in your notifications.

Warning: You can only change your label if you have less than 100 web push users. Once you have 100+ web push users, this setting is disabled.

Step 3. Permission Prompt Setup

To send push notifications to users, you first must ask them for permission using a Prompt. You must have at least one Prompt on your site for web push to work. Click Add a Prompt to open the permission prompt selector.

Permission Prompt Editor

In the Permission Prompt Editor, you can select which prompts you wish to use, and style them as you like. Once you have edited the prompt to your liking, click Save.

Subscription Bell - a small icon at the corner of your page that users can interact with to subscribe

Slide Prompt - a small modal that comes from the center of the page and asks if users are interested in signing up.

HTTP Pop-Up Prompt (HTTP-only) - a pop-up window that appears after other prompts that is required for HTTP sites.

Custom Prompts - create your own links or buttons as prompts.

Step 4. Welcome Notification

Welcome notifications an optional way to thank users after subscribing to your site. Users will see a welcome notification as soon as they subscribe. You can edit or disable them here.

Step 5. Advanced Options

Most sites will not have to edit anything in Advanced options. See Web Push Advanced Options to learn more about each option.

👍

Site Configured

Once you've completed steps 1-5, click 'Save' to save your configuration.

Next, you'll need to add OneSignal to your site by following step 6.

Step 6. Add Code to Site

To enable OneSignal on your Wix site, you will need to copy the code from Web Push Settings.

Navigate to your Wix dashboard and select the site you wish to connect to OneSignal.

Select Settings in the left menu.

Click the + Add Custom Code button in the upper right hand corner.

Paste the copied code in the text box.

Enter a name for your code (e.g., "OneSignal").

Click Apply.

More information on adding custom code to your Wix site can be found here.

Step 7. Subscribe & Send a Test Notification

Visit the site and subscribe through the OneSignal permission prompt that you configured in Step 3.

Then, send a test notification to yourself through the OneSignal Dashboard to test your implementation.

Step 8. Add Google Tag Manager Plugin

Next, add the Google Tag Manager plugin to your site and follow the tutorial OneSignal Google Tag Manager guide.


Frequently Asked Questions