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
We are buiding a chrome extension, which will be active on any active browser tab. To send the events we need to register the amplitude with service worker. Putting Amplitude in popper won't be a complete solution for us. is there a way we can use it with service worker?
The text was updated successfully, but these errors were encountered:
the above case pertains to the manifest v3 of chrome extensions, especially trying to load amplitude in background rather than popup or content scripts. In mv3, the background (persistent) script has been replaced by service worker.
The amplitude-js library fails to load and throws error 'ReferenceError: window is not defined'. which is understandable as service-worker doesn't have access to dom and dont have access to window global object. not sure if changing window to self will help.
We just released v8.14.0 which includes support for web worker environments. We'd totally appreciate if you can provide any feedback on this new feature.
Summary
We are buiding a chrome extension, which will be active on any active browser tab. To send the events we need to register the amplitude with service worker. Putting Amplitude in popper won't be a complete solution for us. is there a way we can use it with service worker?
The text was updated successfully, but these errors were encountered: