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.
dynamic_link_first_open
ordynamic_link_app_open
data in our query results, they don't contain data that matches firebase. For instance, we have set a link up that has been clicked 700+ times (leading to 157 app first open events according to firebase UI), withutm_medium=Test
, yet, in the query results, we are only seeingutm_medium=Test
4 times againstapp_first_open
event. I hope that makes sense? I will update the question in the morning to clarify – Welfarismapp_first_open
with BigQuery, and the data was not lining up at all with what we see on firebase UI on the dynamic links table. So yea, presumably a bug. I'll open it with google support. Thanks for your time replying in this comment thread @Dapsang – Welfarismapp_first_open
event the reported parameter values have huge discrepencies when compared to looking at the dynamic links table (which also reports app first open and app re-open numbers). So the dynamic links table numbers don't line up with the conversions events. For instance, if dynamic link table shows app first open = 5 for a given link (which has a unique medium) then I would expec to see 5 counts of that medium when I look at the app first open event in conversions tab, but I don't.... – Welfarism