Firebase dynamic links campaign tracking not working
Asked Answered
W

4

15

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.

Welfarism answered 1/6, 2020 at 13:30 Comment(15)
Thanks Frank! Wow you work on the firebase project, please excuse my slightly headless chicken ranting :3 Do you have any insight?Welfarism
Does anyone have any insight into this?Welfarism
How do you check for the attribution data? Do you do this in Firebase UI or in BigQuery? In Firebase UI that should definitely work and you shouldn't do any manual sending of campaign data.Dapsang
Well according to the Firebase docs, there is an attribution tab on the firebase UI where you can see attribution (see last screenshot) although I can't find that anywhere in the UI. However that's not how we'd like to use the data (if it even was there) as we have a data guy who needs to get the attribution data via BigQuery in order to generate reports for other business functions.Welfarism
But I don't have any idea about how BigQuery works, my job is to prove that the UTM params that our marketing department are putting on the dynamic links via the Firebase UI is actually getting propogated somewhere so we can see dynamic link attribution. So all I have to go off is the UI and the official documentation. The documentation states you can find this data on the "attribution" tab shown in the last screenshot. And, like I said in the OP, I cannot find that tab anywhere.Welfarism
Ok, I understand. So in the UI you would see that data in Analytics -> Conversions section from the panel on the left side. There you can select your conversion like "dynamic_link_first_open" or "dynamic_link_app_open" and below you can see attribution data. If you don't see them there, it means they are not marked as conversions, so Analytics -> Events -> there is a switch near every event to mark it as a conversion. Alternatively you can turn on parameter reporting for that event, but marking it as a conversion is probably easier.Dapsang
In BigQuery, that data would be available in the custom parameters of events "dynamic_link_first_open" or "dynamic_link_app_open"Dapsang
So, our data guy is querying with BigQuery and, whilst we are seeing dynamic_link_first_open or dynamic_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), with utm_medium=Test, yet, in the query results, we are only seeing utm_medium=Test 4 times against app_first_open event. I hope that makes sense? I will update the question in the morning to clarifyWelfarism
@Dapsang - I have marked those 2 events as conversions and we can see the attribution data in firebase portal. But we're not getting the data when we query with BigData (or rather we are getting it, but it's got huge discrepencies against what firebase UI reports).Welfarism
Still not made any progress with this. Bumping to see if anyone out there has further advice?Welfarism
Data in BigQuery should be at least roughly aligned with Firebase UI. I assume in BigQuery you are checking event parameters of app_first_open, so parameters listed on the right of "dynamic_link_first_open" here: support.google.com/firebase/answer/… ? If that's the case then it looks like a bug, I would contact Firebase Support, they should be able to do extra verification: firebase.google.com/supportDapsang
Yes, your assumption is correct, we were looking for event params on the event app_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 @DapsangWelfarism
Also, when I look at the conversions page and look at app_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
So, contrary to my earlier posts, there are actually discrepencies in the data between conversions table and dynamic links table, even though they are supposed to be reporting the same data.Welfarism
These discrepencies just weren't noticed earlier.Welfarism
R
4

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.

Regale answered 15/9, 2021 at 12:16 Comment(0)
F
3

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

Flugelhorn answered 7/1, 2021 at 13:25 Comment(2)
Great, thankyou for taking the time to reply. What a big pile of turd their documentation is...Welfarism
We ended up using AppsFlyer for dynamic linking as their attribution works. But it's annoying to have to use YET ANOTHER annoying cloud service in our app. And now our data guy/devs are going to have to do work to import data from AppsFlyer to Firebase/Google Analytics and stitch it together with our other events for attributing stuff in the app to new/returning users via dynamic links. GRRRRRWelfarism
I
1

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

Invalidism answered 7/6, 2021 at 9:3 Comment(1)
I see these coming in the DebugView with real-time testing but under conversions they say (direct) instead of showing the proper campaignStowers
V
0

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.

Vinnie answered 9/7, 2020 at 13:42 Comment(1)
That answer you link to imho refers to the Deep Link (the fallback if the clicker does not want to follow the link into the app or is on a desktop browser). It is however also very, very confusing having to add the same parameters twice.Flugelhorn

© 2022 - 2024 — McMap. All rights reserved.