leather-io / extension

Leather browser extension
https://leather.io
MIT License
287 stars 135 forks source link

Analytics in Service Worker #4033

Open kyranjamie opened 11 months ago

kyranjamie commented 11 months ago

Analytics aren't being tracked currently in the background script, owing to limitations with running the tooling in Service Workers.

We should figure out if there's a way to track correctly with the same id from multiple contexts.

Issue discussing here https://github.com/segmentio/analytics-next/issues/907

markmhendrickson commented 11 months ago

Is this currently having adverse effects on metrics collection, and if so, what kind?

kyranjamie commented 11 months ago

We never had many analytics events being fired from bg script, so there shouldn't be any noticeable impact to analytics going to MV3. The only ones are a few edge-case ones like worker_error_thrown_x, so no biggie there.

Many of the new analytics we want do require this feature however.