-
Notifications
You must be signed in to change notification settings - Fork 927
analytics.isSupported should return false in a Chrome Extension environment #3522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Side note: I really wish Firebase Analytics supports Chrome Extensions. I initially implemented it for my extension, but had to rip it out for analytics.js. Not sure why Firebase Analytics doesn't when analytics.js works fine. |
Firebase Analytics works on top of I suppose you were using the measurement protocol v1? |
The reason Google Analytics in general has trouble with Chrome extensions is because they have a chrome-extension:// protocol instead of http:// which analytics code normally rejects. analytics.js has an option called There's a question here that covers this dilemma. If |
I see, thanks @Feiyang1 @hsubox76. It's frustrating to have to fight the web vs. app battle over the past decade. Web apps are apps too. Routes are just root views. JavaScript and browser are just implementation details. How we think about user behavior doesn't change. I know this is more of an issue with Google Analytics. I appreciate what you guys do on Firebase. |
The fix has been released 7.18.0 |
Would it be possible to wrap analytics.js too, at least partially? Is there any reasonable workaround to provide data to Firebase Analytics? |
As mentioned above, You can look at #2644 mentioned above for a workaround some people have come up with based on a currently unstable API. If finding a workaround is very important, despite the unstable API and manual steps, you can look into trying something like what they have done. |
Thanks for the reply. I will check the above link. The goal is to be able to access Analytics data in Firebase too, so that I can access the data in services such Remote Config. |
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
Steps to reproduce:
Initialize in a Chrome Extension popup window.
analytics.isSupported
should return false but returns true.According to https://firebase.google.com/support/guides/environments_js-sdk, Firebase Analytics is not supported for Chrome Extensions.
Relevant Code:
The text was updated successfully, but these errors were encountered: