top of page

Firebase Analytics

The Firebase Analytics plugin is specifically designed to implement native mobile Firebase analytics and tracking features through the Firebase Analytics Android SDK and Firebase Analytics iOS SDK in both Android and iOS, for games built using Construct 3.


The Firebase Analytics plugin supports all essential Firebase analytics features including automated tracking, automated user properties, current screen, user id, custom app event tracking, custom user properties and consent compliance features.


The Firebase Analytics plugin also has built-in Construct 3 scripting support with JavaScript.

PlayFab API v2.png

Introduction

Step 1.png

The Construct Master Collection supports the full and easy integration of native mobile Android SDKs and iOS SDKs for both Construct 3 and Construct 2.


Please click here to learn more about Mobile.

Features


The Firebase Analytics plugin integrates the native mobile Firebase Analytics Android SDK and Firebase Analytics iOS SDK into an application project made in Construct 3, with support for both Android and iOS. It allows you to integrate Firebase Analytics' mobile analytics and tracking features, which are all automated and customized features are included with JavaScript scripting support.


Here are some of the native features of the mobile plugin:

  • Firebase Android SDK

  • Firebase iOS SDK

  • Firebase Analytics Android SDK

  • Firebase Analytics iOS SDK

  • Firebase API

  • Firebase Analytics

  • Firebase automated analytics

  • Firebase custom analytics

  • Firebase App Event Tracking

  • Firebase User Property Tracking

  • Firebase Current Screen

  • Personalized User Analytics

  • Construct 3 Scripting support (JavaScript)

  • Well maintained and fully tested for production release.


For more information about native mobile or Android and iOS features, please click here to learn the introductory lessons to Mobile.


Platform Integration


Here are some of the platforms that are natively supported:

  • Android

  • iOS

  • Native Android

  • Native iOS


Build Support


Here are some of the supported build options:


Editor Features


Here are some of the features in the Construct editor:

  • Construct 3

Introduction
Features

How to use?

It is easy to use the Firebase Analytics plugin, you will only need to follow the steps below.

1. The first step is to add the Firebase Analytics object into the project.


2. If the Debug property is checked, the plugin will log information and errors in the console for mobile debugging. Set this unchecked for your production release builds. [This is currently disabled, but reserved for future use.]



3. The Enable At Startup plugin property option is control to be able to start Firebase Analytics on application startup. Or, disable Firebase Analytics until the application (your programming) asks for user consent before collecting the user's analytics data, and if the user agrees to personalized tracking. If you disable this plugin property and ask for the user's tracking consent, use the Set Enabled action to reflect the user's tracking choice. Either enable or disable Firebase Analytics tracking.


4. The Auto Screen Report plugin property is control to allow you to automatically collect screen view events. Disable this to prevent the automatic collection of mentioned screen view events data on startup.


5. The Android Version plugin property allows you to choose the Android Firebase Analytics SDK version. Please always try and test compatibility before publishing your build whenever you change the version.


6. The iOS Version plugin property allows you to choose the iOS Firebase Analytics SDK version. Please always try and test compatibility before publishing your build whenever you change the version.



Integration Tutorial


Google Play Services

  • To use Firebase Analytics, the plugin requires your Firebase application's googles-services.json (android) and GoogleService-Info.plist (iOS) added in your Construct 3 project.

  • You can get these files from your Firebase Console.

  • Import the files in the Files folder of your Construct 3 project.

  • Congratulations, you have now successfully integrated Google Services for Firebase Analytics in your Construct 3 application project.

AdSupport Framework (iOS)

  • In order to collect demographic, age, gender data, etc., you should additionally include the AdSupport.framework into your project.

Instructions
Documentation

Documentation

The Firebase Analytics plugin is specifically designed to implement native mobile Firebase analytics and tracking features through the Firebase Analytics Android SDK and Firebase Analytics iOS SDK in both Android and iOS, for games built using Construct 3.



Debugging Firebase


The Firebase Analytics plugin includes debugging tools integrated with the Firebase service to test your Firebase Analytics implementations, and to see if integration is properly made.


Android Studio

  1. Go to your Firebase Console, then select your application.

  2. If you have just created a new project, you can confirm successful Firebase Analytics SDK integration by running your app with Firebase for the first time.

  3. Go to Analytics > Debug View.

  4. Open Android Studio, then run your project via USB or Emulator.

  5. Select the terminal tab, by default at the bottom dock.

  6. Input this command: adb shell setprop debug.firebase.analytics.app package_name

  7. Input this command to stop: adb shell setprop debug.firebase.analytics.app .none. Firebase debugging with your application automatically stops upon disconnecting your device from Android Studio.

  8. Go back to the Debug View from your Firebase Console.

  9. Now review the events as they happen. (Expect significant delays.)

  10. Congratulations, you now have tried and learned to debug Firebase Analytics SDK integration with Android. Click to review the complete and official documentation of Firebase Analytics debugging for Android.


iOS Xcode

  1. Go to your Firebase Console, then select your application.

  2. If you have just created a new project, you can confirm successful Firebase Analytics SDK integration by running your app with Firebase for the first time.

  3. Go to Analytics > Debug View.

  4. Open Xcode, then run your project via USB or Emulator.

  5. Select the terminal tab, by default at the bottom dock.

  6. Input this command: -FIRDebugEnabled

  7. Input this command to stop: -FIRDebugDisabled Firebase debugging with your application automatically stops upon disconnecting your device from Xcode.

  8. Go back to the Debug View from your Firebase Console.

  9. Now review the events as they happen. (Expect significant delays.)

  10. Congratulations, you now have tried and learned to debug Firebase Analytics SDK integration with iOS. Click to review the complete and official documentation of Firebase Analytics debugging for iOS.

ACEs

Actions, Conditions & Expressions

Actions

The following action groups:

  • Tracking

  • User Properties

  • General

  • Default Event

Tracking

  • Log Event - Log an app event.

    • Event Name - The event name.


  • Add Log Parameter - Add a parameter to the next Log Event.

    • Name - The parameter name.

    • Value - The parameter value.​


  • Log Event (JS) - Log an app event using JSON parameters.

    • Event Name - The event name.

    • JSON - The JSON string containing the app event parameters.​


User Properties

  • Set User Property - Sets a user property to a given value.

    • Name - The property name.

    • Value - The property value.


General

  • Set User ID - Sets the user id property.

    • ID - The user id.


  • Set Current Screen - Sets the current screen name, which specifies the current visual context in your app. This helps identify the areas in your app where users spend their time and how they interact with your app.

    • Name - The current screen name.


  • Reset Analytics Data - Clears all analytics data for this instance from the device and resets the app instance ID.

  • Set Enabled - Sets whether analytics collection is enabled for this app on this device.

    • Enabled - Check to enable.


​​​

Default Event

  • Set Default Parameters - Set the Default Event Parameters.

  • Add Default Parameter - Add a parameter to the next Set Default Parameters action.

    • Key - The parameter key.

    • Value - The parameter value.

  • Set Default Parameters (JS) - Set the Default Event Parameters, using a JSON string.

    • JSON - The JSON string containing the default event parameters.

Conditions


Expressions


Object   Properties

Plugin Properties

The following property groups:

  • Configuration

  • Firebase

  • Android

  • iOS

Configuration - The plugin configuration section.

  • Debug - Toggle checked to enable logs in the browser console.



Firebase - The Firebase service configuration section.

  • Enable On Startup - Toggle unchecked to disable Firebase Analytics at startup. You can enable this later through the "Set Enabled" action, which is useful for asking consent before data collection.

  • Auto Screen Report - Toggle unchecked to disable automatic collection of screen view events.



Android - The Android SDK configuration section.

  • SDK version - The Android Firebase Analytics SDK version.

    • 19.0.+



iOS - The iOS SDK configuration section.

  • SDK version - The iOS Firebase Analytics Pod version.

    • 8.8.+

Properties
Showcase

Showcase

The Firebase Analytics plugin with the Firebase Remote Config plugin, to implement and integrate both the Firebase Analytics SDK and Firebase Remote Configuration SDK, for both Android and iOS.



Game Projects

Game Projects 

Instructions Kit

Specifications

  • Instructions - The game project contains instructions and steps on how to use the addon and its features.

  • Action, Conditions and Expressions - It covers the implementation of each action, condition and expression.

  • Tips and Tricks - It provides some tips and tricks on the recommended ways of using the addon.

Supporters

Only

bottom of page