Troubleshooting & FAQs

FAQs

Q.1 I am not getting Chrome Push Notification on my Mac?

A. If your Chrome is in full screen on Mac OS, you will not be able to see any Chrome Push notifications. This is a known issue with Chrome full screen on Mac OS and we will update you when it is fixed by Chrome/Apple.

Q.2 I am not getting Chrome/Firefox/Opera Push on iOS?

A. Currently, Chrome Push is supported for Chrome (version 42+) on Mac OS, Windows (only Desktop), Linux and Android. Firefox push is supported for Firefox (version 44+) on MacOS, Windows (only Desktop), Linux and Android. Opera push is supported for Opera (version 37+) on MacOS, Windows (only Desktop) and Android.

Q.3 How do I change the Push Opt-in process?

A. Sure, you have three options which you can refer to in this article. You also have an option to self-handle push opt-in on specific pages or website events as mentioned here.

Q.4 I wish to customize Notification permission opt-in banner/nudge.

A. You can customize the time (after which to show banner/nudge), Text, Fonts & Font-size as mentioned in this section.

Q.5 Will I receive Web Push on mobile web?

A. We support both mobile and desktop web - so you receive push on mobile if your website is subscribed for push on mobile. Even if you have a different mobile website, you can integrate in similar fashion and send Web push.

Q.6 How do I get FCM credentials?

A. We depend on FCM Project Number and its corresponding API Server Key to send Chrome Push notifications. To get these refer to our documentation to get your own credentials

Q.7 I am facing issues in integration. Whom do I contact?

A. You can always reach out to us directly from your MoEngage Dashbaord -> Need Help? -> Contact Support or drop us an email at [email protected]

Q.8 What is difference between TEST & LIVE environment?

A. MoEngage Account provides you an option to test your integration in a staging/debug environment which we refer to as TEST environment. LIVE environment is meant to contain the data about your actual users/customers from your live website.
Our Web SDK uses a parameter debug_logs: 1 to detect that you are integrating in TEST environment. When you decide to take your website LIVE, just pass the parameter debug_logs: 0 and all data about your actual users would start appearing in LIVE environment

Q.9 How do I test Web Push Notifications?

A. Many times before creating a Web Push campaign, you may wish to see how the push message actually appears. You can do this by entering your Device Push Token under Campaign Creation -> Scheduling & Goals tab -> Test Campaign section. To find your Device Push Token for your website on the Chrome browser, please follow these steps:

  1. Go to your website where you have given the push permission.
  2. Right Click --> Inspect
  3. Click on Application tab as shown in the image below
  4. On the Left pane under Storage, click on Local Storage
  5. Under Local Storage, click on your HTTPS Website URL or HTTPS Subdomain (https://yourwebsite.moengage.com) for your HTTP Website
  6. You will find a Key MOE_DATA. Look for the PUSH_TOKEN field. Kindly copy the corresponding Value and paste it under Test Campaign Section -> Device Push Token.

Or you can install the Moengage Chrome Extension to see it easily.
Follow this doc

Q.10 On clicking Push Notifications on Firefox Android, it did not redirect me to Firefox browser?

A. This is an anomaly observed in Firefox for android. If the notification was supposed to redirect you to http://example.com
Case 1:
Firefox is open when the notification is clicked:

  • You are redirected normally.
    Case 2:
    Firefox is in the background when the notification is clicked (You’re on the home screen or on some other application):
  • Nothing seems to happen when you click the notification. But, you are actually redirected in the background. So when you open firefox next, you’ll be on http://example.com.
    We have raised this issue with Firefox support and are waiting to hear back from them.

Troubleshooting

- Not able to debug SDK in test environment.

A. debug_logs should be set to 1 while initializing the moengage SDK.
Please refer the sample code

- Logs are showing in console of browser in live applications.

A. debug_logs should be set to 0 while initializing the moengage SDK.

- Push notification not working? ServiceWorker giving error?

A. Follow these steps:

  1. Are you using your own custom serviceworker file? Please include the moengage serviceworker code into your serviceworker file.
  2. Is the serviceworker file not in the root path? You need to add swPath with the path of the serviceworker file while initializing the moengage script.
    Please refer the sample code

- Opt-In not showing up.

A. Follow these steps:

  1. Check the moengage dashboard whether you have configured domain type as http or https and the same is your application domain url.
  2. You may be using some other Push notification provider and their serviceworker is overlapping with moengage servieworker
  3. Check the serviceworker file. It should contain the following code:
importScripts('https://cdn.moengage.com/webpush/releases/serviceworker_cdn.min.latest.js');

- Getting this error: Uncaught Reference Error: userID is not defined

A. It usually comes when the user Id is not passing properly when you are using GTM for moengage SDK.

- Getting this error: Error in Subscription: DOMException: Registration failed - storage error?

A. You are unregistering the serviceworker somewhere from your code. search for unregister() in your codebase and remove it.

- On site messaging campaign not appearing.

A. It may be because of the following reason:

  1. Check the Trigger Action condition whether it is matching or not
  2. If you have 'Selected Pages', then check whether the url is matching or not
  3. Check the segmentation on Audience is matching or not.
  4. Check the platform (Web or Mobile Web) is appropriately selected.

Getting this error: Refused to connect to `https://***.moengage.com/****` because it violates the following Content Security Policy directive:

A. You need to whitelist Moengage endpoints. Refer here

Getting this error: Uncaught ReferenceError: importScripts is not defined at serviceworker_cdn.min.latest.js:1 ??

A. Most probably you are trying to include serviceworker.js file in your html code like this: <script src="serviceworker.js"></script>. This is not at all required. Please remove it.