Google Play Install Referrer API not providing utmCampaign info

三世轮回 提交于 2020-01-02 00:47:10

问题


I am using Google Play Install Referrer API 1.0 to collect the install referrer information. The API is providing the utmSource and utmMedium data perfectly, but utmCampaign is completely missing.

I have enabled autoTagging in Google Adwords and the FireBase Analytics is showing the utmCampaign data accurately.

Examples of value returned by :

ReferrerDetails response = mReferrerClient.getInstallReferrer();
response.getInstallReferrer();

is as follows :

utm_source=google-play&utm_medium=organic

utm_source=(not%20set)&utm_medium=(not%20set)

I am wondering why utmCampaign data is missing.

Anyone faced similar issue and has any solution? It is critical to find out the Campaign source information for us.


回答1:


Try this:

FirebaseDynamicLinks.getInstance().getDynamicLink(getActivity().getIntent())
        .addOnSuccessListener(getActivity(), new OnSuccessListener<PendingDynamicLinkData>() {
            @Override
            public void onSuccess(PendingDynamicLinkData pendingDynamicLinkData) {
                // Get deep link from result (may be null if no link is found)
                if (pendingDynamicLinkData != null) {
                    //utm_campaign=cam&utm_medium=cpc&utm_source=xyz
                    Uri deepLink = pendingDynamicLinkData.getLink();
                    if (deepLink.toString().contains("utm_campaign") ||
                            deepLink.toString().contains("utm_medium") ||
                            deepLink.toString().contains("utm_source")) {
                    }
                }
            }
        })
        .addOnFailureListener(getActivity(), new OnFailureListener() {
            @Override
            public void onFailure(@NonNull Exception e) {
            }
        });


来源:https://stackoverflow.com/questions/48003283/google-play-install-referrer-api-not-providing-utmcampaign-info

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!