3rd party integrations
...
Purple Tracking
Tracking Services

Firebase

24min

Summary

Official websites

Developer integrations

Platform

URL

Android

iOS

Web

not supported by Purple

Tracking service

Event support matrix

Overview of the supported events and their configuration.



Templates

Parameter

Actions

action

supported

Views

name

supported

Attributes

name

not supported

Purchases are not supported, since they collected automatically by Firebase.

General structure in tracking_config.json

Tracking service key name in "tracking_config.json" is: "firebase_analytics"

General structure


Event configuration

Restrictions for tracking

Firebase Analytics has some restrictions for event names, event parameters and attributes. Further descriptions can be found in the official documentation:

iOS - Swift

Android - Kotlin

Global restrictions for events

  • Up to 500 event names are supported.
  • An event can have up to 25 parameters.
  • There are reserved event names which cannot be used (iOS and Android).

Global restrictions for attributes

  • Up to 25 user property names are supported.
  • The following user property names are reserved and cannot be used:
    • "first_open_time"
    • "first_visit_time" (Android only)
    • "first_open_after_install" (Android only)
    • "last_deep_link_referrer"
    • "user_id"

Restrictions of an event:

Event

Restrictions

name

  • Should contain 1 to 40 alphanumeric characters or underscores
  • The name must start with an alphabetic character.
  • The “firebase_”, “google_”, and “ga_” prefixes are reserved and should not be used.

parameter (key/value)

Parameter keys ...

  • ... can be up to 40 characters long.
  • ... must start with an alphabetic character.
  • ... must contain only alphanumeric characters and underscores.
  • ... must not be prefixed with “firebase_”, “google_”, or “ga_” since these are reserved prefixes and should not be used.

Pameter values ...

  • ... can be up to 100 characters long

Restrictions of an attribute:

Attribute

Restrictions

key

  • The key should contain 1 to 24 alphanumeric characters or underscores
  • The key must start with an alphabetic character.
  • The “firebase_”, “google_”, and “ga_” prefixes are reserved and should not be used.

value

  • Values can be up to 36 characters long.

Actions

Firebase supports action events.

Action event
Example


Views

View event
Example


According to the official documentation, a manually triggered view event should be named “screen_view”.

Purple implements this as follows:

Every View event is sent using the name "screen_view". The value of the "name" template will be added as additional parameter value using the parameter key "screen_name" to this view event. The parameter is added as follows:

"screen_name" : "value of name template"

Purchases

Firebase does not support purchase events. All purchases are collected automatically. But this is restricted to purchases from the Apple App Store or the Google Play Store.

Attributes

Firebase supports attributes.

Attribute
Example


Since Firebase Analytics does not support boolean attributes, these will be saved as string attributes. So the boolean value true becomes the string "true". The same behavior applies to boolean value false which becomes "false".

Additional supported functionality

Cloud Messaging

This feature is enabled as provided by Firebase Cloud Messaging.

Crashlytics

This feature is enabled as provided by Firebase Crashlytics.

Crash report enhancement

To enhance this feature Purple adds some custom values to every crash report as follows to have a better determination of affected app versions:

Custom value

Description

app_id

The id of the app.

app_version

The version of the app.

server

The server base url.

locale

The first preferred language from the list of all preferred languages on that device.

The format is for example: "de_DE" for german or "en_EN" for english

pk_version

The version of the used PurpleKit.

Dynamic links

It is not recommended to use Firebase DL as it is deprecated and the service will be discontinued soon. There will be no replacement by Firebase itself.

Read more in the official documentation: https://firebase.google.com/support/dynamic-links-faq

This feature is enabled as provided by Firebase Dynamic Links. Would you still like to find out more? Then read Firebase Dynamic Links in our documentation.

In-App Messaging

This feature is enabled as provided by Firebase In-App Messaging.

Debug Mode

This feature is enabled as provided by Firebase and the debug mode is applied to preview builds only.

How to configure

Native Purple App

Any native Tracking Service is configured in the Purple Manager.

Enable SDK

Settings location

"Your app" => "Consent/Push/Analytics" => "Firebase Configuration (General/iOS/Android)"

Setting

Description

Enable Firebase Analytics

To enable the Firebase Analytics SDK in your app, activate this checkbox.

Enable Firebase Crashlytics

To enable the Firebase Crashlytics SDK in your app, activate this checkbox.

Enable Firebase Dynamic Links

To enable the Firebase Dynamic Links SDK in your app, activate this checkbox.

Configuration settings are different by the used platform.

Setting (Android)

Description

Firebase configuration file

google-services.json

For a Firebase project within the Firebase console, you can download this configuration file.

Service Account Key

serviceAccountKey.json

For a Firebase project within the Firebase console, you can download this configuration file. This file is needed for push messages.

Enable Firebase In-App Messaging

To enable the Firebase In-App Messaging SDK in your app, activate this checkbox.

Setting (iOS)

Description

Firebase configuration file

GoogleService-Info.plist

For a Firebase project within the Firebase console, you can download this configuration file.

Enable Firebase In-App Messaging

To enable the Firebase In-App Messaging SDK in your app, activate this checkbox.

Enable Firebase Cloud Messaging

To enable the Firebase Cloud Messaging SDK in your app, activate this checkbox.

Enable Firebase Debug Mode

To enable the Firebase Debug Mode, activate this checkbox.

The Debug Mode is applied for preview builds only.

Apple privacy / ATT

Settings location

"Your app" => "Consent/Push/Analytics" => "Privacy"

Consent management

Settings location:

"Your app" => "Consent/Push/Analytics" => "Consent Management"

Setting

Description

Vendor-ID for Firebase

The Vendor-ID is provided by the consent management platform.

Web integration

Purple does not support Firebase web integration.

Updated 19 Jul 2024
Did this page help you?