Firebase analytics
Firebase Analytics integration enables brokers to track user behaviour across SSO (OAuth) flows.
Prerequisites
Important
Before implementing Firebase Analytics, ensure you have an active Firebase project with Analytics enabled.
Implementation requirements
Platform support conditions
Firebase Analytics functionality is available when both conditions are true:
- Mobile Platform: User accesses SSO (OAuth) screens using cTrader Mobile
- Analytics Enabled: Firebase Analytics is enabled for the integration
To enable Firebase Analytics, contact Spotware's Support Team.
Event tracking parameter
The eventName query parameter enables Firebase event tracking:
| Parameter | Data Type | Description |
|---|---|---|
eventName | string | The name of the event to be sent to Firebase |
Event tracking implementation
URL parameter usage
Add the eventName parameter to URLs hosting SSO (OAuth) screens:
https://brokerCrmUrl.com/auth/login?eventName=login_screen_view
https://brokerCrmUrl.com/inapp/deposit?eventName=deposit_initiated&token=abc123&lang=en
https://brokerCrmUrl.com/auth/signup?eventName=signup_step_1&firstLogin=true
Event flow tracking
When users are redirected between URLs during SSO (OAuth) flows, events are automatically sent to Firebase.
Recommended event naming conventions
The eventName value is free-form; cTrader forwards it to Firebase unchanged. The following conventions are recommendations only, not requirements:
- Use lowercase
snake_case(deposit_initiated, notDepositInitiated). - Name events as
object_actionso related events sort together (signup_started,signup_completed). - Apply a consistent prefix per flow (
login_,signup_,deposit_,kyc_). - For multi-step flows, append a stage suffix (
signup_step_1,signup_step_2) so you can measure drop-off at each stage.
| Screen | Recommended eventName |
|---|---|
| Login | login_screen_view |
| Signup, step 1 | signup_step_1 |
| Signup, step 2 | signup_step_2 |
| Deposit | deposit_initiated |
| KYC | kyc_started |