Firebase Remote Command Tag Setup Guide (Mobile)
Overview
When implementing the Firebase Tag in Tealium IQ, there are three components to be implemented that will require both edits in the native code and within Tealium. First, the Firebase SDK needs to be included in the app. Second, there are remote commands that need to be added to your native code through the Tealium SDK. Lastly, the Firebase Tag will be added to Tealium IQ. All three parts need to be implemented or Firebase will not receive data.
Native Code Configuration
Step 1 – Add the Firebase SDK to the Native App
Step 2 – Add the Tealium SDK to the Native App
Step 3 – Include the Remote Command Classes in the Native App
For all libraries, you will need to register the Firebase Analytics Remote Command before it can be used. This should be done when you initialize the library. Follow the guide to implement the remote command based on the mobile platform being used.
Tealium IQ Configuration
Step 1 – Add the Firebase Tag
The Firebase Tag is a special tag that contains an implementation of the API required to trigger custom native code blocks you have registered with the Tealium mobile libraries. This tag is available in the tag marketplace and communicates with “Step 3” of the native app configuration.
How It Works
The Tealium event (view or event) is triggered by the native code, which is then ingested by utag.js in the webview. The Firebase tag and associated extensions review the event and send a Firebase event to the remote command that was added to the native code. The remote command takes the request from the tag and formats and sends the event so that it can be collected by the Firebase.
Step 2 – Set the Tag Configuration
The only option for configuration is whether to enabled debug mode. This is up to your developers whether they need this option enabled. The default setting is “False”.
Step 3 – Add Mappings
Set-Up
Certain mappings need to be present for the tag to work. These are the general settings that need to be applied.
- Session Timeout (seconds)
- Session Minimum (seconds)
- Firebase Log Level
- Screen Name
- Command Name
- Firebase Event
These can be set as static values or can be set dynamically using extensions.
Variable | Description |
---|---|
firebase_session_timeout_seconds |
|
firebase_session_minimum_seconds |
|
firebase_analytics_enabled |
|
firebase_log_level |
|
firebase_event_name |
|
firebase_event_params |
|
firebase_screen_name |
|
firebase_screen_class |
|
firebase_property_name |
|
firebase_property_value |
|
firebase_user_id |
|
command_name |
|
Automatic Events
Some of the events that will be used are automatically collected by the Firebase SDK and do not need to be set up using the Tealium Firebase Tag. For a list of these events, click here.
Standard Events
The event name is the event occurring in the app that needs to be captured (cart events, search events, payment events, etc.) Below is a list of standard events available through the Firebase SDK. If your event is not available in the list, it can be sent using a logEvent
custom event.
Variables |
---|
config |
setScreenName |
setUserProperty |
setUserId |
logEvent |
resetData |
event_add_payment_info |
event_add_to_cart |
event_add_to_wishlist |
event_app_open |
event_begin_checkout |
event_campaign_details |
event_checkout_progress |
event_earn_virtual_currency |
event_ecommerce_purchase |
event_generate_lead |
event_join_group |
event_level_up |
event_level_start |
Firebase events are mapped as they would be in any other tag. Values can come in either from the data layer or set through an extension and then mapped to the tag in the following manner:
Custom Events
If the event you want to send is not included in the list of default events, you’ll need to send a logEvent
event with a custom value attached for the event name.
- Map your variable value to the
logEvent
event. - Add a parameter to send the event name with your
logEvent
event.
Standard Parameters
Event parameters are sent along with the event and can be mapped to the parameters in the list below. Params can be mapped in two ways:
- As a standard param sent with any event
- As an event param sent only with specified events
Variable | Description |
---|---|
param_achievement_id |
|
param_ad_network_click_id |
|
param_affiliation |
|
param_cp1 |
|
param_campaign |
|
param_character |
|
param_checkout_option |
|
param_checkout_step |
|
param_content |
|
param_content_type |
|
param_coupon |
|
param_creative_name |
|
param_creative_slot |
|
param_currency |
|
param_destination |
|
param_end_date |
|
param_flight_number |
|
param_group_id |
|
param_index |
|
param_item_brand |
|
param_item_category |
|
param_item_id |
|
param_item_list |
|
param_item_location_id |
|
param_item_name |
|
param_item_variant |
|
param_level |
|
param_location |
|
param_medium |
|
param_number_nights |
|
param_number_pax |
|
param_number_rooms |
|
param_origin |
|
param_price |
|
param_quantity |
|
param_score |
|
param_search_term |
|
param_shipping |
|
param_method |
|
param_source |
|
param_travel_class |
|
param_virtual_currency_name |
|
param_start_date |
|
param_term |
|
param_tax |
|
param_transaction_id |
|
param_value |
|
param_level_name |
|
param_success |
|
E-Commerce | |
order_id |
|
order_total |
|
order_shipping |
|
order_tax |
|
order_currency |
|
order_coupon_code |
|
product_id |
|
product_name |
|
product_brand |
|
product_category |
|
product_quantity |
|
product_unit_price |
|
param_item_list |
|
param_item_variant |
|
param_index |
|
Custom Parameters
If your param is not available in the list above, a custom param will need to be sent with the event. When adding custom parameters to any event, note that they are sent along with the event (either standard or custom) and must be in a JSON format. The value of the mapped variable must be set up in a JavaScript code extension. Multiple events can be formatted as shown.
The mapping to send custom params would be configured as shown.
Tips
Below are some items to keep in mind when setting up the Firebase Remote Command Tag.
- The config command is automatically sent on the first load if it is not found in the event list.
- If the appropriate data is provided (variable mapped to user ID), the
event_login
andevent_signup
events will automatically sendsetUserId
andsetUserProperty
events. - If the appropriate data is provided (variable mapped to screen name), the
event_view_item_list
,event_view_item
,event_ecommerce_purchase
, andevent_begin_checkout
can automatically send asetScreenName
event. - Use only the singular parameters or the e-commerce arrays, not both.
Notes About Firebase
Firebase is not the same as Google Analytics and has different terminology and a completely different setup. The variables/mappings do not translate one for one, therefore, custom dimensions are not included in Firebase. Params take the place of custom dimensions and should be used accordingly. If you need a custom param, they can be configured within Firebase.
A/B testing parameters are stored in Firebase and are not accessible to Tealium. If the A/B testing data needs to be used within Tealium, the data can be exported from Firebase for FREE using BigQuery. The data can then be imported into Tealium server-side products for use in connectors/audiences.
Resources
Tealium Firebase Remote Command Integration
Firebase Remote Command Example – iOS (Github)
Firebase Remote Command Example – Android (Github)
Google Firebase Guide
Automatically Collected Events – Firebase
This page was last updated: November 24, 2020