Reputation: 3704
I've created several dynamic links with UTM parameters using the Firebase console. Yet, the utmParameters
field is always empty.
By the time the intent
is received the UTM parameters have been stripped off. We want to use these parameters for additional tracking and decision-making in the app.
Any ideas what could be going wrong here? Thanks
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Firebase.dynamicLinks
.getDynamicLink(intent)
.addOnSuccessListener(this) { pendingDynamicLinkData ->
var deepLink: Uri? = null
if (pendingDynamicLinkData != null) {
deepLink = pendingDynamicLinkData.link
Timber.tag("XXX").d("UTM :${pendingDynamicLinkData.utmParameters}")
}
}
.addOnFailureListener(this) { e -> Timber.e(e, "Failed to process Dynamic Link") }
}
Upvotes: 1
Views: 1700
Reputation: 1
The URI worked for me. The Java equivalent code:
FirebaseDynamicLinks.getInstance().getDynamicLink(getIntent().getData())
Upvotes: 0
Reputation: 96
I find the same problem and what solve it for me is start using the method that expects an Uri instead of Intent.
intent.data?.let {
Firebase.dynamicLinks.getDynamicLink(it)
.addOnSuccessListener(this) {
......
}
Upvotes: 7