Technical implementation of CleverPush in Websites

These instructions are aimed at websites with HTTPS encryption.

 

Requirements – if not already done:

  1. Create a user account at cleverpush.com/register
  2. After logging in, create a channel with the type “Website”

 

Implementation

  1. Please navigate to Channels -> (select channel) in your CleverPush back office.
  2. There you will find the operation mode setting. Set this option to Own Domain (HTTPS).
  3. The cleverpush-worker.js file can then be downloaded by clicking the button.
  4. This file must now be placed in the main directory of your web server. So it should be available at https://your-domain.com/cleverpush-worker.js.Note: If you do not have the option of placing the file in the main directory of your website, you can define your own file paths under the operating mode setting.
  5. Now only the CleverPush Javascript snippet has to be integrated. The code for this is available in the channel settings in the sidebar under “Implementation”.This can be done in the <head> or in the <body> area of ​​the page.
    Google Tag Manager is also possible (with occasional ad blockers blocking the entire GTM code).

    1. In the Google Tag Manager, our Javascript code can easily be inserted as a “user-defined HTML tag”.

 

Troubleshooting – opt-in does not work:

  • Can the worker file be reached with the correct MIME type?
    • cleverpush-worker.js (application/javascript)
  • Are you installing your own ServiceWorker yourself in parallel? There are 2 options:
    • Integrate the line of code from cleverpush-worker.js in your ServiceWorker and adapt the file path accordingly to your ServiceWorker
    • Install the CleverPush Worker in a different subdirectory
  • When using your own file paths:
    • Paths should usually begin with a slash and do not contain any domains or protocols
    • Paths are absolute and not relative

If you have any further problems, please contact our support.

Start your free trial now

Non-binding test phase, ends automatically after 30 days