0

I'm using Firebase on my Android app.

I'm using this package for my react-native project. I don't get any errors when I'm using it. However, events are not logged. Any help with this? Thanks!

I'm implementing the code like:

Analytics.setUserId(user.uid)
Analytics.logEvent('view_item', {
        'item_id': 'login'
});

2 Answers 2

2

If you read this (Firebase documentation), you can see that it's a custom event, the custom events not appear on control panel but you can see that in audiences and as a filters for firebase analytics. If you want that your event is showed in your control panel you need to use a general events, you can learn more about them here, when you use the user properties or regular events the firebase needs 24h hours to recompile information and show it on control panel. Tell me if I helps you! Greetings!

1

When your code triggers a "view_item", it is supposed to "trigger" an existing event from the firebase analytics console.

So you need to create an event that will handle the "view_item" event in your code. From the console in analytics, you need to create a new event named "view_item_trigger" for example add the following condition: "if event_name is equal to 'view_item' ".

New Event screen 1 New Event screen 2

The view_item_trigger event will now appear in the debug view

1
  • @eric-wu thanks for the edit because I don't have enough reputation to directly insert picture in my post.
    – Spixz
    Commented Dec 15, 2021 at 18:41

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.