Skip to main content
All CollectionsSMS & Push Notifications
How to embed push notification code
How to embed push notification code
Kenneth avatar
Written by Kenneth
Updated over 10 months ago

Enhance user engagement by adding push notifications to your website. Follow these simple steps to embed the push notification code seamlessly into your site using our platform.

Steps:

  1. Access Your Lists in the Dashboard: Log in and navigate to the "List" icon on the left side of your dashboard. Click on it to access list-related features.

  2. Go to Push Notification Settings: Within the Lists section, find and select "Push Notification." Click on "Add Website" and enter your domain.

    Note: Your website must use "https" to enable push notifications.

  3. Show How to Embed: After adding your website, click on "Show How to Embed" to reveal the necessary steps.

  4. Upload File: Follow the instructions to upload the file into your website's root directory. So it is accessible via (https://zago.com/sw.js): sw.js.

  5. Insert JavaScript Code: Place the provided JavaScript code into your webpage.

  6. Insert Subscribe Button: Implement the Subscribe button into your webpage to prompt users to opt-in for push notifications.

  7. Note: Insert it right before the closing </head> tag to enable push notification functionality.

  8. Note: Insert the code provided at the end, wherever you want the Subscribe button to appear.

You've successfully embedded push notification code into your website. Now, enjoy the benefits of direct and instant communication with your audience!!

Did this answer your question?