Bug 1862737 - Add telemetry for the full install referrer response

fenix/121.0
Roger Yang 7 months ago committed by mergify[bot]
parent ddc0d43d31
commit e74a6d611c

@ -7489,6 +7489,25 @@ first_session:
- Performance
- Attribution
play_store_attribution:
install_referrer_response:
type: text
send_in_pings:
- first-session
description: |
The full install referrer response.
bugs:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1862737
data_reviews:
- https://github.com/mozilla-mobile/firefox-android/pull/4343
data_sensitivity:
# - technical
- web_activity # This is a workaround so we can use Text type for technical data.
notification_emails:
- android-probes@mozilla.com
expires: never
metadata:
tags:
- Attribution
source:
type: string
send_in_pings:

@ -57,6 +57,8 @@ class InstallReferrerMetricsService(private val context: Context) : MetricsServi
return
}
PlayStoreAttribution.installReferrerResponse.set(installReferrerResponse)
val utmParams = UTMParams.parseUTMParameters(installReferrerResponse)
if (FeatureFlags.metaAttributionEnabled) {
MetaParams.extractMetaAttribution(utmParams.content)
@ -135,11 +137,11 @@ data class UTMParams(
const val UTM_TERM = "utm_term"
/**
* Try and unpack the referrer URL by successively URLDecoding the URL.
* Try and unpack the install referrer response.
*/
fun parseUTMParameters(referrerUrl: String): UTMParams {
fun parseUTMParameters(installReferrerResponse: String): UTMParams {
val utmParams = mutableMapOf<String, String>()
val params = referrerUrl.split("&")
val params = installReferrerResponse.split("&")
for (param in params) {
val keyValue = param.split("=")

Loading…
Cancel
Save