Thomas Cook
Thomas Cook

Reputation: 4853

Firebase dynamic links campaign tracking not working

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:

Campaign Tracking Section

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):

enter image description here

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:

enter image description here

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.

Upvotes: 16

Views: 6562

Answers (4)

nanz
nanz

Reputation: 141

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.

Upvotes: 4

eyalyoli
eyalyoli

Reputation: 2022

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)

enter image description here

Upvotes: 1

Lukas Oldenburg
Lukas Oldenburg

Reputation: 145

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: [Dynamic Link Event automatically generating campaign, source, and medium

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: Report

(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...

Upvotes: 3

niklaslavrell
niklaslavrell

Reputation: 16

According to this answer:

UTM parameters that you choose in UI are parameters for mobile tracking. If you want to pass UTM parameters to your "fallback" website, you need to add them to the fallback address itself.

Upvotes: 0

Related Questions