Firebase Google Analytics Console weird behavior. Events are logged but don't show up on User Snapshot

落爺英雄遲暮 提交于 2020-03-05 04:04:31

问题


I'm using Firebase Analytics and I'm still exploring the Google Analytics Console.

I think there's something wrong with my data, or the way I'm logging it. I have a Single Page App built with React + Firebase.

Since my app is all client side routes, for every page that it renders, I'm firing the following effect to log the screen_view event:

useEffect(() => {
  firebase.analytics().logEvent("screen_view", {
    screen_name: window.location.pathname,
    page_title: "My Page Title"
  });
},[firebase]);

So far, so good. It runs without any errors, and it seems to be logging the event (or at least, I can see the events in some parts of the console).

Here is the test I did that came back with weird results.

Note: I'm monitoring through the Realtime tab over on Google Analytics Console.

I accessed my website, and click on 5 different links. After each page loaded, the screen_view event was fired and I could see this number for total events going from 20 to 25. I.e: my effects were fired and my events were logged!

When you click on "Trending" you open up a window with the count per event type in the last minutes, and I could see the screen_view events going from 12 to 17, which is all correct, so far.

But since this is a new website and I'm currently the only user, I was able to click on "View user snapshot" and see my own activity in the report, and it's supposed to be in real time.

But the weird thing is that my screen_view events don't show up in the snapshot AT ALL. Not on real time and it's not a delay issue. They just don't appear in my user activity.

QUESTION

What is going on here? Am I doing something wrong? Weren't my events supposed to appear in my user's snapshot timeline on Real Time (or even with some delay)? This is getting really difficult to learn and test if I can't see the results of my code logged on screen.

Is there a better way to test this? I mean, I need to update my code and be able to see the changes in the events a user triggers.

来源:https://stackoverflow.com/questions/59944747/firebase-google-analytics-console-weird-behavior-events-are-logged-but-dont-sh

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!