问题
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