This tutorial walks through the steps to install Aimtell's web push notifications with Cloudflare.
Step 1. Add your website
To add a website to your Aimtell account log into your dashboard (https://dashboard.aimtell.com/login) and go to "Websites" > "Add Website".
At this point you are presented with three areas to fill out:
The majority of browsers require your website to support HTTPS in order to have visitors subscribe. If you are unsure if your website supports HTTPS, please refer to: This article.
Then click on the green 'Next Step' button.
2. Upload the tracking code to your website
Once your site is ready you will need to install the tracking code and upload the required files. The tracking code will be displayed here in 'Step 1'. Copy and paste the snippet on the footer of every page you wish to track (note: you must install this on the homepage in order to properly work).
3. Install the aimtell-worker.js file in Cloudflare
Next up, log into your Cloudflare account and head to Websites > Workers > Launch Editor.
Once on the editor, copy and paste the following snippet of code on the left hand side and hit "Save".
It should look like this
Additionally, check the routes tab and ensure it is set up like the following (replacing "yourdomain.com" with your domain.
If done properly, visiting yoursite.com/aimtell-worker.js should now show the importScripts text.
Now your website should start prompting visitors to subscribe when they visit it. If you'd like to manage which pages prompt users to subscribe, check out Subscriber Permission Prompt Management