Hello all.
I am trying to develop “web_pixel extension” (strict scope → web worker). Main purpose of this extension should be to listen to standard events (page_viewed, search_submitted, …) and perform hit to our analytics.
This can be achieved by fetch()
calling inside worker, but we would like to use script (publicaly available on our endopint). This script we can inject via “app theme extension” and call its methods in main JS scope.
But is there the way, how to pass information from “web pixel” worker scope to main context?
Or is there any other way, how to subscribe to standard events outside od web pixel scope (ideally in main JS scope)?
Thank you very much