Firebase
24 min
summary official websites site url website https //firebase google com https //firebase google com/docs/analytics documentation https //firebase google com/docs https //firebase google com/docs?hl=en developer integrations platform url android https //github com/firebase/firebase android sdk https //github com/firebase/firebase android sdk ios https //github com/firebase/firebase ios sdk https //github com/firebase/firebase ios sdk web \<font color="#ff6900">not supported by purple\</font> tracking service event support matrix overview of the supported events and their configuration templates parameter \<font color="#2166ae">actions\</font> \<font color="#3b9f0f">action\</font> \<font color="#3b9f0f">supported\</font> \<font color="#2166ae">views\</font> \<font color="#3b9f0f">name\</font> \<font color="#3b9f0f">supported\</font> \<font color="#2166ae">attributes\</font> \<font color="#3b9f0f">name\</font> \<font color="#ff6900">not supported\</font> \<font color="#2166ae">purchases\</font> are not supported, since they collected automatically by firebase general structure in tracking config json tracking service key name in " tracking config json " is " \<font color="#2166ae">firebase analytics\</font> " general structure { "firebase analytics" { "eventsenabledbydefault" true, "viewsenabledbydefault" true, "purchasesenabledbydefault" false, "attributesenabledbydefault" true, "events" { // your configured list of events }, "views" { // your configured list of events }, "purchases" {}, "attributes" { // your configured list of attributes } } } event configuration restrictions for tracking firebase analytics has some \<font color="#eb144c">restrictions\</font> for \<font color="#ff6900">event names\</font> , \<font color="#ff6900">event parameters\</font> and \<font color="#ff6900">attributes\</font> further descriptions can be found in the official documentation ios swift https //firebase google com/docs/reference/swift/firebaseanalytics/api/reference/classes/analytics#logevent parameters https //firebase google com/docs/reference/swift/firebaseanalytics/api/reference/classes/analytics#logevent parameters android kotlin https //firebase google com/docs/reference/kotlin/com/google/firebase/analytics/firebaseanalytics#logevent https //firebase google com/docs/reference/kotlin/com/google/firebase/analytics/firebaseanalytics#logevent global restrictions for events up to \<font color="#eb144c">500\</font> event names are supported an event can have up to \<font color="#eb144c">25\</font> parameters there are \<font color="#eb144c">reserved\</font> event names which cannot be used ( ios https //firebase google com/docs/reference/swift/firebaseanalytics/api/reference/classes/analytics#logevent parameters and android https //firebase google com/docs/reference/kotlin/com/google/firebase/analytics/firebaseanalytics event ) global restrictions for attributes up to \<font color="#eb144c">25\</font> user property names are supported the following user property names are \<font color="#eb144c">reserved\</font> and cannot be used " \<font color="#ff6900">first open time\</font> " " \<font color="#ff6900">first visit time\</font> " (android only) " \<font color="#ff6900">first open after install\</font> " (android only) " \<font color="#ff6900">last deep link referrer\</font> " " \<font color="#ff6900">user id\</font> " restrictions of an event event restrictions \<font color="#2166ae">name\</font> should contain \<font color="#eb144c">1 to 40 alphanumeric\</font> characters or \<font color="#eb144c">underscores\</font> the name must start with an \<font color="#eb144c">alphabetic\</font> character the “ \<font color="#ff6900">firebase \</font> ”, “ \<font color="#ff6900">google \</font> ”, and “ \<font color="#ff6900">ga \</font> ” prefixes are \<font color="#eb144c">reserved\</font> and should not be used \<font color="#2166ae">parameter\</font> \<font color="#2166ae">(key/value)\</font> parameter \<font color="#2166ae">keys\</font> can be up to \<font color="#eb144c">40 characters \</font> long must start with an alphabetic character must contain only \<font color="#eb144c">alphanumeric\</font> characters and \<font color="#eb144c">underscores\</font> must not be prefixed with “ \<font color="#ff6900">firebase \</font> ”, “ \<font color="#ff6900">google \</font> ”, or “ \<font color="#ff6900">ga \</font> ” since these are \<font color="#eb144c">reserved\</font> prefixes and should not be used pameter \<font color="#2166ae">values\</font> can be up to \<font color="#eb144c">100 characters\</font> long restrictions of an attribute attribute restrictions \<font color="#2166ae">key\</font> the key should contain \<font color="#eb144c">1 to 24 alphanumeric\</font> characters or \<font color="#eb144c">underscores\</font> the key must start with an \<font color="#eb144c">alphabetic\</font> character the “ \<font color="#ff6900">firebase \</font> ”, “ \<font color="#ff6900">google \</font> ”, and “ \<font color="#ff6900">ga \</font> ” prefixes are \<font color="#eb144c">reserved\</font> and should not be used \<font color="#2166ae">value\</font> values can be up to \<font color="#eb144c">36 characters\</font> long actions firebase supports action events action event "action event key" { "templates" { "action" "value of template" }, "parameters" { "parameter key 1" "value of parameter", // your configured list of parameters } } example "issue downloaded" { "templates" { "action" "issue downloaded" }, "parameters" { "issue id" "{{issue id}}", "issue name" "{{issue name}}", "issue categories" "{{issue categories}}", "issue tags" "{{issue tags}}", "issue purchasable" "{{issue purchasable}}", "issue purchased" "{{issue purchased}}", "publication id" "{{publication id}}", "publication name" "{{publication name}}" } } views view event "view event key" { "templates" { "name" "value of template" } } example "storefront feed" { "templates" { "name" "feed" } } according to the official documentation, a manually triggered view event should be named “ \<font color="#ff6900">screen view\</font> ” purple implements this as follows every view event is sent using the name " \<font color="#ff6900">screen view\</font> " the value of the " \<font color="#2166ae">name\</font> " template will be added as additional parameter value using the parameter key " \<font color="#ff6900">screen name\</font> " to this view event the parameter is added as follows " \<font color="#ff6900">screen name\</font> " " \<font color="#3b9f0f">value of name template\</font> " 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 "attribute key" { "templates" { "name" "value of template" } } example "has active subscription" { "templates" { "name" "has active subscription" } } since firebase analytics does not support boolean attributes, these will be saved as string attributes so the boolean value \<font color="#2166ae">true\</font> becomes the string " \<font color="#2166ae">true\</font> " the same behavior applies to boolean value \<font color="#2166ae">false\</font> which becomes " \<font color="#2166ae">false\</font> " additional supported functionality cloud messaging https //firebase google com/docs/cloud messaging https //firebase google com/docs/cloud messaging?hl=en this feature is enabled as provided by firebase cloud messaging crashlytics https //firebase google com/docs/crashlytics https //firebase google com/docs/crashlytics/?hl=en 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 \<font color="#2166ae">app id\</font> the id of the app \<font color="#2166ae">app version\</font> the version of the app \<font color="#2166ae">server\</font> the server base url \<font color="#2166ae">locale\</font> the first preferred language from the list of all preferred languages on that device the format is for example " \<font color="#3b9f0f">de de\</font> " for german or " \<font color="#3b9f0f">en en\</font> " for english \<font color="#2166ae">pk version\</font> the version of the used purplekit dynamic links https //firebase google com/docs/dynamic links https //firebase google com/docs/dynamic links?hl=en 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 https //firebase google com/support/dynamic links faq?hl=en this feature is enabled as provided by firebase dynamic links would you still like to find out more? then read firebase dynamic links docid\ uzdugswlxihu5i0ysizl2 in our documentation in app messaging https //firebase google com/docs/in app messaging https //firebase google com/docs/in app messaging?hl=en this feature is enabled as provided by firebase in app messaging debug mode https //firebase google com/docs/analytics/debugview https //firebase google com/docs/analytics/debugview?hl=en 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 \<font color="#2166ae">purple manager \</font> enable sdk settings location " \<font color="#2166ae">your app\</font> " => " \<font color="#2166ae">consent/push/analytics\</font> " => " \<font color="#2166ae">firebase configuration \</font> \<font color="#2166ae">(general/ios/android)\</font> " 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 \<font color="#2166ae">google services json\</font> for a firebase project within the firebase console, you can download this configuration file service account key \<font color="#2166ae">serviceaccountkey json\</font> 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 \<font color="#2166ae">googleservice info plist\</font> 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 \<font color="#ff6900">debug mode\</font> , activate this checkbox the \<font color="#ff6900">debug mode\</font> is applied for preview builds only apple privacy / att settings location " \<font color="#2166ae">your app\</font> " => " \<font color="#2166ae">consent/push/analytics\</font> " => " \<font color="#2166ae">privacy\</font> " consent management settings location " \<font color="#2166ae">your app\</font> " => " \<font color="#2166ae">consent/push/analytics\</font> " => " \<font color="#2166ae">consent management\</font> " 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