-
Notifications
You must be signed in to change notification settings - Fork 928
Firebase Analytics doesn't work for Web app #2600
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. |
Sorry to hear about your issues, @agordeev. Looking at your config, it doesn't seem to be an issue. The initial data logged usually takes up to 24 hours to display and 3-4 hours delay for the succeeding data. If the issue persists after 24 hours, given that you've properly added Analytics SDK, you may check the following:
|
First of all, are you seeing any errors in the console, or in the Network tab? Second, In the documentation linked above for DebugView, the Web tab tells you to install the Google Analytics Debugger Chrome extension that will let you set debug mode and view information that is (or isn't) being sent from that page. For a quicker and less user-friendly option, you can also look at your Chrome Dev Tools Network tab and check for a POST request to an endpoint that starts with Finally, just in case, check to see if your |
@rommelpe @hsubox76 thanks for suggestions.
PS: Hmm, interesting.. It records events if I use Google Chrome. But still nothing for Firefox and Safari. |
Do you get different results when you try this on localhost? Edit: I've tried your first snippet (with my firebaseConfig) in Chrome and Firefox on localhost and they both show a visit in the "Users in last 30 minutes" panel in Analytics > Dashboard. |
Same result if I try on localhost: Chrome works, but others don't. |
Hm, I've tried creating a raw Is there anything else you can think of that might be unusual about your environment? Private browsing? Iframes? |
No, that's a standard static one page website based on Bootstrap. |
I'm having the same issue:
I'm using the automatic configure way to setup firebase:
the measuurementId exists, I manually call |
if I go to GA and manually create a new Web StreamView and use google tagjs:
I will be able to see the data show up in my GA |
I am getting this same issue, using this same config. It would be great to get some feedback on how to address this issue.
|
So just to confirm, it is sending a request to that endpoint? Would you be able to share the contents of that request, with any proprietary strings redacted? For the second user, are you also seeing that network request sent? |
I'm sorry, I haven't been able to reproduce this. I've tried it with an existing project and a new project. I created an
Then I
When I went to the url created, I saw the POST to the Is there anything different that you can think of? For example:
I would like to track down what's going on here but since I can't reproduce it, we need to narrow down what the cause could be. |
I believe the issue is that in this documentation, it isn't apparent that you have to add this line after loading /__/firebase/init.js,
Once I added that, analytics started working. I didn't even add the logEvent('notification_received'); call, simply adding firebase.analytics(); will work. |
I was having the same problem, but @nickharder88's solution above worked for me. Thanks! |
I am also facing similar issue , I tried to user firebase analytics in chrome extension. Initially I don't see any analytics XHR calls. But even after 24 hours I don't see any data on dashboard. |
Just want to clear it up for everyone: I only put In order to initialize Analytics you only need the line I can ask the docs team to try to make it more prominent. As for not seeing it in the dashboard, if the POST request to the |
@hsubox76 when i initialise analysis with |
Sorry, I was trying to address the general idea that the logEvent('notification_received') is needed. Unfortunately, Firebase Analytics is not currently supported in Chrome Extensions. See the Supported Environments page for more info on where features are supported: |
Hey @agordeev. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
@hsubox76 what kind of info are you expecting? I'm still experiencing this on Firefox. |
See comment above for how I tried to reproduce it, and further questions whose answers might help me reproduce it: #2600 (comment) Any help in reproducing this in a fresh environment would be great. If I'm not able to reproduce it and no one can think of any further ideas for now that might reproduce it, I won't be able to make any progress pinpointing what is wrong and will close the issue. Don't worry, anyone can always add a comment if they have any new information or can put together a minimal repro that always exhibits this problem. But I would need new information, because comments along the lines of "I am also experiencing this problem" do tell us about the impact, which is important, but don't help us reproduce and debug. Edit: Also after feedback from some of the additional commenters, I do have an action item to update the Analytics "Getting Started" docs to make sure the |
I'm having the exact same issue. The GA addon doesn't log anything. Not sure if it matters but:
It works in google chrome. Events are being logged. it doesn't work in any other browser. Not even other chromium based browsers like Brave or Edge are working. What other info can we provide to help resolve this? |
Logs are not being recorder. import firebase from 'firebase/app'
import 'firebase/analytics'
import config from './config'
firebase.initializeApp(config)
firebase.analytics()
firebase.analytics().logEvent('login') Environment:
|
I have a similar issue. I have initialized firebase and the initial setup is in place. |
@AaliaLokhandwala can you please share your case that works locally ? |
Hi,
I initialized firebase and imported analytics and put some trackers on my
web application. When I use localhost and debug view using the Google
extension all the events are logged successfully.
However when the web application is hosted to a url, the events are not
logged anymore
Thanks for all your help,
Aalia Lokhandwala
…On Mon, Apr 27, 2020, 9:07 PM Jeremy Tenjo ***@***.***> wrote:
@AaliaLokhandwala <https://github.com/AaliaLokhandwala> can you please
share your case that works locally ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2600 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJOJUSVYVAVFCFP7G3RLICDROWRDVANCNFSM4KQWX7YA>
.
|
@AaliaLokhandwala can you share a code snippet 🙏? |
Sure this is the code snippet @tenjojeremy : firebase.initializeApp(firebaseConfig) |
@hsubox76 What info do you need for this issue? I mean, to satisfy the label "needs-info"? I can share my code with you (in a closed environment of course) if that helps? I'm available for a call for example to walk through this and help find the cause. |
I just had this issue until I disabled the uBlock Origin adblocker extension. Just incase somebody else forgets about that... 🤦♂️ |
I have set up a few tools to help debug, and also updated the documentation.
The purpose of these two repos is that they're minimal and confirmed to work in our dev environment.
I definitely want to sort out any Analytics bugs that are going on, but it's very tricky because of all the factors that could be involved. I hope some of this will be useful in rooting out extraneous factors and narrowing down the real bugs, which we can then get to fixing! |
@hsubox76 Thank you for your effort! It was uBlock Origin who blocked the requests. |
This. I'm using Brave and it's not having it. So Google Analytics is essentially useless for our platform then? |
Super helpful thread. Thank you all! @hsubox76, do you know if Firebase has any plan to support analytics for Chrome Extensions or if anyone's created a workaround? We're migrating an app over to Firebase at the moment and this is our last thing to figure out before giving the project a big green light. We currently use Google Analytics. |
I would be very interested in this as well. I want to use Firebase to A/B test features in a Chrome browser extension and I need analytics to work for this. |
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
I've added a web app in Firebase console to integrate Firebase Analytics:
The problem is Firebase Analytics doesn't show any data for the web app. Like the website has no visits at all. I tried few ways to integrate Analytics:
nothing worked.
Quite similar issue described here: https://stackoverflow.com/questions/58484726/firebase-analytics-not-showing-data-for-web-application with no answer.
By the way, I use custom domain.
The text was updated successfully, but these errors were encountered: