Skip to content

Analytics reference

At a glance

  • Analytics.log_event(name, parameters), log_screen_view(screen_name, screen_class, parameters), set_user_property(value, name), set_user_id(id), set_default_event_parameters(params), set_analytics_collection_enabled(bool), set_session_timeout_interval(seconds), session_id(cb), app_instance_id(), reset_analytics_data(), set_consent(consent), initiate_on_device_conversion_measurement(...), handle_open_url(url), handle_user_activity(activity)
  • Event, Param, UserProperty (every name from the SDK headers), ConsentType, ConsentStatus

pyios_firebase.analytics

Google Analytics for Firebase: log events and user properties.

from pyios_firebase.analytics import Analytics, Event, Param

Analytics.log_event(Event.SELECT_CONTENT, {
    Param.CONTENT_TYPE: "image",
    Param.ITEM_ID: "P12453",
})
Analytics.log_screen_view("Checkout", "CheckoutScreen")
Analytics.set_user_property("premium", "plan")

Screen views are not logged automatically for Kivy screens (the SDK only sees the one UIViewController): call log_screen_view when a screen opens.

Names and values are checked first: a bad one raises ValueError or TypeError instead of being dropped quietly by the SDK.

To see events as they are logged, run the app with -FIRDebugEnabled (in Xcode: Product > Scheme > Edit Scheme > Arguments) and open DebugView in the Firebase console.

Needs the FirebaseAnalytics framework.

Modules:

Name Description
names

Names Google Analytics understands, generated from the SDK headers

Classes:

Name Description
Event

Event names Google Analytics understands (FIREventNames.h).

Param

Event parameter names Google Analytics understands (FIRParameterNames.h).

UserProperty

User property names Google Analytics understands (FIRUserPropertyNames.h).

ConsentType

What a consent covers (FIRConsentType).

ConsentStatus

A consent's status (FIRConsentStatus).

Analytics

Google Analytics. Every method is a static method, as in the SDK::

Event

Event names Google Analytics understands (FIREventNames.h).

Attributes:

Name Type Description
AD_IMPRESSION Final

Ad Impression event.

ADD_PAYMENT_INFO Final

Add Payment Info event.

ADD_SHIPPING_INFO Final

Add Shipping Info event.

ADD_TO_CART Final

E-Commerce Add To Cart event.

ADD_TO_WISHLIST Final

E-Commerce Add To Wishlist event.

APP_OPEN Final

App Open event.

BEGIN_CHECKOUT Final

E-Commerce Begin Checkout event.

CAMPAIGN_DETAILS Final

Campaign Detail event.

EARN_VIRTUAL_CURRENCY Final

Earn Virtual Currency event.

GENERATE_LEAD Final

Generate Lead event.

IN_APP_PURCHASE Final

In-App Purchase event.

JOIN_GROUP Final

Join Group event.

LEVEL_END Final

Level End event.

LEVEL_START Final

Level Start event.

LEVEL_UP Final

Level Up event.

LOGIN Final

Login event.

POST_SCORE Final

Post Score event.

PURCHASE Final

E-Commerce Purchase event.

REFUND Final

E-Commerce Refund event.

REMOVE_FROM_CART Final

E-Commerce Remove from Cart event.

SCREEN_VIEW Final

Screen View event.

SEARCH Final

Search event.

SELECT_CONTENT Final

Select Content event.

SELECT_ITEM Final

Select Item event.

SELECT_PROMOTION Final

Select promotion event.

SHARE Final

Share event.

SIGN_UP Final

Sign Up event.

SPEND_VIRTUAL_CURRENCY Final

Spend Virtual Currency event.

TUTORIAL_BEGIN Final

Tutorial Begin event.

TUTORIAL_COMPLETE Final

Tutorial End event.

UNLOCK_ACHIEVEMENT Final

Unlock Achievement event.

VIEW_CART Final

E-commerce View Cart event.

VIEW_ITEM Final

View Item event.

VIEW_ITEM_LIST Final

View Item List event.

VIEW_PROMOTION Final

View Promotion event.

VIEW_SEARCH_RESULTS Final

View Search Results event.

AD_IMPRESSION class-attribute instance-attribute

AD_IMPRESSION: Final = 'ad_impression'

Ad Impression event.

ADD_PAYMENT_INFO class-attribute instance-attribute

ADD_PAYMENT_INFO: Final = 'add_payment_info'

Add Payment Info event.

ADD_SHIPPING_INFO class-attribute instance-attribute

ADD_SHIPPING_INFO: Final = 'add_shipping_info'

Add Shipping Info event.

ADD_TO_CART class-attribute instance-attribute

ADD_TO_CART: Final = 'add_to_cart'

E-Commerce Add To Cart event.

ADD_TO_WISHLIST class-attribute instance-attribute

ADD_TO_WISHLIST: Final = 'add_to_wishlist'

E-Commerce Add To Wishlist event.

APP_OPEN class-attribute instance-attribute

APP_OPEN: Final = 'app_open'

App Open event.

BEGIN_CHECKOUT class-attribute instance-attribute

BEGIN_CHECKOUT: Final = 'begin_checkout'

E-Commerce Begin Checkout event.

CAMPAIGN_DETAILS class-attribute instance-attribute

CAMPAIGN_DETAILS: Final = 'campaign_details'

Campaign Detail event.

EARN_VIRTUAL_CURRENCY class-attribute instance-attribute

EARN_VIRTUAL_CURRENCY: Final = 'earn_virtual_currency'

Earn Virtual Currency event.

GENERATE_LEAD class-attribute instance-attribute

GENERATE_LEAD: Final = 'generate_lead'

Generate Lead event.

IN_APP_PURCHASE class-attribute instance-attribute

IN_APP_PURCHASE: Final = 'in_app_purchase'

In-App Purchase event.

JOIN_GROUP class-attribute instance-attribute

JOIN_GROUP: Final = 'join_group'

Join Group event.

LEVEL_END class-attribute instance-attribute

LEVEL_END: Final = 'level_end'

Level End event.

LEVEL_START class-attribute instance-attribute

LEVEL_START: Final = 'level_start'

Level Start event.

LEVEL_UP class-attribute instance-attribute

LEVEL_UP: Final = 'level_up'

Level Up event.

LOGIN class-attribute instance-attribute

LOGIN: Final = 'login'

Login event.

POST_SCORE class-attribute instance-attribute

POST_SCORE: Final = 'post_score'

Post Score event.

PURCHASE class-attribute instance-attribute

PURCHASE: Final = 'purchase'

E-Commerce Purchase event.

REFUND class-attribute instance-attribute

REFUND: Final = 'refund'

E-Commerce Refund event.

REMOVE_FROM_CART class-attribute instance-attribute

REMOVE_FROM_CART: Final = 'remove_from_cart'

E-Commerce Remove from Cart event.

SCREEN_VIEW class-attribute instance-attribute

SCREEN_VIEW: Final = 'screen_view'

Screen View event.

SEARCH class-attribute instance-attribute

SEARCH: Final = 'search'

Search event.

SELECT_CONTENT class-attribute instance-attribute

SELECT_CONTENT: Final = 'select_content'

Select Content event.

SELECT_ITEM class-attribute instance-attribute

SELECT_ITEM: Final = 'select_item'

Select Item event.

SELECT_PROMOTION class-attribute instance-attribute

SELECT_PROMOTION: Final = 'select_promotion'

Select promotion event.

SHARE class-attribute instance-attribute

SHARE: Final = 'share'

Share event.

SIGN_UP class-attribute instance-attribute

SIGN_UP: Final = 'sign_up'

Sign Up event.

SPEND_VIRTUAL_CURRENCY class-attribute instance-attribute

SPEND_VIRTUAL_CURRENCY: Final = 'spend_virtual_currency'

Spend Virtual Currency event.

TUTORIAL_BEGIN class-attribute instance-attribute

TUTORIAL_BEGIN: Final = 'tutorial_begin'

Tutorial Begin event.

TUTORIAL_COMPLETE class-attribute instance-attribute

TUTORIAL_COMPLETE: Final = 'tutorial_complete'

Tutorial End event.

UNLOCK_ACHIEVEMENT class-attribute instance-attribute

UNLOCK_ACHIEVEMENT: Final = 'unlock_achievement'

Unlock Achievement event.

VIEW_CART class-attribute instance-attribute

VIEW_CART: Final = 'view_cart'

E-commerce View Cart event.

VIEW_ITEM class-attribute instance-attribute

VIEW_ITEM: Final = 'view_item'

View Item event.

VIEW_ITEM_LIST class-attribute instance-attribute

VIEW_ITEM_LIST: Final = 'view_item_list'

View Item List event.

VIEW_PROMOTION class-attribute instance-attribute

VIEW_PROMOTION: Final = 'view_promotion'

View Promotion event.

VIEW_SEARCH_RESULTS class-attribute instance-attribute

VIEW_SEARCH_RESULTS: Final = 'view_search_results'

View Search Results event.

Param

Event parameter names Google Analytics understands (FIRParameterNames.h).

Attributes:

Name Type Description
ACHIEVEMENT_ID Final

Game achievement ID (String).

AD_FORMAT Final

The ad format (e.g.

AD_NETWORK_CLICK_ID Final

Ad Network Click ID (String).

AD_PLATFORM Final

The ad platform (e.g.

AD_SOURCE Final

The ad source (e.g.

AD_UNIT_NAME Final

The ad unit name (e.g.

AFFILIATION Final

A product affiliation to designate a supplying company or brick and mortar store location (String).

CP1 Final

Campaign custom parameter (String).

CAMPAIGN Final

The individual campaign name, slogan, promo code, etc.

CAMPAIGN_ID Final

Campaign ID (String).

CHARACTER Final

Character used in game (String).

CONTENT Final

Campaign content (String).

CONTENT_TYPE Final

Type of content selected (String).

COUPON Final

Coupon code used for a purchase (String).

CREATIVE_FORMAT Final

Creative Format (String).

CREATIVE_NAME Final

The name of a creative used in a promotional spot (String).

CREATIVE_SLOT Final

The name of a creative slot (String).

CURRENCY Final

Currency of the purchase or items associated with the event, in 3-letter ISO_4217 format (String).

DESTINATION Final

Flight or Travel destination (String).

DISCOUNT Final

Monetary value of discount associated with a purchase (Double).

END_DATE Final

The arrival date, check-out date or rental end date for the item.

EXTEND_SESSION Final

Indicates that the associated event should either extend the current session or start a new session if no session was active when the event was logged.

FLIGHT_NUMBER Final

Flight number for travel events (String).

FREE_TRIAL Final

Indicates if the user is on a free trial of a subscription.

GROUP_ID Final

Group/clan/guild ID (String).

INDEX Final

The index of the item in a list (Int).

ITEM_BRAND Final

Item brand (String).

ITEM_CATEGORY Final

Item category (context-specific) (String).

ITEM_CATEGORY2 Final

Item Category (context-specific) (String).

ITEM_CATEGORY3 Final

Item Category (context-specific) (String).

ITEM_CATEGORY4 Final

Item Category (context-specific) (String).

ITEM_CATEGORY5 Final

Item Category (context-specific) (String).

ITEM_ID Final

Item ID (context-specific) (String).

ITEM_LIST_ID Final

The ID of the list in which the item was presented to the user (String).

ITEM_LIST_NAME Final

The name of the list in which the item was presented to the user (String).

ITEM_NAME Final

Item Name (context-specific) (String).

ITEM_VARIANT Final

Item variant (String).

ITEMS Final

The list of items involved in the transaction expressed as [[String: Any]].

LEVEL Final

Level in game (Int).

LEVEL_NAME Final

The name of a level in a game (String).

LOCATION Final

Location (String).

LOCATION_ID Final

The location associated with the event.

MARKETING_TACTIC Final

Marketing Tactic (String).

MEDIUM Final

The advertising or marketing medium, for example: cpc, banner, email, push.

METHOD Final

A particular approach used in an operation; for example, 'facebook' or 'email' in the context of a sign_up or login event.

NUMBER_OF_NIGHTS Final

Number of nights staying at hotel (Int).

NUMBER_OF_PASSENGERS Final

Number of passengers traveling (Int).

NUMBER_OF_ROOMS Final

Number of rooms for travel events (Int).

ORIGIN Final

Flight or Travel origin (String).

PAYMENT_TYPE Final

The chosen method of payment (String).

PRICE Final

Purchase price (Double).

PRICE_IS_DISCOUNTED Final

Indicates if an item's price is discounted.

PRODUCT_ID Final

The ID of a product (String).

PRODUCT_NAME Final

The name of a product (String).

PROMOTION_ID Final

The ID of a product promotion (String).

PROMOTION_NAME Final

The name of a product promotion (String).

QUANTITY Final

Purchase quantity (Int).

SCORE Final

Score in game (Int).

SCREEN_CLASS Final

Current screen class, such as the class name of the UIViewController, logged with screen_view event and added to every event (String).

SCREEN_NAME Final

Current screen name, such as the name of the UIViewController, logged with screen_view event and added to every event (String).

SEARCH_TERM Final

The search string/keywords used (String).

SHIPPING Final

Shipping cost associated with a transaction (Double).

SHIPPING_TIER Final

The shipping tier (e.g.

SOURCE Final

The origin of your traffic, such as an Ad network (for example, google) or partner (urban airship).

SOURCE_PLATFORM Final

Source Platform (String).

START_DATE Final

The departure date, check-in date or rental start date for the item.

SUBSCRIPTION Final

Indicates if the purchase is a subscription.

SUCCESS Final

The result of an operation.

TAX Final

Tax cost associated with a transaction (Double).

TERM Final

If you're manually tagging keyword campaigns, you should use utm_term to specify the keyword (String).

TRANSACTION_ID Final

The unique identifier of a transaction (String).

TRAVEL_CLASS Final

Travel class (String).

VALUE Final

A context-specific numeric value which is accumulated automatically for each event type.

VIRTUAL_CURRENCY_NAME Final

Name of virtual currency type (String).

ACHIEVEMENT_ID class-attribute instance-attribute

ACHIEVEMENT_ID: Final = 'achievement_id'

Game achievement ID (String).

AD_FORMAT class-attribute instance-attribute

AD_FORMAT: Final = 'ad_format'

The ad format (e.g.

AD_NETWORK_CLICK_ID class-attribute instance-attribute

AD_NETWORK_CLICK_ID: Final = 'aclid'

Ad Network Click ID (String).

AD_PLATFORM class-attribute instance-attribute

AD_PLATFORM: Final = 'ad_platform'

The ad platform (e.g.

AD_SOURCE class-attribute instance-attribute

AD_SOURCE: Final = 'ad_source'

The ad source (e.g.

AD_UNIT_NAME class-attribute instance-attribute

AD_UNIT_NAME: Final = 'ad_unit_name'

The ad unit name (e.g.

AFFILIATION class-attribute instance-attribute

AFFILIATION: Final = 'affiliation'

A product affiliation to designate a supplying company or brick and mortar store location (String).

CP1 class-attribute instance-attribute

CP1: Final = 'cp1'

Campaign custom parameter (String).

CAMPAIGN class-attribute instance-attribute

CAMPAIGN: Final = 'campaign'

The individual campaign name, slogan, promo code, etc.

CAMPAIGN_ID class-attribute instance-attribute

CAMPAIGN_ID: Final = 'campaign_id'

Campaign ID (String).

CHARACTER class-attribute instance-attribute

CHARACTER: Final = 'character'

Character used in game (String).

CONTENT class-attribute instance-attribute

CONTENT: Final = 'content'

Campaign content (String).

CONTENT_TYPE class-attribute instance-attribute

CONTENT_TYPE: Final = 'content_type'

Type of content selected (String).

COUPON class-attribute instance-attribute

COUPON: Final = 'coupon'

Coupon code used for a purchase (String).

CREATIVE_FORMAT class-attribute instance-attribute

CREATIVE_FORMAT: Final = 'creative_format'

Creative Format (String).

CREATIVE_NAME class-attribute instance-attribute

CREATIVE_NAME: Final = 'creative_name'

The name of a creative used in a promotional spot (String).

CREATIVE_SLOT class-attribute instance-attribute

CREATIVE_SLOT: Final = 'creative_slot'

The name of a creative slot (String).

CURRENCY class-attribute instance-attribute

CURRENCY: Final = 'currency'

Currency of the purchase or items associated with the event, in 3-letter ISO_4217 format (String).

DESTINATION class-attribute instance-attribute

DESTINATION: Final = 'destination'

Flight or Travel destination (String).

DISCOUNT class-attribute instance-attribute

DISCOUNT: Final = 'discount'

Monetary value of discount associated with a purchase (Double).

END_DATE class-attribute instance-attribute

END_DATE: Final = 'end_date'

The arrival date, check-out date or rental end date for the item.

EXTEND_SESSION class-attribute instance-attribute

EXTEND_SESSION: Final = 'extend_session'

Indicates that the associated event should either extend the current session or start a new session if no session was active when the event was logged.

FLIGHT_NUMBER class-attribute instance-attribute

FLIGHT_NUMBER: Final = 'flight_number'

Flight number for travel events (String).

FREE_TRIAL class-attribute instance-attribute

FREE_TRIAL: Final = 'free_trial'

Indicates if the user is on a free trial of a subscription.

GROUP_ID class-attribute instance-attribute

GROUP_ID: Final = 'group_id'

Group/clan/guild ID (String).

INDEX class-attribute instance-attribute

INDEX: Final = 'index'

The index of the item in a list (Int).

ITEM_BRAND class-attribute instance-attribute

ITEM_BRAND: Final = 'item_brand'

Item brand (String).

ITEM_CATEGORY class-attribute instance-attribute

ITEM_CATEGORY: Final = 'item_category'

Item category (context-specific) (String).

ITEM_CATEGORY2 class-attribute instance-attribute

ITEM_CATEGORY2: Final = 'item_category2'

Item Category (context-specific) (String).

ITEM_CATEGORY3 class-attribute instance-attribute

ITEM_CATEGORY3: Final = 'item_category3'

Item Category (context-specific) (String).

ITEM_CATEGORY4 class-attribute instance-attribute

ITEM_CATEGORY4: Final = 'item_category4'

Item Category (context-specific) (String).

ITEM_CATEGORY5 class-attribute instance-attribute

ITEM_CATEGORY5: Final = 'item_category5'

Item Category (context-specific) (String).

ITEM_ID class-attribute instance-attribute

ITEM_ID: Final = 'item_id'

Item ID (context-specific) (String).

ITEM_LIST_ID class-attribute instance-attribute

ITEM_LIST_ID: Final = 'item_list_id'

The ID of the list in which the item was presented to the user (String).

ITEM_LIST_NAME class-attribute instance-attribute

ITEM_LIST_NAME: Final = 'item_list_name'

The name of the list in which the item was presented to the user (String).

ITEM_NAME class-attribute instance-attribute

ITEM_NAME: Final = 'item_name'

Item Name (context-specific) (String).

ITEM_VARIANT class-attribute instance-attribute

ITEM_VARIANT: Final = 'item_variant'

Item variant (String).

ITEMS class-attribute instance-attribute

ITEMS: Final = 'items'

The list of items involved in the transaction expressed as [[String: Any]].

LEVEL class-attribute instance-attribute

LEVEL: Final = 'level'

Level in game (Int).

LEVEL_NAME class-attribute instance-attribute

LEVEL_NAME: Final = 'level_name'

The name of a level in a game (String).

LOCATION class-attribute instance-attribute

LOCATION: Final = 'location'

Location (String).

LOCATION_ID class-attribute instance-attribute

LOCATION_ID: Final = 'location_id'

The location associated with the event.

MARKETING_TACTIC class-attribute instance-attribute

MARKETING_TACTIC: Final = 'marketing_tactic'

Marketing Tactic (String).

MEDIUM class-attribute instance-attribute

MEDIUM: Final = 'medium'

The advertising or marketing medium, for example: cpc, banner, email, push.

METHOD class-attribute instance-attribute

METHOD: Final = 'method'

A particular approach used in an operation; for example, 'facebook' or 'email' in the context of a sign_up or login event.

NUMBER_OF_NIGHTS class-attribute instance-attribute

NUMBER_OF_NIGHTS: Final = 'number_of_nights'

Number of nights staying at hotel (Int).

NUMBER_OF_PASSENGERS class-attribute instance-attribute

NUMBER_OF_PASSENGERS: Final = 'number_of_passengers'

Number of passengers traveling (Int).

NUMBER_OF_ROOMS class-attribute instance-attribute

NUMBER_OF_ROOMS: Final = 'number_of_rooms'

Number of rooms for travel events (Int).

ORIGIN class-attribute instance-attribute

ORIGIN: Final = 'origin'

Flight or Travel origin (String).

PAYMENT_TYPE class-attribute instance-attribute

PAYMENT_TYPE: Final = 'payment_type'

The chosen method of payment (String).

PRICE class-attribute instance-attribute

PRICE: Final = 'price'

Purchase price (Double).

PRICE_IS_DISCOUNTED class-attribute instance-attribute

PRICE_IS_DISCOUNTED: Final = 'price_is_discounted'

Indicates if an item's price is discounted.

PRODUCT_ID class-attribute instance-attribute

PRODUCT_ID: Final = 'product_id'

The ID of a product (String).

PRODUCT_NAME class-attribute instance-attribute

PRODUCT_NAME: Final = 'product_name'

The name of a product (String).

PROMOTION_ID class-attribute instance-attribute

PROMOTION_ID: Final = 'promotion_id'

The ID of a product promotion (String).

PROMOTION_NAME class-attribute instance-attribute

PROMOTION_NAME: Final = 'promotion_name'

The name of a product promotion (String).

QUANTITY class-attribute instance-attribute

QUANTITY: Final = 'quantity'

Purchase quantity (Int).

SCORE class-attribute instance-attribute

SCORE: Final = 'score'

Score in game (Int).

SCREEN_CLASS class-attribute instance-attribute

SCREEN_CLASS: Final = 'screen_class'

Current screen class, such as the class name of the UIViewController, logged with screen_view event and added to every event (String).

SCREEN_NAME class-attribute instance-attribute

SCREEN_NAME: Final = 'screen_name'

Current screen name, such as the name of the UIViewController, logged with screen_view event and added to every event (String).

SEARCH_TERM class-attribute instance-attribute

SEARCH_TERM: Final = 'search_term'

The search string/keywords used (String).

SHIPPING class-attribute instance-attribute

SHIPPING: Final = 'shipping'

Shipping cost associated with a transaction (Double).

SHIPPING_TIER class-attribute instance-attribute

SHIPPING_TIER: Final = 'shipping_tier'

The shipping tier (e.g.

SOURCE class-attribute instance-attribute

SOURCE: Final = 'source'

The origin of your traffic, such as an Ad network (for example, google) or partner (urban airship).

SOURCE_PLATFORM class-attribute instance-attribute

SOURCE_PLATFORM: Final = 'source_platform'

Source Platform (String).

START_DATE class-attribute instance-attribute

START_DATE: Final = 'start_date'

The departure date, check-in date or rental start date for the item.

SUBSCRIPTION class-attribute instance-attribute

SUBSCRIPTION: Final = 'subscription'

Indicates if the purchase is a subscription.

SUCCESS class-attribute instance-attribute

SUCCESS: Final = 'success'

The result of an operation.

TAX class-attribute instance-attribute

TAX: Final = 'tax'

Tax cost associated with a transaction (Double).

TERM class-attribute instance-attribute

TERM: Final = 'term'

If you're manually tagging keyword campaigns, you should use utm_term to specify the keyword (String).

TRANSACTION_ID class-attribute instance-attribute

TRANSACTION_ID: Final = 'transaction_id'

The unique identifier of a transaction (String).

TRAVEL_CLASS class-attribute instance-attribute

TRAVEL_CLASS: Final = 'travel_class'

Travel class (String).

VALUE class-attribute instance-attribute

VALUE: Final = 'value'

A context-specific numeric value which is accumulated automatically for each event type.

VIRTUAL_CURRENCY_NAME class-attribute instance-attribute

VIRTUAL_CURRENCY_NAME: Final = 'virtual_currency_name'

Name of virtual currency type (String).

UserProperty

User property names Google Analytics understands (FIRUserPropertyNames.h).

Attributes:

Name Type Description
ALLOW_AD_PERSONALIZATION_SIGNALS Final

Indicates whether events logged by Google Analytics can be used to personalize ads for the user.

SIGN_UP_METHOD Final

The method used to sign in.

ALLOW_AD_PERSONALIZATION_SIGNALS class-attribute instance-attribute

ALLOW_AD_PERSONALIZATION_SIGNALS: Final = (
    "allow_personalized_ads"
)

Indicates whether events logged by Google Analytics can be used to personalize ads for the user.

SIGN_UP_METHOD class-attribute instance-attribute

SIGN_UP_METHOD: Final = 'sign_up_method'

The method used to sign in.

ConsentType

What a consent covers (FIRConsentType).

Attributes:

Name Type Description
AD_STORAGE Final

Storage (such as device identifiers) for advertising.

ANALYTICS_STORAGE Final

Storage (such as app identifiers) for analytics.

AD_USER_DATA Final

Sending user data to Google for advertising.

AD_PERSONALIZATION Final

Personalized advertising (remarketing).

AD_STORAGE class-attribute instance-attribute

AD_STORAGE: Final = 'ad_storage'

Storage (such as device identifiers) for advertising.

ANALYTICS_STORAGE class-attribute instance-attribute

ANALYTICS_STORAGE: Final = 'analytics_storage'

Storage (such as app identifiers) for analytics.

AD_USER_DATA class-attribute instance-attribute

AD_USER_DATA: Final = 'ad_user_data'

Sending user data to Google for advertising.

AD_PERSONALIZATION class-attribute instance-attribute

AD_PERSONALIZATION: Final = 'ad_personalization'

Personalized advertising (remarketing).

ConsentStatus

A consent's status (FIRConsentStatus).

Analytics

Google Analytics. Every method is a static method, as in the SDK::

Analytics.log_event("level_up", {"level": 3})

Methods:

Name Description
log_event

Log an event.

log_screen_view

Log that a screen was shown (the screen_view event).

set_user_property

Set a user property, to filter and compare users in reports. Register

set_user_id

Set the user ID (your own ID for the user; never personal data such

set_analytics_collection_enabled

Turn collection on or off. The setting is kept across launches. To

set_session_timeout_interval

How long the app can be inactive before the session ends (default

session_id

The current session's ID.

app_instance_id

This app install's ID, or None when ANALYTICS_STORAGE

reset_analytics_data

Clear the data on this device and make a new app instance ID.

set_default_event_parameters

Parameters added to every event logged from now on (kept across

set_consent

Set the user's consent (Google consent mode). Types left out keep

initiate_on_device_conversion_measurement

Google Ads on-device conversion measurement, from what the user

handle_open_url

Tell Analytics the app was opened from a URL (campaign attribution).

handle_user_activity

Tell Analytics about a universal link the app was opened with. Only

log_event staticmethod

log_event(
    name: str, parameters: Mapping[str, Any] | None = None
) -> None

Log an event.

Parameters:

Name Type Description Default
name str

the event name: an Event constant, or your own (1 to 40 letters, digits and underscores, starting with a letter).

required
parameters Mapping[str, Any] | None

up to 25 parameters: Param constants or your own names, to str, int or float values. Param.ITEMS takes a list of item dicts. String values over 100 characters are cut by Analytics.

None

Raises:

Type Description
ValueError

an invalid or reserved name, or too many parameters.

TypeError

a value of another type (bool too: use 1 / 0).

log_screen_view staticmethod

log_screen_view(
    screen_name: str,
    screen_class: str | None = None,
    parameters: Mapping[str, Any] | None = None,
) -> None

Log that a screen was shown (the screen_view event).

Parameters:

Name Type Description Default
screen_name str

the screen's name, for example "Checkout".

required
screen_class str | None

the screen's class, for example the Kivy Screen class name.

None
parameters Mapping[str, Any] | None

more parameters for the event.

None

Raises:

Type Description
ValueError

an invalid parameter name.

TypeError

a parameter value of another type.

set_user_property staticmethod

set_user_property(value: str | None, name: str) -> None

Set a user property, to filter and compare users in reports. Register it in the Firebase console (Custom definitions) to see it there.

Parameters:

Name Type Description Default
value str | None

the value (up to 36 characters), or None to remove it.

required
name str

the property name (1 to 24 letters, digits and underscores, starting with a letter).

required

Raises:

Type Description
ValueError

an invalid or reserved name, or a value over 36 characters.

TypeError

value is not a str or None.

set_user_id staticmethod

set_user_id(user_id: str | None) -> None

Set the user ID (your own ID for the user; never personal data such as an email address).

Parameters:

Name Type Description Default
user_id str | None

up to 256 characters, or None to remove it.

required

Raises:

Type Description
ValueError

an empty ID or one over 256 characters.

set_analytics_collection_enabled staticmethod

set_analytics_collection_enabled(enabled: bool) -> None

Turn collection on or off. The setting is kept across launches. To start the app with it off, set FIREBASE_ANALYTICS_COLLECTION_ENABLED to NO in Info.plist.

Parameters:

Name Type Description Default
enabled bool

False to stop collecting.

required

set_session_timeout_interval staticmethod

set_session_timeout_interval(seconds: float) -> None

How long the app can be inactive before the session ends (default 1800 s).

Parameters:

Name Type Description Default
seconds float

the timeout.

required

session_id staticmethod

session_id(
    callback: Callable[
        [int | None, FirebaseError | None], None
    ],
) -> None

The current session's ID.

Parameters:

Name Type Description Default
callback Callable[[int | None, FirebaseError | None], None]

gets (session_id, None), or (None, error) (for example with collection off). It runs on a background thread.

required

app_instance_id staticmethod

app_instance_id() -> str | None

This app install's ID, or None when ANALYTICS_STORAGE consent is denied.

reset_analytics_data staticmethod

reset_analytics_data() -> None

Clear the data on this device and make a new app instance ID.

set_default_event_parameters staticmethod

set_default_event_parameters(
    parameters: Mapping[str, Any] | None,
) -> None

Parameters added to every event logged from now on (kept across launches).

Parameters:

Name Type Description Default
parameters Mapping[str, Any] | None

parameter names to values (a None value removes that default), or None to remove all defaults.

required

Raises:

Type Description
ValueError

an invalid name.

TypeError

a value of another type.

set_consent(consent: Mapping[str, str]) -> None

Set the user's consent (Google consent mode). Types left out keep their status.

::

Analytics.set_consent({
    ConsentType.ANALYTICS_STORAGE: ConsentStatus.GRANTED,
    ConsentType.AD_STORAGE: ConsentStatus.DENIED,
})

Parameters:

Name Type Description Default
consent Mapping[str, str]

ConsentType to ConsentStatus.

required

Raises:

Type Description
ValueError

an unknown type or status.

initiate_on_device_conversion_measurement staticmethod

initiate_on_device_conversion_measurement(
    *,
    email_address: str | None = None,
    phone_number: str | None = None,
    hashed_email_address: bytes | None = None,
    hashed_phone_number: bytes | None = None,
) -> None

Google Ads on-device conversion measurement, from what the user consented to share. Give exactly one argument. Needs the GoogleAdsOnDeviceConversion package in the app (otherwise it does nothing).

Parameters:

Name Type Description Default
email_address str | None

the email address.

None
phone_number str | None

the phone number in E.164 format ("+15555550100").

None
hashed_email_address bytes | None

the SHA-256 of the normalized email address.

None
hashed_phone_number bytes | None

the SHA-256 of the phone number in E.164 format.

None

Raises:

Type Description
ValueError

not exactly one argument.

handle_open_url staticmethod

handle_open_url(url: str) -> None

Tell Analytics the app was opened from a URL (campaign attribution). Only needed when FirebaseAppDelegateProxyEnabled is NO.

Parameters:

Name Type Description Default
url str

the URL the app was opened with.

required

handle_user_activity staticmethod

handle_user_activity(user_activity: ObjCObject) -> None

Tell Analytics about a universal link the app was opened with. Only needed when FirebaseAppDelegateProxyEnabled is NO.

Parameters:

Name Type Description Default
user_activity ObjCObject

the NSUserActivity.

required

pyios_firebase.analytics.names

Names Google Analytics understands, generated from the SDK headers (FIREventNames.h, FIRParameterNames.h, FIRUserPropertyNames.h).

Use them for the reports Analytics builds from them (e-commerce, levels, screens...). Your own names work too.

Classes:

Name Description
Event

Event names Google Analytics understands (FIREventNames.h).

Param

Event parameter names Google Analytics understands (FIRParameterNames.h).

UserProperty

User property names Google Analytics understands (FIRUserPropertyNames.h).

Event

Event names Google Analytics understands (FIREventNames.h).

Attributes:

Name Type Description
AD_IMPRESSION Final

Ad Impression event.

ADD_PAYMENT_INFO Final

Add Payment Info event.

ADD_SHIPPING_INFO Final

Add Shipping Info event.

ADD_TO_CART Final

E-Commerce Add To Cart event.

ADD_TO_WISHLIST Final

E-Commerce Add To Wishlist event.

APP_OPEN Final

App Open event.

BEGIN_CHECKOUT Final

E-Commerce Begin Checkout event.

CAMPAIGN_DETAILS Final

Campaign Detail event.

EARN_VIRTUAL_CURRENCY Final

Earn Virtual Currency event.

GENERATE_LEAD Final

Generate Lead event.

IN_APP_PURCHASE Final

In-App Purchase event.

JOIN_GROUP Final

Join Group event.

LEVEL_END Final

Level End event.

LEVEL_START Final

Level Start event.

LEVEL_UP Final

Level Up event.

LOGIN Final

Login event.

POST_SCORE Final

Post Score event.

PURCHASE Final

E-Commerce Purchase event.

REFUND Final

E-Commerce Refund event.

REMOVE_FROM_CART Final

E-Commerce Remove from Cart event.

SCREEN_VIEW Final

Screen View event.

SEARCH Final

Search event.

SELECT_CONTENT Final

Select Content event.

SELECT_ITEM Final

Select Item event.

SELECT_PROMOTION Final

Select promotion event.

SHARE Final

Share event.

SIGN_UP Final

Sign Up event.

SPEND_VIRTUAL_CURRENCY Final

Spend Virtual Currency event.

TUTORIAL_BEGIN Final

Tutorial Begin event.

TUTORIAL_COMPLETE Final

Tutorial End event.

UNLOCK_ACHIEVEMENT Final

Unlock Achievement event.

VIEW_CART Final

E-commerce View Cart event.

VIEW_ITEM Final

View Item event.

VIEW_ITEM_LIST Final

View Item List event.

VIEW_PROMOTION Final

View Promotion event.

VIEW_SEARCH_RESULTS Final

View Search Results event.

AD_IMPRESSION class-attribute instance-attribute

AD_IMPRESSION: Final = 'ad_impression'

Ad Impression event.

ADD_PAYMENT_INFO class-attribute instance-attribute

ADD_PAYMENT_INFO: Final = 'add_payment_info'

Add Payment Info event.

ADD_SHIPPING_INFO class-attribute instance-attribute

ADD_SHIPPING_INFO: Final = 'add_shipping_info'

Add Shipping Info event.

ADD_TO_CART class-attribute instance-attribute

ADD_TO_CART: Final = 'add_to_cart'

E-Commerce Add To Cart event.

ADD_TO_WISHLIST class-attribute instance-attribute

ADD_TO_WISHLIST: Final = 'add_to_wishlist'

E-Commerce Add To Wishlist event.

APP_OPEN class-attribute instance-attribute

APP_OPEN: Final = 'app_open'

App Open event.

BEGIN_CHECKOUT class-attribute instance-attribute

BEGIN_CHECKOUT: Final = 'begin_checkout'

E-Commerce Begin Checkout event.

CAMPAIGN_DETAILS class-attribute instance-attribute

CAMPAIGN_DETAILS: Final = 'campaign_details'

Campaign Detail event.

EARN_VIRTUAL_CURRENCY class-attribute instance-attribute

EARN_VIRTUAL_CURRENCY: Final = 'earn_virtual_currency'

Earn Virtual Currency event.

GENERATE_LEAD class-attribute instance-attribute

GENERATE_LEAD: Final = 'generate_lead'

Generate Lead event.

IN_APP_PURCHASE class-attribute instance-attribute

IN_APP_PURCHASE: Final = 'in_app_purchase'

In-App Purchase event.

JOIN_GROUP class-attribute instance-attribute

JOIN_GROUP: Final = 'join_group'

Join Group event.

LEVEL_END class-attribute instance-attribute

LEVEL_END: Final = 'level_end'

Level End event.

LEVEL_START class-attribute instance-attribute

LEVEL_START: Final = 'level_start'

Level Start event.

LEVEL_UP class-attribute instance-attribute

LEVEL_UP: Final = 'level_up'

Level Up event.

LOGIN class-attribute instance-attribute

LOGIN: Final = 'login'

Login event.

POST_SCORE class-attribute instance-attribute

POST_SCORE: Final = 'post_score'

Post Score event.

PURCHASE class-attribute instance-attribute

PURCHASE: Final = 'purchase'

E-Commerce Purchase event.

REFUND class-attribute instance-attribute

REFUND: Final = 'refund'

E-Commerce Refund event.

REMOVE_FROM_CART class-attribute instance-attribute

REMOVE_FROM_CART: Final = 'remove_from_cart'

E-Commerce Remove from Cart event.

SCREEN_VIEW class-attribute instance-attribute

SCREEN_VIEW: Final = 'screen_view'

Screen View event.

SEARCH class-attribute instance-attribute

SEARCH: Final = 'search'

Search event.

SELECT_CONTENT class-attribute instance-attribute

SELECT_CONTENT: Final = 'select_content'

Select Content event.

SELECT_ITEM class-attribute instance-attribute

SELECT_ITEM: Final = 'select_item'

Select Item event.

SELECT_PROMOTION class-attribute instance-attribute

SELECT_PROMOTION: Final = 'select_promotion'

Select promotion event.

SHARE class-attribute instance-attribute

SHARE: Final = 'share'

Share event.

SIGN_UP class-attribute instance-attribute

SIGN_UP: Final = 'sign_up'

Sign Up event.

SPEND_VIRTUAL_CURRENCY class-attribute instance-attribute

SPEND_VIRTUAL_CURRENCY: Final = 'spend_virtual_currency'

Spend Virtual Currency event.

TUTORIAL_BEGIN class-attribute instance-attribute

TUTORIAL_BEGIN: Final = 'tutorial_begin'

Tutorial Begin event.

TUTORIAL_COMPLETE class-attribute instance-attribute

TUTORIAL_COMPLETE: Final = 'tutorial_complete'

Tutorial End event.

UNLOCK_ACHIEVEMENT class-attribute instance-attribute

UNLOCK_ACHIEVEMENT: Final = 'unlock_achievement'

Unlock Achievement event.

VIEW_CART class-attribute instance-attribute

VIEW_CART: Final = 'view_cart'

E-commerce View Cart event.

VIEW_ITEM class-attribute instance-attribute

VIEW_ITEM: Final = 'view_item'

View Item event.

VIEW_ITEM_LIST class-attribute instance-attribute

VIEW_ITEM_LIST: Final = 'view_item_list'

View Item List event.

VIEW_PROMOTION class-attribute instance-attribute

VIEW_PROMOTION: Final = 'view_promotion'

View Promotion event.

VIEW_SEARCH_RESULTS class-attribute instance-attribute

VIEW_SEARCH_RESULTS: Final = 'view_search_results'

View Search Results event.

Param

Event parameter names Google Analytics understands (FIRParameterNames.h).

Attributes:

Name Type Description
ACHIEVEMENT_ID Final

Game achievement ID (String).

AD_FORMAT Final

The ad format (e.g.

AD_NETWORK_CLICK_ID Final

Ad Network Click ID (String).

AD_PLATFORM Final

The ad platform (e.g.

AD_SOURCE Final

The ad source (e.g.

AD_UNIT_NAME Final

The ad unit name (e.g.

AFFILIATION Final

A product affiliation to designate a supplying company or brick and mortar store location (String).

CP1 Final

Campaign custom parameter (String).

CAMPAIGN Final

The individual campaign name, slogan, promo code, etc.

CAMPAIGN_ID Final

Campaign ID (String).

CHARACTER Final

Character used in game (String).

CONTENT Final

Campaign content (String).

CONTENT_TYPE Final

Type of content selected (String).

COUPON Final

Coupon code used for a purchase (String).

CREATIVE_FORMAT Final

Creative Format (String).

CREATIVE_NAME Final

The name of a creative used in a promotional spot (String).

CREATIVE_SLOT Final

The name of a creative slot (String).

CURRENCY Final

Currency of the purchase or items associated with the event, in 3-letter ISO_4217 format (String).

DESTINATION Final

Flight or Travel destination (String).

DISCOUNT Final

Monetary value of discount associated with a purchase (Double).

END_DATE Final

The arrival date, check-out date or rental end date for the item.

EXTEND_SESSION Final

Indicates that the associated event should either extend the current session or start a new session if no session was active when the event was logged.

FLIGHT_NUMBER Final

Flight number for travel events (String).

FREE_TRIAL Final

Indicates if the user is on a free trial of a subscription.

GROUP_ID Final

Group/clan/guild ID (String).

INDEX Final

The index of the item in a list (Int).

ITEM_BRAND Final

Item brand (String).

ITEM_CATEGORY Final

Item category (context-specific) (String).

ITEM_CATEGORY2 Final

Item Category (context-specific) (String).

ITEM_CATEGORY3 Final

Item Category (context-specific) (String).

ITEM_CATEGORY4 Final

Item Category (context-specific) (String).

ITEM_CATEGORY5 Final

Item Category (context-specific) (String).

ITEM_ID Final

Item ID (context-specific) (String).

ITEM_LIST_ID Final

The ID of the list in which the item was presented to the user (String).

ITEM_LIST_NAME Final

The name of the list in which the item was presented to the user (String).

ITEM_NAME Final

Item Name (context-specific) (String).

ITEM_VARIANT Final

Item variant (String).

ITEMS Final

The list of items involved in the transaction expressed as [[String: Any]].

LEVEL Final

Level in game (Int).

LEVEL_NAME Final

The name of a level in a game (String).

LOCATION Final

Location (String).

LOCATION_ID Final

The location associated with the event.

MARKETING_TACTIC Final

Marketing Tactic (String).

MEDIUM Final

The advertising or marketing medium, for example: cpc, banner, email, push.

METHOD Final

A particular approach used in an operation; for example, 'facebook' or 'email' in the context of a sign_up or login event.

NUMBER_OF_NIGHTS Final

Number of nights staying at hotel (Int).

NUMBER_OF_PASSENGERS Final

Number of passengers traveling (Int).

NUMBER_OF_ROOMS Final

Number of rooms for travel events (Int).

ORIGIN Final

Flight or Travel origin (String).

PAYMENT_TYPE Final

The chosen method of payment (String).

PRICE Final

Purchase price (Double).

PRICE_IS_DISCOUNTED Final

Indicates if an item's price is discounted.

PRODUCT_ID Final

The ID of a product (String).

PRODUCT_NAME Final

The name of a product (String).

PROMOTION_ID Final

The ID of a product promotion (String).

PROMOTION_NAME Final

The name of a product promotion (String).

QUANTITY Final

Purchase quantity (Int).

SCORE Final

Score in game (Int).

SCREEN_CLASS Final

Current screen class, such as the class name of the UIViewController, logged with screen_view event and added to every event (String).

SCREEN_NAME Final

Current screen name, such as the name of the UIViewController, logged with screen_view event and added to every event (String).

SEARCH_TERM Final

The search string/keywords used (String).

SHIPPING Final

Shipping cost associated with a transaction (Double).

SHIPPING_TIER Final

The shipping tier (e.g.

SOURCE Final

The origin of your traffic, such as an Ad network (for example, google) or partner (urban airship).

SOURCE_PLATFORM Final

Source Platform (String).

START_DATE Final

The departure date, check-in date or rental start date for the item.

SUBSCRIPTION Final

Indicates if the purchase is a subscription.

SUCCESS Final

The result of an operation.

TAX Final

Tax cost associated with a transaction (Double).

TERM Final

If you're manually tagging keyword campaigns, you should use utm_term to specify the keyword (String).

TRANSACTION_ID Final

The unique identifier of a transaction (String).

TRAVEL_CLASS Final

Travel class (String).

VALUE Final

A context-specific numeric value which is accumulated automatically for each event type.

VIRTUAL_CURRENCY_NAME Final

Name of virtual currency type (String).

ACHIEVEMENT_ID class-attribute instance-attribute

ACHIEVEMENT_ID: Final = 'achievement_id'

Game achievement ID (String).

AD_FORMAT class-attribute instance-attribute

AD_FORMAT: Final = 'ad_format'

The ad format (e.g.

AD_NETWORK_CLICK_ID class-attribute instance-attribute

AD_NETWORK_CLICK_ID: Final = 'aclid'

Ad Network Click ID (String).

AD_PLATFORM class-attribute instance-attribute

AD_PLATFORM: Final = 'ad_platform'

The ad platform (e.g.

AD_SOURCE class-attribute instance-attribute

AD_SOURCE: Final = 'ad_source'

The ad source (e.g.

AD_UNIT_NAME class-attribute instance-attribute

AD_UNIT_NAME: Final = 'ad_unit_name'

The ad unit name (e.g.

AFFILIATION class-attribute instance-attribute

AFFILIATION: Final = 'affiliation'

A product affiliation to designate a supplying company or brick and mortar store location (String).

CP1 class-attribute instance-attribute

CP1: Final = 'cp1'

Campaign custom parameter (String).

CAMPAIGN class-attribute instance-attribute

CAMPAIGN: Final = 'campaign'

The individual campaign name, slogan, promo code, etc.

CAMPAIGN_ID class-attribute instance-attribute

CAMPAIGN_ID: Final = 'campaign_id'

Campaign ID (String).

CHARACTER class-attribute instance-attribute

CHARACTER: Final = 'character'

Character used in game (String).

CONTENT class-attribute instance-attribute

CONTENT: Final = 'content'

Campaign content (String).

CONTENT_TYPE class-attribute instance-attribute

CONTENT_TYPE: Final = 'content_type'

Type of content selected (String).

COUPON class-attribute instance-attribute

COUPON: Final = 'coupon'

Coupon code used for a purchase (String).

CREATIVE_FORMAT class-attribute instance-attribute

CREATIVE_FORMAT: Final = 'creative_format'

Creative Format (String).

CREATIVE_NAME class-attribute instance-attribute

CREATIVE_NAME: Final = 'creative_name'

The name of a creative used in a promotional spot (String).

CREATIVE_SLOT class-attribute instance-attribute

CREATIVE_SLOT: Final = 'creative_slot'

The name of a creative slot (String).

CURRENCY class-attribute instance-attribute

CURRENCY: Final = 'currency'

Currency of the purchase or items associated with the event, in 3-letter ISO_4217 format (String).

DESTINATION class-attribute instance-attribute

DESTINATION: Final = 'destination'

Flight or Travel destination (String).

DISCOUNT class-attribute instance-attribute

DISCOUNT: Final = 'discount'

Monetary value of discount associated with a purchase (Double).

END_DATE class-attribute instance-attribute

END_DATE: Final = 'end_date'

The arrival date, check-out date or rental end date for the item.

EXTEND_SESSION class-attribute instance-attribute

EXTEND_SESSION: Final = 'extend_session'

Indicates that the associated event should either extend the current session or start a new session if no session was active when the event was logged.

FLIGHT_NUMBER class-attribute instance-attribute

FLIGHT_NUMBER: Final = 'flight_number'

Flight number for travel events (String).

FREE_TRIAL class-attribute instance-attribute

FREE_TRIAL: Final = 'free_trial'

Indicates if the user is on a free trial of a subscription.

GROUP_ID class-attribute instance-attribute

GROUP_ID: Final = 'group_id'

Group/clan/guild ID (String).

INDEX class-attribute instance-attribute

INDEX: Final = 'index'

The index of the item in a list (Int).

ITEM_BRAND class-attribute instance-attribute

ITEM_BRAND: Final = 'item_brand'

Item brand (String).

ITEM_CATEGORY class-attribute instance-attribute

ITEM_CATEGORY: Final = 'item_category'

Item category (context-specific) (String).

ITEM_CATEGORY2 class-attribute instance-attribute

ITEM_CATEGORY2: Final = 'item_category2'

Item Category (context-specific) (String).

ITEM_CATEGORY3 class-attribute instance-attribute

ITEM_CATEGORY3: Final = 'item_category3'

Item Category (context-specific) (String).

ITEM_CATEGORY4 class-attribute instance-attribute

ITEM_CATEGORY4: Final = 'item_category4'

Item Category (context-specific) (String).

ITEM_CATEGORY5 class-attribute instance-attribute

ITEM_CATEGORY5: Final = 'item_category5'

Item Category (context-specific) (String).

ITEM_ID class-attribute instance-attribute

ITEM_ID: Final = 'item_id'

Item ID (context-specific) (String).

ITEM_LIST_ID class-attribute instance-attribute

ITEM_LIST_ID: Final = 'item_list_id'

The ID of the list in which the item was presented to the user (String).

ITEM_LIST_NAME class-attribute instance-attribute

ITEM_LIST_NAME: Final = 'item_list_name'

The name of the list in which the item was presented to the user (String).

ITEM_NAME class-attribute instance-attribute

ITEM_NAME: Final = 'item_name'

Item Name (context-specific) (String).

ITEM_VARIANT class-attribute instance-attribute

ITEM_VARIANT: Final = 'item_variant'

Item variant (String).

ITEMS class-attribute instance-attribute

ITEMS: Final = 'items'

The list of items involved in the transaction expressed as [[String: Any]].

LEVEL class-attribute instance-attribute

LEVEL: Final = 'level'

Level in game (Int).

LEVEL_NAME class-attribute instance-attribute

LEVEL_NAME: Final = 'level_name'

The name of a level in a game (String).

LOCATION class-attribute instance-attribute

LOCATION: Final = 'location'

Location (String).

LOCATION_ID class-attribute instance-attribute

LOCATION_ID: Final = 'location_id'

The location associated with the event.

MARKETING_TACTIC class-attribute instance-attribute

MARKETING_TACTIC: Final = 'marketing_tactic'

Marketing Tactic (String).

MEDIUM class-attribute instance-attribute

MEDIUM: Final = 'medium'

The advertising or marketing medium, for example: cpc, banner, email, push.

METHOD class-attribute instance-attribute

METHOD: Final = 'method'

A particular approach used in an operation; for example, 'facebook' or 'email' in the context of a sign_up or login event.

NUMBER_OF_NIGHTS class-attribute instance-attribute

NUMBER_OF_NIGHTS: Final = 'number_of_nights'

Number of nights staying at hotel (Int).

NUMBER_OF_PASSENGERS class-attribute instance-attribute

NUMBER_OF_PASSENGERS: Final = 'number_of_passengers'

Number of passengers traveling (Int).

NUMBER_OF_ROOMS class-attribute instance-attribute

NUMBER_OF_ROOMS: Final = 'number_of_rooms'

Number of rooms for travel events (Int).

ORIGIN class-attribute instance-attribute

ORIGIN: Final = 'origin'

Flight or Travel origin (String).

PAYMENT_TYPE class-attribute instance-attribute

PAYMENT_TYPE: Final = 'payment_type'

The chosen method of payment (String).

PRICE class-attribute instance-attribute

PRICE: Final = 'price'

Purchase price (Double).

PRICE_IS_DISCOUNTED class-attribute instance-attribute

PRICE_IS_DISCOUNTED: Final = 'price_is_discounted'

Indicates if an item's price is discounted.

PRODUCT_ID class-attribute instance-attribute

PRODUCT_ID: Final = 'product_id'

The ID of a product (String).

PRODUCT_NAME class-attribute instance-attribute

PRODUCT_NAME: Final = 'product_name'

The name of a product (String).

PROMOTION_ID class-attribute instance-attribute

PROMOTION_ID: Final = 'promotion_id'

The ID of a product promotion (String).

PROMOTION_NAME class-attribute instance-attribute

PROMOTION_NAME: Final = 'promotion_name'

The name of a product promotion (String).

QUANTITY class-attribute instance-attribute

QUANTITY: Final = 'quantity'

Purchase quantity (Int).

SCORE class-attribute instance-attribute

SCORE: Final = 'score'

Score in game (Int).

SCREEN_CLASS class-attribute instance-attribute

SCREEN_CLASS: Final = 'screen_class'

Current screen class, such as the class name of the UIViewController, logged with screen_view event and added to every event (String).

SCREEN_NAME class-attribute instance-attribute

SCREEN_NAME: Final = 'screen_name'

Current screen name, such as the name of the UIViewController, logged with screen_view event and added to every event (String).

SEARCH_TERM class-attribute instance-attribute

SEARCH_TERM: Final = 'search_term'

The search string/keywords used (String).

SHIPPING class-attribute instance-attribute

SHIPPING: Final = 'shipping'

Shipping cost associated with a transaction (Double).

SHIPPING_TIER class-attribute instance-attribute

SHIPPING_TIER: Final = 'shipping_tier'

The shipping tier (e.g.

SOURCE class-attribute instance-attribute

SOURCE: Final = 'source'

The origin of your traffic, such as an Ad network (for example, google) or partner (urban airship).

SOURCE_PLATFORM class-attribute instance-attribute

SOURCE_PLATFORM: Final = 'source_platform'

Source Platform (String).

START_DATE class-attribute instance-attribute

START_DATE: Final = 'start_date'

The departure date, check-in date or rental start date for the item.

SUBSCRIPTION class-attribute instance-attribute

SUBSCRIPTION: Final = 'subscription'

Indicates if the purchase is a subscription.

SUCCESS class-attribute instance-attribute

SUCCESS: Final = 'success'

The result of an operation.

TAX class-attribute instance-attribute

TAX: Final = 'tax'

Tax cost associated with a transaction (Double).

TERM class-attribute instance-attribute

TERM: Final = 'term'

If you're manually tagging keyword campaigns, you should use utm_term to specify the keyword (String).

TRANSACTION_ID class-attribute instance-attribute

TRANSACTION_ID: Final = 'transaction_id'

The unique identifier of a transaction (String).

TRAVEL_CLASS class-attribute instance-attribute

TRAVEL_CLASS: Final = 'travel_class'

Travel class (String).

VALUE class-attribute instance-attribute

VALUE: Final = 'value'

A context-specific numeric value which is accumulated automatically for each event type.

VIRTUAL_CURRENCY_NAME class-attribute instance-attribute

VIRTUAL_CURRENCY_NAME: Final = 'virtual_currency_name'

Name of virtual currency type (String).

UserProperty

User property names Google Analytics understands (FIRUserPropertyNames.h).

Attributes:

Name Type Description
ALLOW_AD_PERSONALIZATION_SIGNALS Final

Indicates whether events logged by Google Analytics can be used to personalize ads for the user.

SIGN_UP_METHOD Final

The method used to sign in.

ALLOW_AD_PERSONALIZATION_SIGNALS class-attribute instance-attribute

ALLOW_AD_PERSONALIZATION_SIGNALS: Final = (
    "allow_personalized_ads"
)

Indicates whether events logged by Google Analytics can be used to personalize ads for the user.

SIGN_UP_METHOD class-attribute instance-attribute

SIGN_UP_METHOD: Final = 'sign_up_method'

The method used to sign in.