# OneSignal integration problems

**URL:** <https://forum.mautic.org/t/onesignal-integration-problems/10388>\
**Category:** Product Support\
**Created:** [March 28, 2018, 10:52am UTC](https://forum.mautic.org/t/onesignal-integration-problems/10388 "2018-03-28T10:52:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Petykemano](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/petykemano/32/161_2.png) [@Petykemano](https://forum.mautic.org/u/Petykemano)\
**Post date:** [March 28, 2018, 10:52am UTC](https://forum.mautic.org/t/onesignal-integration-problems/10388/1 "2018-03-28T10:52:41Z")

</div>

I’ve encountered a problem during Onesignal Integration Setup.

I did setup of the plugin properly, I did set all the credentials and checked all the features I wanted to use:

Enabled features

- Mobile app notifications
- Enabled on landing pages?
- Welcome notification
- Enable on tracked pages?

I followed the instructions on these tutorials:

- [Web notifications | Mautic](https://mautic.org/docs/en/notifications/index.html)
- [https://mautic.com/help/web-notifications-mautic-landing-page/](https://mautic.com/help/web-notifications-mautic-landing-page/)
- [https://www.youtube.com/watch?v=BUfxw1Iq11k](https://www.youtube.com/watch?v=BUfxw1Iq11k)

However it doesn’t seem to work.

1. I inlcluded mautic JS tracker in my webpage. The onesignal javascript gets included, yet I get no popup
2. On a mautic landing page I don’t even see that the onesignal javascript gets loaded. However when I check the html source, there is this javascript snippet in the header:

```auto
<scr ipt data-source="mautic">
disable_notification = true;
</scr ipt>

```

I dag into the code and found that `app/bundles/NotificationBundle/EventListener/PageSubscriber.php` puts this js snippet out.

```auto
public function onPageDisplay(PageDisplayEvent $event)
    {
        $integrationObject = $this->integrationHelper->getIntegrationObject('OneSignal');
        $settings = $integrationObject->getIntegrationSettings();
        $features = $settings->getFeatureSettings();
        $script = '';
        if (!in_array('landing_page_enabled', $features)) {
            $script = 'disable_notification = true;';
        }
        $this->assetsHelper->addScriptDeclaration($script, 'onPageDisplay_headClose');
    }

```

When I var\_dump **`$settings`** and **`$features`** I get this:

> ``` object(Mautic\PluginBundle\Entity\Integration)#876 (9) { ["id":"Mautic\PluginBundle\Entity\Integration":private]=\> int(1) ["plugin":"Mautic\PluginBundle\Entity\Integration":private]=\> NULL ["name":"Mautic\PluginBundle\Entity\Integration":private]=\> string(9) "OneSignal" ["isPublished":"Mautic\PluginBundle\Entity\Integration":private]=\> bool(true) ["supportedFeatures":"Mautic\PluginBundle\Entity\Integration":private]=\> array(2) { [1]=\> string(28) "landing_page_enabled" [2]=\> string(21) "welcome_notification_enabled" [3]=\> string(21) "tracking_page_enabled" } ["apiKeys":"Mautic\PluginBundle\Entity\Integration":private]=\> array(4) { ["app_id"]=\> string(229) "********" ["safari_web_id"]=\> string(257) "********" ["rest_api_key"]=\> string(257) "********" ["gcm_sender_id"]=\> string(197) "********" } ["featureSettings":"Mautic\PluginBundle\Entity\Integration":private]=\> array(2) { ["subdomain_name"]=\> string(30) "{mydomain}" ["platforms"]=\> array(1) { [0]=\> string(7) "android" } } ["changes":protected]=\> array(0) { } ["pastChanges":protected]=\> array(0) { } } array(2) { ["subdomain_name"]=\> string(30) "{mydomain}" ["platforms"]=\> array(1) { [0]=\> string(7) "android" } } ```

In this latter array I se no mention of the enabled features that I checked on the plugin configiration panel.

What do I do wrong?

---

<div class="post-metadata">

**Author:** ![Petykemano](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/petykemano/32/161_2.png) [@Petykemano](https://forum.mautic.org/u/Petykemano)\
**Post date:** [March 28, 2018, 10:55am UTC](https://forum.mautic.org/t/onesignal-integration-problems/10388/2 "2018-03-28T10:55:21Z")

</div>

tested on 2.12.2
