Where do I view event parameters with Facebook Analytics App Events? - android

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
}],
});

Related

Contents of Bundle in Firebase Analytics Event not showing in dashboard

I have the same issue as this thread but the answer is outdated and seems to be incorrect. It refers to a button "Add event parameters" which is not present in the current version of firebase.
I want to view the content of the bundle for the event on my Firebase event page. Here is my event page on firebase:
I've followed this firebase tutorial and here is my code:
private fun sendLogging(context: Context, source: String, logMessage: String) {
val bundle = Bundle()
bundle.putString("LOG_MESSAGE", "$source $logMessage")
FirebaseAnalytics.getInstance(context).logEvent("PUSH_CONTENT_NOT_RECEIVED", bundle)
}
The source and logMessage contain precise information about what went wrong and I need to view this. It should show up?
EDIT:
I went to "Custom Definitions":
And I've added the event:
I discovered that only from that moment it started collecting information. But I do not see the information that I've logged anywhere. Where is it?
Adding LOG_MESSAGE to the Custom Definitions as an event-scoped custom dimension is the correct direction. You can follow the "Create a custom dimension" on the "[GA4] Custom dimensions and metrics" page.
GA4 limits the length of event parameter names & event parameter values. See [GA4] Collection and configuration limits for more information. In your case, LOG_MESSAGE is the event parameter's name (limited to 40 characters), and the runtime value of "$source $logMessage" is the event parameter's value (limited to 100 characters).
If "$source $logMessage" needs to be more than 100 characters, you could make the source and logMessage separate event parameters. For example, you'd update your code to:
bundle.putString("LOG_MESSAGE_SOURCE", source)
bundle.putString("LOG_MESSAGE_VALUE", logMessage)
Then, you would register LOG_MESSAGE_SOURCE and LOG_MESSAGE_VALUE as two event-scoped custom dimensions, and each would be limited to 100 characters individually.
Thanks,
Brett Sneed
The Google Analytics Team
Try adding the LOG_MESSAGE under Custom Definitions as an event or user custom dimension, this now available from the menu on the left in the Analytics section.
Custom Definitions Image

Firebase Analytics Event properties are not shown, but do appear in DebugView

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.

User properties from Firebase Analytics in DebugView

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.

Events not firing in Google Analytics via Google Tag Manager

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

Android notification dismissed callback?

my app searches for new articles and sends a notification like "5 new articles". However when i send another one, i want to have it update the text to lets say there were 3 new so something like "8 new articles" BUT "3 new articles" if the user has dismissed that previous notification. I hope you get it.
Is there a way to know that notification was dismissed so i can reset the count?
Thanks !
This is a rather belated answer but I was looking to find out how to do this myself so perhaps it'll be useful to others. In API level 18 the following service was introduced which should make this straightfoward as you can now get a callback whenever a notification is added or removed:
https://developer.android.com/reference/android/service/notification/NotificationListenerService.html
In particular for the original question see the onNotificationRemoved method
The other option mentioned by jpop above is to use the builder's setDeleteIntent method when creating the notification, which will give a callback when the notification is deleted. This would then require you to maintain the state of the existing raised notifications somewhere else as it only tells you when something is added, not removed.
If your app has a database you can do this: Create a table that has some fields like id as int, article name as string, and isdismissed as boolean. So, each time you want to send a notification, you should count the records that the isdismissed field equals false.
In the other hand, each time user select a notification, the related isdismissed field must be equal true.
In addition, this sample from developer.android.com maybe can help you:
http://developer.android.com/guide/topics/ui/notifiers/notifications.html
the listener don't work since android Nougat, a new access rule have been added
on android device : parameters -> applications -> gear menu -> spécial access -> notifications access
use : catch on swipe to dismiss event

Categories

Resources