56

I have just started using Firebase for my app analytics and I'm having some issues trying to view the parameters associated with my events. Upon logging into the console, selecting my app, then I select the iOS version and I'm presented with the dashboard. All of that looks good. Then I select the Events tab, and I see a list of all events that my app has logged. Again, this is all good. However, I want to be able to drill down and see reports based on the parameters that were passed with those events. in my iOS code I have the following:

[FIRAnalytics logEventWithName:kFIREventSelectContent parameters:@{
    kFIRParameterItemID:@"some_item_id",
    kFIRParameterContentType:@"some_content_type"
}];

I want to be able to see how many of these "select_content" events were from a particular "content_type". But I cannot figure out how to do that.

I tried creating an Audience using "content_type" that I know I tested days ago, but my number of users is always at 0. So I'm at a loss...how the heck do you see analytics for events based on the parameters that were supplied?

themanatuf
  • 2,880
  • 2
  • 25
  • 39

5 Answers5

47

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.

Rob Norback
  • 6,401
  • 2
  • 34
  • 38
  • Not sure why the other answer was accepted. This is the right one. – Will Jul 14 '20 at 20:49
  • I'm still not seeing the data after following your instructions. Where does the chart end up? – C13 Sep 30 '20 at 15:51
  • 21
    I cannot see the "Edit parameter reporting" option next to the events. Any idea? – Klemens Zleptnig Oct 08 '20 at 15:24
  • 1
    custom-parameter reporting is deprecated in favor of "Event-scoped custom dimensions and metrics" - https://support.google.com/analytics/answer/10075209 – omarojo Nov 12 '20 at 19:20
  • 1
    @omarojo Do you know how to use these new dimensions? Coz I'm seeing my old parameters on events but I don't know how to add new ones. How do you associate parameters with events? – Jan-Dawid Roodt Mar 24 '21 at 01:44
  • I believe u dont assoaciste them. You simply add them as custom dimensions. And they should automatically appear in each Event’s page where u see the graphics, etc.. – omarojo Mar 24 '21 at 02:57
  • Unfortunately this option is removed. It is now a separate page on the left pane called "Custom Definitions" – tasomaniac Jun 01 '21 at 14:33
24

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: enter image description here 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,
    })
  }
no_fate
  • 1,625
  • 14
  • 22
  • 4
    Is this a brand new thing? I didn't see any notices about the change, but I see that `Edit parameter reporting` isn't there anymore :/ – Blundering Philosopher Oct 22 '20 at 21:49
  • Yes, if you go here: https://support.google.com/firebase/answer/7397304 you will see that there is a note about Custom-parameter reporting is replaced by custom dimensions and metrics – no_fate Oct 23 '20 at 09:11
  • 1
    Aah nice I see `This feature is being replaced by event-scoped custom dimensions and metrics...` – Blundering Philosopher Oct 23 '20 at 14:29
  • Hey @no_fate, urgent question. For your custom para "shop_item", did you go to Events > Manage Custom Definitions > Create Custom Metrics > Unit of Measurement = Standard? I'm currently confused as to create a dimension or metric for it. Please help TT – Henry Oct 24 '20 at 02:32
  • My apologies @no_fate, one more question, how do we bind the custom event to that custom parameter? We used to be able to do so by clicking the "ellipsis" icon next to the custom event to bind the custom parameter. – Henry Oct 24 '20 at 02:38
  • @Henry, sorry for the delay. I created a custom dimension. I updated the answer to show you how I bound an event with a parameter. you just need to add this parameter inside the event on the client-side. – no_fate Oct 26 '20 at 09:54
  • Thanks a bunch for the reply, I followed your approach but I got the error: Expected: "[string, Object]", Actual: ["event", {key: "Page Access", parameters: [{key: "page_url", value: "/home"}]}, {send_to: "G-5BDBLX041W"}] – Henry Oct 27 '20 at 02:15
  • firebase.analytics().logEvent({ key: 'Page Access', parameters: [ { key: 'page_url', value: x.url } ] }); – Henry Oct 27 '20 at 02:16
  • @Henry you need to check the firebase documentation for your language because my code is typescript – no_fate Oct 27 '20 at 10:29
  • @no_fate Thanks for your answer. Apparently the reports comes in after roughly a week.. Your answer gave a lot of insights, thanks. – Henry Oct 28 '20 at 07:41
  • @Henry I think a week it's too long, firebase updates its data every 24 hours – no_fate Oct 28 '20 at 08:45
  • @Henry Sup Henry - sorry to bug you, but did you ever figure out how the event is connected to the parameter? We send the two together on the client side and we've created this new dimension but I can't see how the two link. We created the dimension 2 days ago and I thought Firebase would update by now, but you're saying yours took a week? – Jan-Dawid Roodt Mar 24 '21 at 01:50
  • 1
    @Jan-DawidRoodt Honestly I'm not really sure how to solve/make it work. I just follow OP's answers, but the main issue is the reporting takes a really long time to somehow detect the custom parameters for my case.. Even though for others its only 24 hours, mine takes way longer than that – Henry Mar 24 '21 at 02:10
  • what's the difference between dimension and metric? which one should we use in order to get parameter reporting? – tasqyn Aug 23 '21 at 10:34
22

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:

  1. You can't have the same param set as metric & dimension
  2. I'll update what happens when you set a numeric param as a dimension
eyalyoli
  • 1,677
  • 17
  • 16
16

If anyone struggled as much as I did, here's how we did it:

Go to "Custom Definitions" in the left hand pannel (where it says events, funnels, audiences, etc.)

Click on "Custom Metrics" which is next to "Custom Dimensions" and click "Create custom metric". (For some reason old parameters go to "Dimensions" but when you create event/parameter combo, it didn't work for us in "Dimensions"... I don't know why...)

Then make sure you spell your parameter exactly the same as in your code where it asks you for the "Event parameter" and the rest of the fields don't matter.

Please note: It takes 24 hours to update and make sure you send a test event through to activate it.

Jan-Dawid Roodt
  • 489
  • 5
  • 13
8

It looks like you're logging the correct event and parameters. It should produce a select_content report that looks like the attached. You don't need to create an audience to see this.

enter image description here

Steve Ganem
  • 10,591
  • 2
  • 39
  • 32
  • Steve, thanks for the answer. That all looks good; how would I get something similar for `view_item_list` using the `origin` and `destination` parameters? – themanatuf Jun 03 '16 at 10:57
  • 1
    Not all events/parameters get have reporting. You can create Audiences using those parameters and/or you can view those parameters in BigQuery if you link your app to BigQuery. – Steve Ganem Jun 03 '16 at 14:37
  • Thanks again. I guess I expected the audience numbers to populate immediately, but it looks like they don't. I'll give BigQuery a shot too, thanks again. – themanatuf Jun 03 '16 at 17:58
  • 5
    @SteveGanem Could you please provide additional info or/and link to a place where I can check which events/parameters have additional reporting like "SELECT_CONTENT". For example, for "VIEW_ITEM" event firebase console doesn't show additional report despite the fact that "item_id", "item_name" and "item_category" parameters have values(required parameters according to [docs](https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.Event.html#VIEW_ITEM) ) – Leszek Sep 17 '16 at 17:13
  • @Leszek as per http://grokbase.com/t/gg/firebase-talk/165rhtrp76/firebase-where-can-i-see-the-data-of-the-parameters-in-the-events they are going to add report view of the parameters in the console of for all event types in the future. We need to wait.. Meanwhile BigQuery should be the answer. – Kirill Karmazin Mar 03 '17 at 13:16
  • Can you filter by other parameters like `content-type`. – 3366784 Jul 16 '18 at 02:59