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.

HowItWorks-FirebaseTag.jpg

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
  • Integer as String
firebase_session_minimum_seconds
  • Integer as String
firebase_analytics_enabled
  • Boolean as String
firebase_log_level
  • String
td>
firebase_event_name
  • String
firebase_event_params
  • JSON
firebase_screen_name
  • String
firebase_screen_class
  • String
firebase_property_name
  • String
firebase_property_value
  • String
firebase_user_id
  • String
command_name
  • String

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 event_level_end
setScreenName event_login
setUserProperty event_post_score
setUserId event_present_offer
logEvent event_purchase_refund
resetData event_remove_cart
event_add_payment_info event_search
event_add_to_cart event_select_content
event_add_to_wishlist event_set_checkout_option
event_app_open event_share
event_begin_checkout event_signup
event_campaign_details event_spend_virtual_currency
event_checkout_progress event_tutorial_begin
event_earn_virtual_currency event_tutorial_complete
event_ecommerce_purchase event_unlock_achievement
event_generate_lead event_view_item
event_join_group event_view_item_list
event_level_up event_view_search_results
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:

Screen Shot 2020-10-02 at 9.07.39 AM-markup.jpg

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.

  1. Map your variable value to the logEvent event.
  2. Add a parameter to send the event name with your logEvent event.

Screen Shot 2020-10-02 at 9.15.36 AM-markup.jpg

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
  • String
param_ad_network_click_id
  • String
param_affiliation
  • String
param_cp1
  • String
param_campaign
  • String
param_character
  • String
param_checkout_option
  • String
param_checkout_step
  • Integer
param_content
  • String
param_content_type
  • String
param_coupon
  • String
param_creative_name
  • String
param_creative_slot
  • String
param_currency
  • String
param_destination
  • String
param_end_date
  • String
param_flight_number
  • String
param_group_id
  • String
param_index
  • String
param_item_brand
  • String
param_item_category
  • String
param_item_id
  • String
param_item_list
  • String
param_item_location_id
  • String
param_item_name
  • String
param_item_variant
  • String
param_level
  • Integer
param_location
  • Integer
param_medium
  • String
param_number_nights
  • Integer
param_number_pax
  • Integer
param_number_rooms
  • Integer
param_origin
  • String
param_price
  • Double
param_quantity
  • Integer
param_score
  • Integer
param_search_term
  • String
param_shipping
  • Double
param_method
  • String
param_source
  • String
param_travel_class
  • String
param_virtual_currency_name
  • String
param_start_date
  • String
param_term
  • String
param_tax
  • Double
param_transaction_id
  • String
param_value
  • Integer or Double
param_level_name
  • String
param_success
  • String
E-Commerce
order_id
  • String
  • Overrides _corder
order_total
  • Integer or Double
  • Overrides _ctotal
order_shipping
  • Double
  • Overrides _cship
order_tax
  • Double
  • Overrides _ctax
order_currency
  • String
  • Overrides _ccurrency
order_coupon_code
  • String
  • Overrides _cpromo
product_id
  • Array
  • Overrides _cprod
product_name
  • Array
  • Overrides _cprodname
product_brand
  • Array
  • Overrides _cbrand
product_category
  • Array
  • Overrides _ccat
product_quantity
  • Array
  • Overrides _cquan
product_unit_price
  • Array
  • Overrides _cprice
param_item_list
  • Array
param_item_variant
  • Array
param_index
  • Array

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.

Screen Shot 2020-10-02 at 10.54.39 AM.png

The mapping to send custom params would be configured as shown.

Screen Shot 2020-10-02 at 10.57.00 AM.png

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 and event_signup events will automatically send setUserId and setUserProperty events.
  • If the appropriate data is provided (variable mapped to screen name), the event_view_item_list, event_view_item, event_ecommerce_purchase, and event_begin_checkout can automatically send a setScreenName 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

Public