iZooto Blog l Opinions, Trends & Guides on Audience Ownership

How To Migrate Subscribers To Another Web Push Notification Platform

Written by Pravya Pravin | Dec 22, 2016

At iZooto, almost on an everyday basis we are asked this question, so I decided to put down this post. In this post, I will cover how websites operating on HTTPS protocol can migrate the notification subscribers from one web push notification platform to the other without losing a significant base. The process differs for Chrome, Firefox, and Safari. Let’s discuss each of these in detail.

Chrome & Firefox:

You must have read about Chrome allowing developers to handle offline experiences and background syncs on web pages, for managing push notifications to engage with web visitors with the help of service workers. Service worker is a background script that owns and controls the web pages of the domain where it’s installed. Firefox also manages push subscriptions through service worker.

How Does Subscription Work ?

To understand the subscriber migration process, you need to understand the basics of notification subscription. Let’s take a step back on understanding what happens in the background.

Whenever a user visits a web page, he is prompted to subscribe to push notifications. A service worker is registered for the domain, it manages communication through push notifications for subscribed users further. Whenever a notification is due against a subscriber, service worker takes over, gets the notification content, displays it to the subscription, redirects him to a landing page.

Nomenclature for service worker may differ from one vendor to other. At iZooto, we refer to it as service-worker.js, it’s usually placed at root directory. Please note that service workers are supported on HTTPS domains only. Websites operating on HTTP typically end up taking subscriptions on a third party domain. For instance, an HTTP website http://myonlineshop.com would take subscriptions on https://myonlineshop.izooto.com with default configuration on iZooto.

Hygiene Checks:

  • Domain Ownership: Every subscription is tied to the domain the user is subscribed to. Hence it’s critical that the subscriptions are taken on your own domain and not on someone else’s. For HTTPS websites, this part is taken care with the implementation as subscriptions are taken on the same domain. HTTP websites should ensure that subscriptions are taken on their own domain or a sub-domain. Users should subscribe to https://www.yourwebsite.com or https://notify.yourwebsite.com and not to https://yourwebsite.serviceprovider.com.
  • Subscriber Ownership: Ensure that you are using your own GCM / FCM Sender ID for Chrome. All notifications pushed to Chrome subscribers flow through the FCM project configured, it’s critical that you create and own this project.
Subscription Domain FCM Details (For Chrome) Migration Possible?
https://myonlineshop.com

Your own

Yes. Subscribers visiting your website again can be migrated
https://myonlineshop.com

Vendor’s

Yes. Subscribers visiting your website again can be migrated
https://notify.myonlineshop.com

Your own

Yes.Subscribers visiting your website again can be migrated
https://notify.myonlineshop.com

Vendor’s

Yes. Subscribers visiting your website again can be migrated

 

https://myonlineshop.izooto.com

Vendor’s

No


What happens when a user clicks on “Allow” Notifications?

A unique subscriber key is generated for each ‘Allow’ action, which is used to send notifications against. All the users who click on ‘Allow’ become a part of your subscriber base.

Migration and the finer nuances

Once you have finalised the new service provider, here is what you need to do -

  1. Check the file name of the old service worker
  2. Rename the service worker file of the new provider
  3. Update the service worker js

What about the new visitors ?

The moment you go live the updated service worker, manifest and Javascript on your website, web push notifications are activated again and new users will be prompted as usual. Nothing changes here.

What about the users who have already subscribed to notifications - Will they be prompted again ?

No. Your old subscribers will not be prompted for subscription. In the background, the service worker registered on the user’s browser will get updated. What this means is that you will be able to send notifications using the new service provider.

Is there a way that I can migrate all the subscribers at a single shot ?

No. As your old subscribers visit your website, your old subscribers will automatically get migrated to the new platform and their numbers should start reflecting. What this means, you will now be able to send notifications to these subscribers using the new service provider’s tool .

Can I use both the tools to send notifications?

You may. However it’s not recommended as sending notifications from the older vendor might bring migrated users back. You should always send notifications from the newer tool.

How long will it take to migrate all subscribers ?

Depends completely on your share of repeat traffic. The higher is your repeat traffic, the faster is the migration. This also depends on the repeat frequency.

Will my subscribers get two notifications ?

No. As the domain to which subscribers are linked remains the same, subscribers won’t receive same notification twice.

Safari

Safari push notifications are supported for both HTTP and HTTPS sites on OS X. Subscriptions are linked to a APN push certificate and to an end-point URL on which subscriptions are stored. Ensure that you create the required APN certificate through your own Apple developer account.

Here’s how to generate APN for your domain - https://developer.apple.com/notifications/safari-push-notifications/

More details about subscription here:

https://www.izooto.com/how-web-push-api-works/