FirebaseAnalytics Framework Reference

FIRAnalytics

@interfaceFIRAnalytics:NSObject

The top level Firebase Analytics singleton that provides methods for logging events and setting
user properties. See the developer guides for general
information on using Firebase Analytics in your apps.

Logs an app event. The event can have up to 25 parameters. Events with the same name must have
the same parameters. Up to 500 event names are supported. Using predefined events and/or
parameters is recommended for optimal reporting.

The following event names are reserved and cannot be used:

ad_activeview

ad_click

ad_exposure

ad_impression

ad_query

adunit_exposure

app_clear_data

app_remove

app_update

error

first_open

in_app_purchase

notification_dismiss

notification_foreground

notification_open

notification_receive

os_update

screen_view

session_start

user_engagement

Declaration

Parameters

name

The name of the event. Should contain 1 to 40 alphanumeric characters or
underscores. The name must start with an alphabetic character. Some event names are
reserved. See FIREventNames.h for the list of reserved event names. The firebase_,
google_, and ga_ prefixes are reserved and should not be used. Note that event names are
case-sensitive and that logging two events whose names differ only in case will result in
two distinct events.

parameters

The dictionary of event parameters. Passing nil indicates that the event has
no parameters. Parameter names can be up to 40 characters long and must start with an
alphabetic character and contain only alphanumeric characters and underscores. Only NSString
and NSNumber (signed 64-bit integer and 64-bit floating-point number) parameter types are
supported. NSString parameter values can be up to 100 characters long. The firebase_,
google_, and ga_ prefixes are reserved and should not be used for parameter names.

Declaration

Parameters

value

The value of the user property. Values can be up to 36 characters long. Setting the
value to nil removes the user property.

name

The name of the user property to set. Should contain 1 to 24 alphanumeric characters
or underscores and must start with an alphabetic character. The firebase_, google_, and
ga_ prefixes are reserved and should not be used for user property names.

Parameters

Sets the current screen name, which specifies the current visual context in your app. This helps
identify the areas in your app where users spend their time and how they interact with your app.
Must be called on the main thread.

Note that screen reporting is enabled automatically and records the class name of the current
UIViewController for you without requiring you to call this method. If you implement
viewDidAppear in your UIViewController but do not call [super viewDidAppear:], that screen class
will not be automatically tracked. The class name can optionally be overridden by calling this
method in the viewDidAppear callback of your UIViewController and specifying the
screenClassOverride parameter. setScreenName:screenClass: must be called after
[super viewDidAppear:].

If your app does not use a distinct UIViewController for each screen, you should call this
method and specify a distinct screenName each time a new screen is presented to the user.

The screen name and screen class remain in effect until the current UIViewController changes or
a new call to setScreenName:screenClass: is made.