Here's our step-by-step guide on how to install our Subscribers web push tool on your ghost.io website.
First, you will download the Service Worker file from the Subscribers dashboard, note that this Service Worker file is essential in maximizing the functionality of the tool.
Navigate to your Subscribers dashboard under Settings> Install > then click on the
"Download Service Worker File" under Manual Installation.
Next, in your Ghost dashboard, Navigate to Settings > Design > Change theme
Open Advanced section and download the active theme.
Next, copy the Service Worker file on your computer then open the theme folder and then paste the service worker file in the assets > js folder
Once added, zip the theme content for uploading to Ghost.
Next, upload the theme to Ghost using the Upload theme option.
Navigate under Settings> Design> Change Theme> Click on Upload theme and then upload your theme and hit on Activate.
Once done, you can check if the Service Worker file was added properly or not by opening https://your-site.com/assets/js/firebase-messaging-sw.js in the browser.
The next step is to navigate to your Ghost CMS Settings> Code injection and then copy the following code and paste it into the Header section.
window.subscribersServiceWorkerScope = '/assets/js/';
window.subscribersServiceWorkerPath = '/assets/js/firebase-messaging-sw.js';
Now, we're almost done with the installation, we just need to install the Subscribers script from your Subscribers dashboard under Settings> Install > Manual Installation.
And finally, add the script in Ghost under settings > Code Injection> and paste it just right below the previous script provided.
Lastly, navigate back to your Subscribers dashboard here https://app.subscribers.com/settings/install then click on "Verify Installation".
And you're all set!
Let us know if you have any questions or concerns by contacting us either through chat or email at [email protected]