OneSignal Features - Integrating OneSignal with Google Analytics
By UTM parameters
utm_source
(eg. “onesignal”), a utm_medium
(eg. “web-push” or “api” vs “automated” vs “dashboard”), and a utm_campaign
parameter (eg. “promotional-offer-template-123”). Next, add these parameters to your url, like so:https://yoursite.com/your-page?utm_source=onesignal&utm_medium=web-push&utm_campaign=promotional-offer-template-123
After this, in Google analytics you can visit the Acquisition -> All Campaigns view to see all the campaigns you have sent and filter by day, browser, or campaign.By page JavaScript
Tracking impressions of the opt in request pop-up
permissionPromptDisplay
event to track if the prompt actually displays to the user. If no permission prompt is displayed, the user cannot opt-in to push.Permission prompt change events
permissionChange
event to detect when a user changes their permission status on the browser. This is best for tracking actual opt-ins on the site after the permission prompt is displayed.Tracking push subscription change
change
event to track when specific users subscribe or unsubscribe from web push. This will fire after the user opts-in and/or if the user opts-out using the prompts.Tracking notification receipts & dismissals