How to view event parameters from Firebase console
Right now to show parameters you need to configure metrics or dimensions like written here: https://support.google.com/analytics/answer/10075209
After you added it and waited for 24 hours you will see something like that:
Here shop_exit_app
is the main event, and shop_item
is a parameter of this event
UPD: To add a parameter you need just use something like this:
logShopExitApp(shopItem?: ShopItem): void {
firebase.analytics.logEvent({
key: 'shop_exit_app',
parameters: shopItem ? [
{
key: 'shop_item',
value: shopItem.title,
}
] : null,
})
}
It seems that Google changed everything and made all of us confused with their bad documentation.
Today there is something called "Custom definitions" in the Firebase console, which has 2 undocumented terms; "Dimensions" & "Metrics".
After seeing all the answers here, they lack the answer to what are those terms mean. You can have a custom user property or log a custom event from your client. To make those useful, you need to make sure analytics generates reports for it (which will take up to 24-48 hrs).
User property has only string values, while custom events have key-value pairs of string/numbers. At first, I thought dimension goes for user props while metrics for event params - this is WRONG! Metrics here means ONLY numbers! So metrics are meant for custom events that have a numeric parameter (you can guess this because there is no "Text" option in the units of measurement) like a game score.
While dimension seems to work for both user props & events. So when you have a non-numeric param in your event, you should define it as a dimension, otherwise, the reports won't work for you because in metrics they expect numbers. So something like a search term should be considered as a dimension.
Google hinted this on their docs example here:
You can create an Author dimension that gets its values from the author parameter and an Article_Length metric that gets its value from the number_of_pages parameter.
While referring to this custom event:
gtag('event','read_article', {
"author":"Bill Q",
"title":"How to Build a Backpack",
"number_of_pages":2,
});
Notes:
- You can't have the same param set as metric & dimension
- I'll update what happens when you set a numeric param as a dimension
Honestly, the answer here didn't help me at all. I finally figured out that you have to manually add custom parameter reporting to each event. Here's a link to the docs.
https://support.google.com/firebase/answer/7397304?hl=en&utm_id=ad&authuser=0
And I guess in case this link dies, I'll add the steps below. This is just copy paste from the link.
Custom-parameter reporting Define custom parameters for your events.
Google Analytics for Firebase lets you specify up to 25 custom parameters per event (Android or iOS).
You can also identify up to 50 custom event parameters per project (40 numeric and 10 textual) to include in reporting by registering those parameters with their corresponding events. Once you register your custom parameters, Google Analytics for Firebase displays a corresponding data card in each related event-detail report.
Each parameter that you specify counts toward the project limit of 50. For example, if you specify the same parameter for 3 different events, then that counts as 3 of your 50.
To register custom parameters for an event:
In Analytics for Firebase, navigate to your app. Click Events. In the row for the event you want to modify, click More > Edit parameter reporting. In the Enter parameter name field, enter the name of the parameter you'd like to register. If a match is found, select it in the list and click ADD. If no match is found, click ADD. Set the Type field to Text or Number. For numeric parameters, set the Unit of Measurement field. Click SAVE, then click CONFIRM.
On the Events page, any event with registered parameters has a gray box next to the event name with the number of registered parameters for that event.
To edit registered parameters:
In the row for the event, click More > Edit parameter reporting. Add new parameters per the instructions above, or click Delete to remove a parameter. Click SAVE, then click CONFIRM.
The per-app count for registered parameters appears at the bottom of the list of parameters. As you enter parameters, the count updates. When the quota has been reached (50), that number appears in red, indicating that you cannot register any more.
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.