OneSignal Help & Documentation

Welcome to the OneSignal New IA developer hub. You'll find comprehensive guides and documentation to help you start working with OneSignal New IA as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Discussions

Analytics Integrations

Integrating OneSignal with any Analytics vendor

Each OneSignal SDK provides methods for tracking notification, subscription & permission, and prompting events. Data from these methods can be sent to your analytics tool.

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.


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 a month ago



Analytics Integrations


Integrating OneSignal with any Analytics vendor

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.