firebase / firebase/firebase-android-sdk
🙈 Analytics conversions attribution: 🙉 no UTM source in first_open event 🙊
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 710
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 31
Description
### Step 1: Describe your environment
* Android Studio version: 4.0
* Firebase Component: Analytics
* Component version: 17.6.0 (Firebase BoM 25.12.0)
### Step 2: Describe the problem
Firebase analytics is **not collecting** anymore **utm_source** parameters in **first_open events**.
Since [INSTALL_REFERRER broadcast's deprecation](https://android-developers.googleblog.com/2019/11/still-using-installbroadcast-switch-to.html) (march 2020), **Firebase Console** and **Google Analytics** are not correctly showing **sources** for **first_open** conversions anymore.
**NOTE: on Google Play Console, conversions are attributed properly**. Our Google Play links are well built.
**Firabase Console** conversions view:

**Google Play Console** conversions view:

#### What we did to mitigate the problem:
- Removed **BroadcastReceiver**
- Updated MMP tracker SDKs like **Kochava** and **Appsflyer**
- Upgraded to new **Install Referrer API** following [the official doc](https://developer.android.com/google/play/installreferrer/library).
- Removed any old **Google Analytics** service or library
- Switched to **Firebase Android BoM** to avoid any library conflict
- We are able to **retrieve** and **save** utm_source to **UserProperties** as a temporary workaround. This means that the **value exists**, but on **first_open** we **don't have** this **extra data** and the SDK seems to not gather any information about utm_source on his own, as it actually should.
- Google Play **links** are **correctly built** and Google Play Console properly shows sources
- Enabled **Firebase Analytics collection** by default in **AndroidManifest**
#### AndroidManifest.xml:
```
```
#### Firebase Analytics logs:
(Installing on Emulator from Android Studio)
> 2020-11-19 17:33:36.838 5702-6725/? V/FA-SVC: Install Referrer Service is: available
> 2020-11-19 17:33:36.850 5702-5702/? V/FA-SVC: Install Referrer Service connected
> 2020-11-19 17:33:36.891 5702-6725/? V/FA-SVC: Logging event: origin=auto,name=first_open(_f),params=Bundle[{ga_conversion(_c)=1, _r=1, engagement_time_msec(_et)=1, previous_first_open_count(_pfo)=44, system_app(_sys)=0, update_with_analytics(_uwa)=0, system_app_update(_sysu)=0}]
> 2020-11-19 17:33:37.083 5702-6725/? V/FA-SVC: InstallReferrer API result: utm_source=google-play&utm_medium=organic
> 2020-11-19 17:33:37.084 5702-6725/? V/FA-SVC: Logging Install Referrer campaign from gmscore with : referrer API v2
##### first_open event object
```
event {
name: first_open(_f)
timestamp_millis: 1605803612746
previous_timestamp_millis: 0
param {
name: ga_conversion(_c)
int_value: 1
}
param {
name: ga_event_origin(_o)
string_value: auto
}
param {
name: _r
int_value: 1
}
param {
name: engagement_time_msec(_et)
int_value: 1
}
param {
name: previous_first_open_count(_pfo)
int_value: 44
}
param {
name: system_app(_sys)
int_value: 0
}
param {
name: update_with_analytics(_uwa)
int_value: 0
}
param {
name: system_app_update(_sysu)
int_value: 0
}
}
```
##### ga_campaign event object:
```
event {
name: ga_campaign(_cmp)
timestamp_millis: 1605803617084
previous_timestamp_millis: 0
param {
name: medium
string_value: organic
}
param {
name: source
string_value: google-play
}
param {
name: ga_event_origin(_o)
string_value: auto
}
param {
name: campaign_info_source(_cis)
string_value: referrer API v2
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.