Firebase Analytics multiple table events - firebase

I am using Firebase Analytics to send some custom information from inside of the app iOS and android app. For some reason, when i see the values inside of Google BigQuery, I see the data was pushed twice so I have too many repetitive values. How could I stop it from doing that? On iOS, I will sometimes see it posted 3 or 4 times. Here is a quick snippet from the android side:
mFirebaseAnalytics.setUserProperty("user_email", user.getEmail());
mFirebaseAnalytics.setUserProperty("location", locationValue);

When you set user property the value is persisted and uploaded with every subsequent data upload. If you like to record something that happens at given moment in time you should log an event.
See Set User Property documentation for more details.

Related

Metrics and dimensions are not showing up for hits of type 'event'

I have a fully functional and working code (written in C#) which purpose is to track some hits to the specified GA property. This code has been tested and still works successfully. It adds some predefined dimensions (like App Version) to each hit and a several custom metrics to a certain hit types (like event with a certain Event Action).
So far so good everything works flawlessly when taking into account the first property to which these hits are being sent. Also everything is fine when I set up a brand new GA property and track my hits to it - that is, I'm able to see events in Realtime reports, and events show up in custom reports after a while so that I can see my custom metrics.
The issue is that when I try to send absolutely the same hits to the existing property which had been created and configured ages ago - there is no both dimensions (even predefined) and custom metrics in my custom reports. I see these events in realtime and behavior reports, and I'm even able to create a custom report against events count - but that's it. I'm able to use for example Day of the month as a primary dimension, but when I try to use App Version as a dimension or my custom metrics as report metrics - it says "There is no data for this view.".
I've already tried everything I could, have read almost every post about custom definitions in Google and viewed almost each related SO question and answer - still with no luck.
We use measurement protocol
There is a correct User Agent being sent with each hit
17 days has passed since my first attempt to track these hits with existing property
There is no filters and segments at all
There is only one view
For me it looks like a property misconfiguration, but I've inspected each configuration page (I have all possible rights granted) and have not found anything related.
Will appreciate any help with this issue.
UPD: The hit itself (with the sensitive data replaced):
t=event&ec=session&ea=connection_end&el=b225d53a-6bb2-8021-f7b5-ae7004ae0a00&cm1=174960&cm2=1751494&cm3=479033&tid=UA-XXXXXXX-X&cid=4119e77f-be87-4530-04d3-33882f8eea77&v=1&av=XX.XX.99.555&an=my-awesome-app&aid=app.awesome.my
UPD: Here is what I'm trying to achieve (screenshot was made at the test property, where everything works like a charm):

How to see the Firebase Event Analytics with custom parameters in CSV report?

We've developed a Flutter mobile App and we've firebase account.
For our App we need to add Firebase analytics for the App Events such as button clicks.
We've integrated the Analytics SDK in the Mobile App and created an Events with custom parameters and we can see the count of Events and Users counts in the Firebase Excel/CSV report but we're unable to see the custom parameters in the report.
Our requirement is to see the Events analytics reports with the custom parameters in CSV report without linking the Bigquery. Please advise with the steps.
Thanks!
Custom parameters are included in the download as a CSV report. You can actually replicate this using the Firebase demo project. Go to Analytics > Events > click on level_complete event. In the level_complete page, you will see the level_name parameter card and its values. When you download this as CSV, you can see the list of level_name values in the file with metrics such as the number of times it has been logged and number of users who logged it.
Please note that when you register custom parameters, a data card for each parameter is added to the related event-detail report. However, it may take up to 24 hours for the data card to appear. During this 24-hour period, you may see (not set) appear as a parameter value. Once that initial 24-hour period has passed, you will see the expected parameter values from that point forward. See this documentation for your reference.
For seeing parameters in firebase dashboard as well as in csv report first check if the event is triggered in DebugView and then you need to define some custom definitions.
In new custom definition choose from your previously given parameters. Normally it takes several hours to get the parameters in event parameter.
The parameter will be shown in Dashboard as event parameter after 24 hours and you can download it as CSV/pdf
Also for analyze data you can use Google Data Studio which imports your data from analytics and helps to generate different types of graphical reports according to your need.

Updating user properties in Firebase takes too long

I am using firebase for my mobile Android and iOS app and I want to send push notifications based on specific user properties that I set (push notifications topics don't work for my use case).
So now when I set a user property in via the app it takes forever for that change to be propagated. For example, I do have a property club which was set to a value x. I can successfully send push notifications to those users. Now when I change the value to club = y and this change will take forever to go through. Which means that all notifications sent to club = x will still be received on those devices.
To set user properties I use the firebase_analytics plugin for flutter as follows:
FirebaseAnalytics analytics = FirebaseAnalytics();
analytics.setUserProperty(name: 'club', value: 'some value')
Since I am using the user properties to set notification settings this delay is not acceptable. Does anyone know how to make this work with firebase? Or are there any guarantees at least after which amount of time these user properties get updated?
I don't want to use other services such as OneSignal etc. but stay in the firebase ecosystem completely if possible.
Per the Analytics doc
Note: Once the property is registered, it can take several hours for data collected with the property to be included in reports. When the new data is available, the user property can be used as a report filter or audience definition.
Which is what I assume is the cause for your delay.
Topics would be the way to go, but since as you mentioned it is not viable, you could set custom claims for the user and filter it that way as mentioned here but performance might not be great since you have to retrieve all your users first.
You could create a club collection in Firestore and for each clubName document have a toNotify subcollection containing the userIds as document name. In this context users would remove themselves from the previous clubName and create a new doc in the newClubName.
Keep in mind this has the potential of causing quite a lot of read operation depending on the frequency you send notifications and the size of the your userbase.

Custom events in Firebase

I know this has been discussed a lot on SO, but even based on the previous questions and answers I still can't quite understand the details of how event logging is really supposed to work in Firebase.
Let's say somewhere in my code I have this:
FirebaseAnalytics mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
Bundle bundle = new Bundle();
bundle.putInt("card_id", 912);
mFirebaseAnalytics.logEvent("card_open", bundle);
Do I understand correctly that the "card open" even should now appear in Firebase Console with the "card_id" parameter?
Then I click More > Edit parameter reporting, enter the name of the parameter I added in my code, and it should appear on the list.
I have read the docs several times, but I still can't get it. Can I not even use any of the events and parameters provided by FirebaseAnalytics.Param and FirebaseAnalytics.Event and just send custom events/parameters (within the known limits, of course).
Another question is whether the limit on the number of global parameters force you to use Big Query?
Thank you!
You're correct. You should see the card_open event with card_id parameter in the analytics console.
Note that there's a delay in the analytics reporting, about 4 to 6 hours after it was logged and uploaded by the device.
Just to ensure that your implementation is correct. I mean, to verify that the events, parameters and user properties are logged in the right time and the right place correctly, use the DebugView console.
I also believe that you should be able see the card_id parameter in the custom reporting for card_open event, considering the delay in the reporting.
For your last question, the parameter limit is on a project level perspective now, compared before that it was per app. Parameters with the same name across different apps will be counted as 1. Not sure, maybe Firebase would like us (developers) to use the parameters accordingly.

How to delete an Analytics Event from Firebase

How can I delete an Analytics Event from Firebase?
While I am testing I wrote some events in Firebase Analytics. Firebase by default orders all events alphabetically. So these testing events interrupts with original events.
I could arrange them by count to push all the testing events to last. But it makes difficult to find the main events since those are not alphabetically sorted.
I didn't find any options in Firebase dashboard to delete a event. Is there a way to delete the old events from firebase?
There is currently no way to delete events once they are logged into Firebase Analytics that I am aware of. However, the events will drift out of the default view (which is set to "last 30 days") as time goes on, or you can switch the time period to a shorter time. As you mentioned, you can also click a column header to sort by some other value or "add filter" to filter by an audience or user property.
You can create a new Firebase project if you want to start from scratch. It's also a fairly common practice to use one project for experimentation and validation of your analytics implementation and then to switch to your production Firebase project when everything looks good.
It is not possible to delete analytics events AFAIK, but on some views you can set up the time interval with the filter at the right-top corner to limit the listed events. In the audience set up you need to rely on typing, I am afraid.
As of 31 May 2018, there is an API for this. Doesn't delete individual events, but you should be able to use it to delete all the events collected by a particular app instance:
User Deletion API v3 (UserDeletion.userDeletionRequest)
It was introduced in this blog post and the intended purpose (user privacy) is described here (last paragraph).
Unfortunately, based on my own question, no one seems to have figured out how to get it to work :(
EDIT
Turns out that, according to Google, this API does delete events (which technically is what the OP was asking), but since the aggregate total remains visible on the Firebase console, it won't help with the OP's specific use case.
As Steve Ganem suggested the simplest thing you can do to reset the Firebase Analytics data is to register new Firebase project and that in your app. You can also keep the old project around for debugging/development.

Resources