You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 5, 2022. It is now read-only.
It was a mistake not to record these calls to GA. We know how many notifications were sent from GCM, and how many user clicks on notifications, but not how many push events the sw's actually recieved :(
AFAIK, the standard Google Analytics JS library won't play nicely with the ServiceWorkerGlobalScope, and I don't think there's an official way of constructing GA ping URLs "by hand".
One approach would be to use IndexedDB to queue up details about the incoming push events and then generate GA pings based on those IDB entries whenever the site is loaded, e.g. here. But that will end up undercounting, since there's a percentage of users who would get a push event but never bother clicking through to the website, or who clickthrough the website after X number of days have passed.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It was a mistake not to record these calls to GA. We know how many notifications were sent from GCM, and how many user clicks on notifications, but not how many push events the sw's actually recieved :(
https://github.com/GoogleChrome/ioweb2015/blob/e33352f89034e77f54afdb1fc685439f3962803a/app/scripts/shed/push-notifications.js
cc @jeffposnick
The text was updated successfully, but these errors were encountered: