Support for Web Extension Service Workers
We've just upgraded our Chrome extensions to MV3 and are unable to collect analytics in our background script (service worker).
Are there any workarounds for this? I see Partytown mentioned but we're not using this tool and believe there must be a simpler solution.
Currently, the library internally writes the anon id to localStorage. This presumes the environment. Ideally, the AnalyticsBrowser could accept some kind of storage API with a getItem, setItem, removeItem API? This way we could pass it the chrome.storage.local object.
Something like:
new AnalyticsBrowser({
storage: chrome.storage.local
})
Is there any movement on this? The lack of support for chrome extensions is make/break for us.
Chasing this. We have a huge gap in our extension's analytics currently owing to this issue.
+1 this is sorely needed