Set up Firebase for logging custom events

Hello GDevelop geniuses,

Please forgive how little knowledge I have in this area - imagine I am a child if you respond to me, as that’s the level of explanation I’ll need.

I want to set up Firebase for my game so that I can log custom events - the game has quiz elements and I want to know if the player selects the correct button for each question.

I’ve gone through the basic Firebase configuration following the setup instructions here: Firebase Setup - GDevelop documentation.

But I now have no idea how to set up events within firebase that will log the buttons pressed throughout the game. If I go to ‘create event’ in Firebase, I see this screen:

I’m not sure what I need to enter here. For the parameter, do I use the name given to the button object within my game. And then see if it equals the value of true? Do I need to do anything within GDevelop itself to set up these events?

Any advice on the actual steps involved in setting up events would be VERY much appreciated.

Thank you!

For anybody seeking help with this in the future, I’ve muddled through this with various other documentation and tutorials and it seems to work, so I’m sharing the solution. No idea if this is the best way to do it, but it works for me.

Here’s step-by-step how to connect Firebase to your game to log custom analytic events, e.g., if you want to measure the number of times players click a particular button.

  1. First set up the Firebase account and configure it within GDevelop as per instructions here: Firebase Setup - GDevelop documentation

  2. In the first scene of your game, create an event to enable analytics at the beginning of the scene

  3. Go to your Firebase project that you set up in step 1. Go to the ‘Events’ page within the ‘Analytics’ section in the menu on the left side of the screen:

Click ‘Create Event’.
Choose an event name. This can be anything you want, but should be self-explanatory for what it refers to. In my example, I chose ‘signposted’ because I wanted to measure the number of times players click on a signposting button that takes them to another site.
For ‘Parameter’, I wrote ‘ButtonName’, as the event I am measuring is a button press.
Leave the operator as equals.
For ‘Value’, this must be the name of the object in your game that you are logging an event for. For me, that’s ‘SignpostingButton’, because that’s the name of the object in my game that I want to measure when people click.
Leave everything else as is.

  1. You then need to set up a ‘log event’ action for whatever event it is that you want to measure. For me, that was the number of times players click the ‘SignpostingButton’. When you do this, it will ask you to input an ‘event name’ and an ‘argument’ or ‘additional data’. This is the bit that will link your game to your Firebase account so that Firebase will log analytics, so it’s important that the right information is entered here.
    The ‘event name’ should correspond to the event name you chose in your firebase event in step 3. The ‘argument’/‘additional data’ should correspond to the ‘value’ you entered in your firebase event in step 3 (which will be the name of the object you want to log within the game)

That’s it - now, when you publish your game, your event will show on your Firebase dashboard with the associated analytics.

As I say, I’m not sure if this is how this is supposed to be done, but it’s the way that works for me, so hope this helps anyone who was stuck as I was.

1 Like