Specifying the Aimtell Worker File
Overriding the worker file is a bit more complex. The location of the worker file directly impacts which pages on your site can ask for push notifications. This is the reason for requiring it in the root directory by default.
If you can't add it to the root directory, you need to do two steps:
1. Update the worker file to pass a custom header: "Service-Worker-Allowed: /"
For instance, if you are using PHP you could create a file called updated-aimtell-worker.js.php with the following:
2. Reference the newly created file in your tracking code snippet.
After creating the above file, simply declare it using:
_at.worker = '/another/path/updated-aimtell-worker.js.php';
So it would look like: