At work we are trying to use the optional campaign tracking UTM arguments when creating dynamic links through the firebase portal.
The dynamic links are working fine, and as far as I can tell from all the official documentation, just adding the UTM values in the final optional step when creating dynamic links should cause those values to be sent along with the dynamic_link_app_open
event.
However, we are not seeing any attribution values when we look on the events OR conversions tabs for the dynamic_link_app_open
event. We see that event is being sent but we just don't get the campaign attribution values so we have no idea what campaigns led to those events and conversions.
The documentation is really lacking on this particular feature and it's frustrating our marketing department which is ultimately ending up with the developers (i.e. me).
I have developed a work around, but it's a hack:
When creating the dynamic link on the firebase portal, I put utm_source
, utm_medium
and utm_campaign
query strings directly into the deep link like so (not our actual deep link for security reasons, but you get the idea):
https://www.example.com?utm_source=Test&utm_medium=Test&utm_campaign=Test
Then in the client, I have added code to rip these out of the resulting deep link after passing the dynamic link through the firebase dynamic links SDK. With these 3 bits of information I can send an app_open
event to firebase analytics via the FirebaseAnalytics
SDK like so:
FirebaseDynamicLinks.getInstance()
.getDynamicLink(getIntent())
.addOnSuccessListener(this, pendingDynamicLinkData -> {
if (pendingDynamicLinkData != null) {
Uri optionalDynamicDeepLink = pendingDynamicLinkData.getLink();
if (optionalDynamicDeepLink != null) {
List<String> utmSource = optionalDynamicDeepLink.getQueryParameters(UTM_SOURCE);
List<String> utmCampaign = optionalDynamicDeepLink.getQueryParameters(UTM_CAMPAIGN);
List<String> utmMedium = optionalDynamicDeepLink.getQueryParameters(UTM_MEDIUM);
if (!utmSource.isEmpty() && !utmCampaign.isEmpty() && !utmMedium.isEmpty()) {
String utmSourceParam = String.valueOf(utmSource);
String utmCampaignParam = String.valueOf(utmCampaign);
String utmMediumParam = String.valueOf(utmMedium);
Bundle params = new Bundle();
params.putString(FirebaseAnalytics.Param.SOURCE, utmSourceParam);
params.putString(FirebaseAnalytics.Param.CAMPAIGN, utmCampaignParam);
params.putString(FirebaseAnalytics.Param.MEDIUM, utmMediumParam);
FirebaseAnalytics.getInstance(this).logEvent(FirebaseAnalytics.Event.CAMPAIGN_DETAILS, params);
FirebaseAnalytics.getInstance(this).logEvent(FirebaseAnalytics.Event.APP_OPEN, params);
}
String dynamicDeepLink = optionalDynamicDeepLink.toString();
if (!handleDeepLink(dynamicDeepLink)) {
Generic.openLinkInCustomTabs(getApplicationContext(), deepLinkOptional);
}
} else {
if (!handleDeepLink(deepLinkOptional)) {
handleIntent(intent);
}
}
} else {
if (!handleDeepLink(deepLinkOptional)) {
handleIntent(intent);
}
}
}).addOnFailureListener(this, e -> {
if (!handleDeepLink(deepLinkOptional)) {
Generic.openLinkInCustomTabs(getApplicationContext(), deepLinkOptional);
}
});
Whilst this works, it begs the question; what is the point of the optional campaign tracking section when creating dynamic links? Presumably putting the utm_source
, utm_medium
and utm_campaign
there is supposed to allow firebase to auto-magically populate the dynamic_link_app_open
event with said campaign tracking data, but it doesn't.
For instance, here is how I've setup that optional final step:
I have then followed the dynamic link into the app several times as well as asking testers to do the same. I have waited over 36 hours (as I'm aware these events can take some time to propagate to the cloud) and we're seeing dynamic_link_app_open
events build up, indicating an event is logged for our dynamic links, but when we drill into that event there is no UTM information collected.
Is this feature of firebase broken?
I can see this from official firebase documentation (https://firebase.google.com/docs/dynamic-links/analytics):
Which indicates that collection of UTM data from dynamic link clickthroughs is not supported on firebase, but is supported on google analytics. This isn't confusing at all (/sarcasm). So presumably some of our data (i.e. the bit to do with campaign tracking) is collected/hosted by google analytics?
To add further confusion, the official documentation for firebase dynamic links states:
"If you mark Dynamic Link events as conversions, you can see how your Dynamic Links are performing on the Attribution page."
And then shows an image of the firebase portal UI which doesn't even match to reality:
I've searched and searched for an attribution tab on the firebase console but there isn't one... these docs are enough to drive a developer insane.
To receive the Firebase Dynamic Links that you created, you must include the Dynamic Links SDK in your app and call the FirebaseDynamicLinks. getDynamicLink() method when your app loads to get the data passed in the Dynamic Link.
Dynamic Links are smart URLs that allow you to send existing and potential users to any location within your iOS or Android app. They survive the app install process, so even new users see the content they're looking for when they open the app for the first time. Dynamic Links are no-cost forever , for any scale.
As far as I know, dynamic links work for as long as your firebase project active. I used some dynamic links more than one year after they were created. I didn't see anything about any time limits in the documentation.
You can also use Google Analytics in your app to track the performance of your Dynamic Links. The following Analytics events are automatically logged when you open a short or long Dynamic Link in your app. Logged when a user opens the app for the first time via a Dynamic Link.
Firebase Dynamic Links tracks the number of times each of your short Dynamic Links have been clicked, as well as the number of times a click resulted in a redirect, app install, app first-open, or app re-open. You can view these statistics in the Firebase console or retrieve them with a REST API.
You can create Dynamic Links programmatically or by using the Firebase console. When your app opens, use the Dynamic Links SDK to check if a Dynamic Link was passed to it. If so, get the deep link from the Dynamic Link data and handle the deep link as necessary.
Google Analytics provides detailed statistics for events that happen in your app, such as when someone opens your app by clicking a Dynamic Link. This data can be viewed in the Analytics section of the Firebase console.
Or, if you don't have a domain for your app, you can use a free custom page.link subdomain: Create your free subdomain in the Firebase console. All Dynamic Links features, including analytics, post-install attributions, and SDK integrations, work with both custom page.link domains and your own domain.
I reached out to Google, as the Issue still does not seem to be solved. Here is the answer:
"Currently, Firebase Dynamic Links UTM event tracking for iOS platforms is not supported due to the fingerprint matching mechanism for iOS platform limitation. As an action, I’ve linked this support ticket to our existing feature request to let our engineering team know of the increasing interest to have this utm_ tracking mechanism implemented for the iOS platform for FDL. I can’t share definite details or timeline for the release, but we are taking your interest moving forward to have this feature improvements. You can check our release notes for any updates."
I don't understand what "the fingerprint matching mechanism" exactly means. But I understand that it will take years until this Issue gets fixed.
I can understand your frustration, we are in the same problem for months now. I also think it should not be the way it works that you need to manually pick up the UTM Parameters. And I did find an older screenshot (from 2019) that showed that Dynamic Links SHOULD do this on their own: [
This first part still works, but the Source/Medium/Campaign never make it into the Acquisition/Attribution reports. They DID do that in the past:
(example in screenshot is another Dynamic Link than in the first screenshot, sorry)
In talks with Google, it sounded as if they were indeed aware of this as a bug, but offered no specifics on whether or when this would be fixed.
So I can only confirm that you are not alone with your problem...
2021 updated answer:
I guess the problem is fixed and now you can see the events of the dynamic link from the DebugView with all the params (as @Lukas Oldenburg said)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With