I have added Firebase Analytics events to my android app, and when I tested it with DebugView, I could clearly see the events and all their properties.
However, after launching the app, I can only see the events themselves, and the properties are missing.
I'm using :
val props = mutableMapOf<String, Any>()
props["test key"] = "test value"
Firebase.analytics.logEvent("action_test", props.toBundle())
As stated above, it works perfectly fine when I test it using the DebugView in Firebase console.
But when I go to Events sections, and click on some event, and then go to add filter, I cannot see the event properties.
The only thing I see is in that page, some statistics like the total number of events, etc.
In Firebase under "Analytics" click on "Events". Then click on the specific event you want to see the parameters of.
In your example the event name is "action_test", the parameter name is "test_key", the parameter values are the values of the map.
Now click on "action_test" in Events. It will open a detailed view for the event. Some cards will have as the title the name of the parameter.
It will take some time before the events are shown. Can be up to a couple of hours.
Related
I put some user properties in my android code such as:
(https://firebase.google.com/docs/analytics/android/properties)
mFirebaseAnalytics.setUserProperty("easy_account_connected", "true");
Then, I checked debug view and nothing appears whereas if there is a break point, my code stopped on this instruction. I can't understand, in my code there are other places where we can find these properties and sometimes it works (I see it in debug view) and sometimes, nothing.
Is it normal ?
I have found nothing on firebase website which could tell me debug view is not perfect but data are correctly saved ...
https://firebase.google.com/docs/analytics/debugview#seconds_stream
EDIT :
With the help of adbitx, I discovered user properties are sent with event so I made a new use case.
2 events (login / logout) and one user properties (easy_account_connected). In login case, I send :
mFirebaseAnalytics.setUserProperty("easy_account_connected", "true");
mFirebaseAnalytics.logEvent("login", null);
and in logout case, I send :
mFirebaseAnalytics.setUserProperty("easy_account_connected", "false");
mFirebaseAnalytics.logEvent("logout", null);
Here is the result in debug view
Login works whereas logout does not...
From what you describe, it looks like you only have that line and no other events. It would be nice to know whether you send any events after setting the user property. The user property comes with each event after it is set. Therefore, you need to send some events and click on one of the events in the debug view to see the user property under User Properties tab.
I was running into a similar issue.
I found that sending the app to the background was a way to "flush" the cache of user properties on the device and send them through to Firebase. I could then see them appear in DebugView.
Without sending the app to the background I would see event after event appear in DebugView, but no user property updates.
I want to log custom events in the firebase analytics and I am using the standard way of doing it like below:
Bundle bundle = new Bundle();
bundle.putString(FirebaseAnalytics.Param.ITEM_CATEGORY, eventCategory);
bundle.putString(FirebaseAnalytics.Param.ITEM_ID,eventType);
bundle.putString(FirebaseAnalytics.Param.ITEM_NAME, eventName);
FcmAnalytics.getInstance(context).logEvent(eventType, bundle);
Although I referred documentation and multiple questions and even the firebase analytics documentation I am finding it difficult to understand with the way things are working here. I think most of them would have this issue as there is no clear documentation for this topic
Firstly can someone explain to me the meanings of the ITEM_CATEGORY, ITEM_NAME, ITEM_ID while logging the event and how are these reflected on the console.
Suppose I want to log an custom event on click of a button with a custom event name say "button_click_event" and want to see the same event on the console to see how many users have clicked the button, how do i do it?
I have used some predefined EVENTS like SELECT_CONTENT and VIEW_ITEM so how do I know which button was selected or which page was viewed, as only the event category names like "select_content"/"view_item" are shown in the console. How do I do it? Please help?
When logging an event, you can really use any param for any purpose, or make up your own params for your own use. You need to use params consistently so that they always mean the same thing in your app or you won't get useful information from them.
The ITEM_CATEGORY, ITEM_NAME, and ITEM_ID are described here. They are intended to be used with the VIEW_ITEM event.
To log a "button_click_event" from your app, you will need to create a FirebaseAnalytics instance within your activity, and call logEvent("button_click_event", new Bundle()) on it. Or you can add a param to the Bundle, such as the name of the button. Custom params won't show up in your reports but you can get a count of the number of times the event was logged in the dashboard.
You could try using the SELECT_CONTENT predefined event in place of a button_pressed_event, and a predefined param such as CONTENT_TYPE or ITEM_ID for the name of the button. Then I believe you would see the param information in the dashboard. You might need to wait 24 hours for the new data to show up.
I'm using Facebook analytics in my Android app to log app events - I'm seeing the correct tracking of app events and am able to view them in my Facebook App Analytics dashboard.
However, I have no idea where parameters that I attach to each event are displayed. Some of them are automatically summed and shown - for instance, purchases or other values. For other, string-based parameters, however, I'm unable to figure out where I can view them.
As an example:
Say every time something goes wrong in my app, I log an event named "Error". I then pass the parameter named AppEventsConstants.EVENT_PARAM_DESCRIPTION a string description - so this might be "App Crashed" or "No Internet Connection" or something. Let's say one of each happens.
When I go to view my analytics, I will correctly see that there have been two "Error" events. But now I want to know whether these were instances of "App Crashed" or "No Internet Connection" - presumably that's what the point of the parameters is. How do I do this? I've googled and clicked everything I can think of, but haven't found a way to see the parameter breakdown of an event.
I can confirm that it is troublesome to find and the name has been changed to "Breakdowns"...
Activity -> Breakdowns
click "Create New" in upper right
give the report a NAME
select the top level event from the EVENT pop-up
select one or more parameters to report on from the 3 BREAKDOWN
pop-ups (note that your custom parameters appear at the bottom of
these menus)
Yep, its not simple to find that information. You will need to use Segments in Facebook Analytics for that. Go to Segments and try creating a new segment. Define Condition Type as "Events". Then select the Event then you want to include. After that, select the option of "Refine". This will show you "Select a Parameter". Here you can select the parameter that you want to see and its value. Save this segment, and use it in any chart you want.
Unfortunately, that is the best way I have found, though it is not as straightforward as it should be.
I tried using the ways based on the answers provided here. But the fact is, it is tedious or going round the bush.
The answer is simple, just send the values and parameters wrapped inside "contents".
It will be visible on your analytics dashboard the same as standard events do.
var name = "Dhinesh";
var platformName = "flutter";
//custom event - fb analytics
fbq('trackCustom', 'FreeTrialPlatform',
// begin parameter object data
{
contents: [{
name: name,
platform: platformName
}],
content_type: 'product'
}
// end parameter object data
);
View in fb analytics
For your case like this,
var errorName = "App crashed";
fbq('trackCustom', 'TrackError', {
contents: [{
Error: errorName
}],
});
I'm trying to use Google Analytics to show a Pie Chart on my dashboard that uses the data from a couple of Event Actions and Screen Name sent from my Android app. Basically I would like to track how many times a button in a particular screen (Fragment) is being clicked (the button performs an action which could either succeed or fail), and also see if it failed or succeeded.
The screen is tracked with a setScreenName() and HitBuilders.ScreenViewBuilder().build(); and the button click event and subsequent result events (pass/fail) are tracked with HitBuilders().EventBuilder().setCategory().setAction().setLabel().build();
Now in my Analytics dashboard, I tried adding 3 filters, one for the screen name, the 2nd for the pass event action, and the 3rd for the fail event action. However the widget displays a "There is no data for this view". The only way I get the Pie Chart to show anything is to use only one filter which defeats the purpose of having a Pie Chart.
Does anyone know what I am doing wrong and how I can use multiple event actions and screen names to show up on the same Pie Chart widget in Google Analytics?
The first criteria is to select Create a pie chart showing and grouped by options in GA pie chart widget and then filter results. Since you get results by selecting any one filter: screen name/ success event / failed event, I suppose the results are present in the first criteria.
You can then filter results by a Don't show or Only show option. A failed and success event cannot appear together, so probably you should not apply filter for both of them at the same time.
Also I think you cannot attach a screen name to event
Google Analytics screenname for events so don't think you can have a screen name + success / fail event filter either.
I have been searching high and low for an answer on this and I am completly dumbfounded.
I am implementing simple click and page tracking in my Android app using GA, running this through GTM. All my "Screens" are visible in realtime in GA but I can't get "Events" to appear at all.
Well actually I can but the behaviour seems very bizarre. If I do not include a "Label" and a "Value" I can see the events appear. However if I add them (either as just a constant or a data layer variable) all events stop. I have confirmed the variables I want in "Label" and "Value" are coming through as I made a container with those values as "Category" and "Action" and could see them as expected in real time.
This leads me to think the app side implementation is perfectly fine but there is an issue with my tag in GTM. (Obviously not the Trigger as that too works when expected).
Ideally I would like to do something like this (the variables are data layer variables):
But this doesn't work. I see no Events.
The Event Value should be a number, not a string. Shuffle the fields, for example - Action - Click on: {{GTM - Click Target}}, Label - {{GTM - Click Value}}, and leave the value empty, this will fix your problem.
Make sure, you have correctly setted up Click listener.
Enable when defines when is listener available and where is applied to the all DOM elements.
Fire ON defines conditions, so in your case it could be {{event}} equals gtm.click or {{event}} equals gtm.linkClick .
This is the most common pitfall when setting listeners