当我单击它时,我正在使用Firebase Dynamic链接,我在活动中获得了深层链接,但是如何在活动中获取UTM参数,如我如何获得深层链接
尝试以下代码获取UTM参数
FirebaseDynamicLinks.getInstance()
.getDynamicLink(getIntent())
.addOnSuccessListener(this, new OnSuccessListener<PendingDynamicLinkData>() {
@Override
public void onSuccess(PendingDynamicLinkData pendingDynamicLinkData) {
Uri deepLink = null;
if (pendingDynamicLinkData != null) {
deepLink = pendingDynamicLinkData.getLink();
}
if (deepLink != null
&& deepLink.getBooleanQueryParameter("utm_param1", false)) {
String utm_param1 = deepLink.getQueryParameter("utm_param1");
}
}
});