Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Implement script

For browser security purposes, you need to host our script yourself. To do this, follow the instructions below:

  1. Create a file with the following code:

    Code Block
    importScripts('https://squeezely.tech/tracker/serviceworker.js');
  2. Name the file squeezely-worker.js

  3. Upload this file to the root folder of your website . For example, if your site is https://mywebsite.com , it should be accessible at https://mywebsite.com/squeezely-worker.js.

You should now have working push notifications. If not, check the console for error messages. If there are no error messages, check your local browser's notification settings. Otherwise, you can contact support@squeezely.tech for further assistanceBefore Push Notifications can be used, a script must be implemented on the website. You can read more about this in our API documentation.

Gathering Consent

To trigger the web push notification, web push consent is required. You can collect this consent by overlaying the following in the CTA url input field:

...