What event should i use for sending a “button pressed” event on Firebase Analytics

后端 未结 2 1837
没有蜡笔的小新
没有蜡笔的小新 2021-02-12 16:54

The one I found most suitable is SELECT_CONTENT, but as the doc says:

Select Content event. This general purpose event signifies that a user has selected

相关标签:
2条回答
  • 2021-02-12 17:10

    You can track click of a button like this: (In my case, I have an InHouse Ad and I want to track number of clicks.)

    public void openGoz(View view){
        Uri uri = Uri.parse("market://details?id=com.mountzoft.gameofzeros");
        Intent intent = new Intent(Intent.ACTION_VIEW, uri);
        startActivity(intent);
    
        Bundle bundle = new Bundle();
        bundle.putString("goz_ad_click","1");
        mFirebaseAnalytics.logEvent("in_house_ad_click", bundle);
    }
    
    0 讨论(0)
  • 2021-02-12 17:19

    The built-in Firebase Analytics events are structured more around key actions the user can take within the app. For example, there might be multiple buttons or UI widgets that could be used to share content, so these could be tied to the SHARE event.

    Therefore, I would recommend looking through the built-in events and using them where appropriate for any button presses you have.

    If those don't suffice and you want to track more, the SELECT_CONTENT is quite a general purpose event that you can map in any way you see fit. For example, you could set the CONTENT_TYPE to say, "button" and ITEM_ID to the name of the button. While this is not the main purpose of this event, it should work for what you're after.

    The last and most flexible option is a custom event with custom params, however as you noted, only the VALUE param will show in the built-in Firebase dashboard so for this approach you would need to use BigQuery to retrieve the data and therefore not very useful for your situation.

    0 讨论(0)
提交回复
热议问题