> ## Documentation Index
> Fetch the complete documentation index at: https://docs.auxia.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrate Firebase on the client application

> Set up your client application to receive push notifications

<aside>
  Skip this section if the client application has already integrated with Firebase along with the two plugins

  1. [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging)
  2. [Google Analytics](https://firebase.google.com/docs/analytics)
</aside>

<br />

The client application needs to integrate with Firebase and add the following two plugins:

1. **Firebase Cloud Messaging**: Enables push notifications. You can follow the setup guide [here](https://firebase.google.com/docs/cloud-messaging).
2. **Google Analytics**: A standard Google Analytics integration ensures that basic [app-usage data is collected automatically](https://support.google.com/analytics/answer/9353532?sjid=11579915495021032065-NC). Follow the integration setup guide [here](https://firebase.google.com/docs/analytics).

<br />

Specifically, for push notifications, following events would be tracked automatically:

| Event                          | Automatically triggered...                                                                             | Parameters                                                                                                      |
| ------------------------------ | ------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------- |
| notification\_dismiss (app)    | when a user dismisses a notification sent by Firebase Cloud Messaging (FCM) Android only               | message\_name, message\_time, message\_device\_time, message\_id, topic, label, message\_channel                |
| notification\_foreground (app) | when a notification sent by FCM is received while the app is in the foreground                         | message\_name, message\_time, message\_device\_time, message\_id, topic, label, message\_channel, message\_type |
| notification\_open (app)       | when a user opens a notification sent by FCM                                                           | message\_name, message\_time, message\_device\_time, message\_id, topic, label, message\_channel                |
| notification\_receive (app)    | when a notification sent by FCM is received by a device when the app is in the background Android only | message\_name, message\_time, message\_device\_time, message\_id, topic, label, message\_channel, message\_type |

A complete list of all the events can be found [here](https://support.google.com/analytics/answer/9234069?sjid=11579915495021032065-NC).
