Analytics Integrations
Integrating OneSignal with any Analytics vendor
Each OneSignal SDK provides methods for tracking notifications, subscriptions & permissions, and prompting events. Data from these methods can be sent to your analytics tool.
OneSignal also provide Default UTM Parameters which can be appended to your Launch URLs automatically when sending push from the OneSignal Dashboard.
Also, see our Analytics Overview for more details on pulling analytics.
See these events in action!
See the recorded webinar going over Google Analytics Setup.
Notification Events
Received: Send an event to your analytics system from the SDKs Notification Received event handler when a notification is received.
Clicked: Send another event to your analytics system from the NotificationOpened or Action
event handler when a notification is clicked.
Event | SDK Method | Details |
---|---|---|
Track Notification Received | Handle Notification Received Method | Android - Method fired when the notifications is received. Doesn't work if App is Force Quit. iOS - Method fired when notification is received while app is in-focus. Web - Method fired when notification is received while site is in focus. |
Track Notification Clicked | Handle Notification Click/Opened Method | Method fired when the notification is clicked and opens the app or website. You can automatically add UTM parameters to push notification URLs through the OneSignal Dashboard. |
- OneSignal also provides Webhook support for websites only.
Subscription & Permission Events
Send a subscription event to your analytics system from the SDKs PermissionObserver
event handler when a user subscribes.
Event | SDK Method | Details |
---|---|---|
Track Subscription Event | Subscription Change Observer Event | Method fired when user changes subscription status. |
Track Permission Event | Permission Change Observer Event | Method fired when user changes permission status. Use to track: - Notification permission prompt shown (iOS) - The user accepting or declining the permission prompt - Enabling/disabling notifications for your app in the App Settings and after returning to your app. - Using setSubscription method to manually turn off push. |
Prompt Impressions
You can use the permissionPromptDisplay method to send an event to your analytics tool from your page's code, like so:
Event | SDK Method | Details |
---|---|---|
Track Native Prompt | Web: Notification Permission Change & Notification Permission Display iOS: Permission Change Observer | Methods fired when the required prompt by the Browser or Operating System shows to the user and the choice the user made. |
Track OneSignal Slide Prompt | Slide Prompt Events | Multiple methods for tracking events triggered on the Slide Prompt including the Slide shown , allowed , canceled , and closed . |
This will create an event in your analytics tool that you can track and filter by day, week, month, landing pages and browsers.
Updated about 2 years ago