Installing the Service Worker
For your Push Campaigns to reach your subscribers, you will need to install a snippet of code on your store. Specifically, you are installing the Re:amaze service worker, which will be loaded on your customer's browser when they subscribe for push notifications. When you send a Push Campaign, Re:amaze will communicate with this service worker to display a push notification on that subscriber's device. Neat huh?
Step 2: Login to your BigCommerce store
In your BigCommerce store, Go to Server Settings > File Access (WebDAV).
Step 3: Sign in via your WebDAV client
Use the details from the previous step to sign into your WebDAV client. The pictures below are going to be using CyberDuck, which is a free cloud storage browser.
Step 4: Select folder via WebDAV client
After you have successfully signed in, open the "content" folder.
Step 5: Upload rmzServiceWorker.js to the content folder
Upload the file downloaded in Step 1. Make sure that it is named "rmzServiceWorker.js".
Now, the contents of rmzServiceWorker.js should be accessible on your store's domain. So, if your domain is https://example.com, the above snippet would be loaded under https://example.com/content/rmzServiceWorker.js. The Re:amaze service worker is now installed on your BigCommerce store!
Next Step: Re:amaze Embeddables
Your website must also have a Re:amaze embeddable or Base Installation Script installed. For more instructions on how to build an embeddable for your store, you can look at our article here. Once this is done, Re:amaze will be able to collect your customer's push tokens and add them as subscribers to your Push Campaigns!