How to add Push Notifications to a Webflow Site
Tags: webdev, javascript, ux
Published: 2021-05-19 00:50:42

---
title: How to add Push Notifications to a Webflow Site
published: true
date: 2021-05-18 15:54:46 UTC
tags: webdev, javascript,ux
canonical_url: 
---

 ![How to add Push Notifications to a Webflow Site](https://onesignal.com/blog/content/images/2021/05/onesignal-webflow-2.png)

[Webflow](https://webflow.com/) (as you probably know) is an amazing solution that can help you build a website without coding skills. While navigating through their blog one day, we noticed that a lot of people were looking for a way to integrate web push notifications into their Webflow site.

Most push notifications solutions require that you upload a **Javascript (.JS) file** — this file serves as the service worker, which is essential for push notifications to work. The free Webflow plan doesn't currently allow custom code uploads of this kind, so you'll need a Webflow [Site plan](https://webflow.com/pricing?utm_source=dashboard#site), [Account plan](https://webflow.com/pricing?utm_source=dashboard#account), or [Enterprise plan](https://webflow.com/enterprise) in order to get started.

In this how-to guide, we’ll show you how to add push notifications into your Webflow site using OneSignal. The good news is, you can create a OneSignal account and send unlimited push notifications for free.

**Guide Overview:**

- [Step 1: Set up Your Webflow Site](#step-1-set-up-your-webflow-site)
- [Step 2: Set up Your OneSignal Account](#step-2-set-up-your-onesignal-account)
- [Web Push Configuration](#web-push-configuration)
- [Step 3: Integrate OneSignal into Webflow](#step-3-integrate-onesignal-into-webflow)
- [Step 4: Testing Time!](#step-4-testing-time-)
- [Recap](#recap)

## Step 1: Set up Your Webflow Site

If you haven’t done so already, create your Webflow site and choose your preferred [plan type](https://webflow.com/pricing?utm_source=dashboard#account). If you currently have a free Webflow account, upgrade to the plan that best fits your budget and goals in order to unlock custom coding options.

![How to add Push Notifications to a Webflow Site](https://lh3.googleusercontent.com/oaR5We2PPBpVRvZ-d64J1-1Dt5m1tEmvdGY9bO6fiSjvlXkKR1Z2Vlf1yXpEuQ8OjO504n1i9PoOzHQaBmxHdarf7ElAlzHJy5g2ecdc1axcz3_uSWoaVGuXZtIXvjcUzDYnwYJR)

After you’ve created your site in Webflow, copy your site URL. In our example, our site URL is: [https://onesignal-webpush-devrel.webflow.io/](https://onesignal-webpush-devrel.webflow.io/)

## Step 2: Set up Your OneSignal Account

- If you don't have on already, [**create a free OneSignal account**](https://app.onesignal.com/signup). When you first log in, you will be prompted to set up a new app or website.
- To get started, insert the name of your website and select _ **Web Push** _ as your chosen platform.

![How to add Push Notifications to a Webflow Site](https://lh5.googleusercontent.com/SUMyFvKobyQAF9wbwgASbRBX7V5QeF5TVsgc98cjWFCJjG76g7lAFC_0uhB6wAkkVh175jDr9i435YbOMICo6bcv9uoFsUrNMF83L1kwd4W9Z48RHelrVReKLukZtAQdvN5b_gjT)

## Web Push Configuration 

- In section _ **1. Choose Integration** _, select _ **Typical Site** _.
- Under _ **2. Site Setup** _, enter your web configuration. Our configuration is shown in the image below.  Paste the Webflow URL you previously copied into the section entitled _ **SITE URL** _.

![How to add Push Notifications to a Webflow Site](https://lh3.googleusercontent.com/lBa9x_F-Qk8s7Sb0k9t7u7eL_PkIQFqbqqroFh4t8Ep89Jb73vmadeSPPYN5EzPWaJVz9ClwIevW2kNnvH8IxZljoI1P8OXDI2l89AckKjbonwTCrMSHVdZCQrbcXM1YdEfJReDD)

- Make sure you select _ **My site is not fully HTTPS** _ and input a custom label. This is the main trick to get push notifications from OneSignal to work on a Webflow site.
- In section _ **3. Permission Prompt Setup** _, you should see a blue button to configure the HTTP Pop-up setup. This pop-up is an iFrame that will act as a mirror of your page that will allow you to receive notifications on your Webflow website.

![How to add Push Notifications to a Webflow Site](https://lh6.googleusercontent.com/7hKmkN1_P0IS66TA_33hoLyyviqbBIFdb1VBMPdyt9fEtBcwvg3wSHduadhFzX2OL6gfEBrp-ikdLX_MrxdPwN5tzd9tEn1lzmuvSH1BuBTL6BriT6cbnHaoszEYwY2MYhVQP-it)

- After clicking on the blue button, a window will appear where you can modify the configuration of your pop-up. For this example, we left the automatic placeholder text in place, but you can change the text of your pop-up to better fit your website UX. Click _ **Done** _ in the bottom right corner of the window when you’ve finished making changes.

![How to add Push Notifications to a Webflow Site](https://lh3.googleusercontent.com/oi7OKeI2t1-dEtp-PgNnhTvVxcOHqfkpL99KoeqyhBlP8a8R4Zmt_uTDwyl7H_75SPqCP-oMG1sE-ALddafsmnPt6DR5xpV1XeoVbCnRxDngwVp4GBpST9SXs1k2CDHFXbSeYQ-7)

- Finally, scroll down to the bottom of the page and click _ **Save** _.
- In the final setup step, you will see a grey _ **COPY CODE** _ button — click this button to copy the code.

![How to add Push Notifications to a Webflow Site](https://lh5.googleusercontent.com/n3Tmvn6qwk5XNVAG87h2liiz81LJlf87oDRcwKg0CPmw6onFWmp0dNZLaCoJ6oEquQDcoVu8Jtw5QJ1DLsSmmjAG8RupzXlGSX19CgrQNcRzM3T_QOmTkE1LPExXPXNXEqaBsWtN)

## Step 3: Integrate OneSignal into Webflow

Now it’s time to integrate OneSignal into your Webflow site.

- Return to your Webflow dashboard. You should see all the projects you’ve created under your Webflow account. Select the site you’d like to add push notifications to by clicking on the three dots next to the project name, then select _ **Settings** _ from the drop-down menu that appears.   

![How to add Push Notifications to a Webflow Site](https://lh6.googleusercontent.com/h_1MJr_E_6fMdJbqV4UhLTN8TMSIwcNHJK4vJ76Er_7RjcH-4A12VFpJzSNxX9DLgh-aPjtzg_sH6BI8pUkA3kIE0b2wXIWjSqqELZgRLsyZsIvBPxAMKEWyX5WFYOOCc0Ag10gb)

- In the settings menu for this Webflow project, click on _ **Custom Code** _ on the far right of the navigation bar.

![How to add Push Notifications to a Webflow Site](https://lh5.googleusercontent.com/jdtfEyCYfAGk5XqDmlLkq-4qNwmyry0xgD1_uWArYu-KYhOIIhbkWE0SUagGJ_mKUPGAO5Bc9QOdWtrHHaJ76Ts80r_9tOAoqCaXUJX9Ztpj0z6OJMqacCcSNaM2SAmNFtGsjYK5)

- Under the _ **Add Custom HTML & CSS** _ > _ **Head Code** _ section in this tab, paste the code you previously copied from your OneSignal account. If you haven’t copied anything else since completing the _ **Web Push Configuration** _ step, the code snippet should be in your clipboard. If you need to, you can go back to your OneSignal project settings and re-copy the code.

![How to add Push Notifications to a Webflow Site](https://lh5.googleusercontent.com/nqrLcXFYBtN0kNi0e6b4MWd1zES9I7uWCUiTCDChcBa3kN2a1ScskXku1QIpsdxmwTMmN8R8Mbeb1KUQUDHwaaTVHs1V3x7Ya3oF4Koch2kJ70lAVmrA4KS_F1qeue_QmRRlxIzt)

- After pasting the code into the appropriate box, click on the green _ **Save Changes** _ button.

## Step 4: Testing Time!

Push notifications require user opt-in permission. In order to preview your notifications, you’ll first need to subscribe to notification on your site.

- Navigate to your Webflow site in your browser and click _ **allow** _ in the permission prompt that appears.

You’ve successfully integrated OneSignal with your Webflow account! Now, you can create and send custom messages from your OneSignal account and they will appear to subscribers on your website. As you build your subscriber list, you can hone your messaging strategy by sending custom notifications to specific [audience segments](https://onesignal.com/blog/boost-push-notification-engagement-with-onesignals-segmentation-tool/).  
  
If you don’t know how to send a push notification using OneSignal, follow these instructions to [send your first notification](https://documentation.onesignal.com/docs/sending-notifications).

## Recap

**This setup process is a breeze as long as you remember two key things:**

- You must have a paid Webflow account in order to add notifications to your website.
- As you complete Web Push Configuration on your OneSignal account, make sure you select the option _ **My site is not fully HTTPS** _ and **add a custom label**. This is the main trick to get push notifications from OneSignal to work inside of a Webflow site.

Still have questions? We've got answers. Reach out to us at **support@onesignal.com**.