Follow these steps to install Aimtell on a Magento website.
- Your Magento website should be SSL certified for the push notifications to work.
- Disable Content Security Policy (CSP) for Magento platform 2.4. By default, the CSP policy is enabled in Magento 2.4.
Step 1: Add your website
To add a website to your Aimtell account log into your dashboard and go to Websites > Add Website.
On this screen there are three areas to fill out:
- Icon: The default image you want to use for your push notifications. You'll be able to change it on a campaign by campaign basis, but this will be the default.
- Name: A custom name for your site (this is shown to users on some browsers such as Safari).
- URL: The URL of your site (be sure to include "https://" such as "https://aimtell.com").
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.
Step 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 in Step 1 (see above image). Copy and paste the snippet on the ‘Scripts and Style Sheets’ text box in your Magento website admin panel:
From the Admin Panel Content Menu navigate to Design > Configuration. The store view page that lists all the store links should be displayed. Click on your store, and the theme configuration page will show up. Under the HTML head tab, you will see the “Scripts and Style Sheets” field. Place the tracking code here.
Step 3: Clear the website cache under your Magento website admin panel
Head to System menu >Tools > Cache Management > click the 'Flush Magento Cache' button.
Step 4: Upload the aimtell-worker.js file to your website
Download the required aimtell-worker.js file and upload it to your Magento site’s ‘pub’ directory. For example, if your Magento installation presents under a folder named “magento2” then place this file under /magento2/pub/. If you are unsure about where to place your Worker - please reach out to Aimtell Support for guidance.
After following the information above, click "Create." Our software will prepare all the requirements on your behalf and in a few seconds, your site will be created.
That's it! Check your site for the Prompt after making sure to do a Hard Refresh, and you'll be good to go.