ADR-0024 Unity Analytics Events to Server Event Bus

Publication Date2021-09-29
Last Update2021-09-29
StatusAccepted

Context

For Use Case 3 Magic Mirror app, Google Firebase Analytics is used to track usage behavior and log a variety of events. These events must be fed to Mallzee’s service in order to generate user-specific garment suggestions.

Analytics Data tracking is implemented through the SDK provided by Google for using Firebase within Unity applications.

The Firebase SDK offers support for logging two primary types of information:

  • Events: log user actions, system events, errors.
  • User properties: attributes that describe user base, such as geographical information and language preference

In the context of the Magic Mirror mobile app, a variety of events will be tracked, such as user clicks and user engagement time. Moreover, some user properties will be recorded too, such as user Operating System, OS Version, geographical information, gender, and age.

Firebase Analytics does not offer an API that can be queried to get analytics data and feed them to Mallzee’s service.

Thus another solution must be found in order to fetch analytics events.

Decision

Google Cloud’s Big Query is a serverless, highly scalable, and cost-effective multicloud data warehouse, which can be integrated with Firebase Analytics. It features a REST API which can be called to fetch our Firebase Analytics data.

It requires a BLAZE (paid) Firebase plan.

Consequences

We will be using the integration between Firebase Analytics and Google Cloud Big Query in order to feed Mallzee’s user-specific garment suggestions function, with the events from the Magic Mirror app.