【问题标题】:Install Referrer Library returns data utm_source=(not%20set)&utm_medium=(not%20set)? how can i get the exact parametres mentioned in the url.?安装引用库返回数据 utm_source=(not%20set)&utm_medium=(not%20set)?我怎样才能得到网址中提到的确切参数。?
【发布时间】:2018-11-22 19:28:29
【问题描述】:

google在什么情况下会返回这种格式的utm_source=(not%20set)&utm_medium=(not%20set)。

如果有任何文档可以检查代码是否正常工作,请告诉我??

使用新的谷歌推荐 api。

try {
            mReferrerClient = InstallReferrerClient.newBuilder(this).build();
            mReferrerClient.startConnection(new InstallReferrerStateListener() {
                @Override
                public void onInstallReferrerSetupFinished(int responseCode) {
                    switch (responseCode) {
                        case InstallReferrerClient.InstallReferrerResponse.OK:
                            // Connection established

                            ReferrerDetails response = null;
                            try {
                                response = mReferrerClient.getInstallReferrer();

                                refer = response.getInstallReferrer();

                                setData(refer, intent);

                                Log.e("refergoogle", refer);
                                response.getReferrerClickTimestampSeconds();
                                response.getInstallBeginTimestampSeconds();
                                mReferrerClient.endConnection();


                            } catch (Exception e) {
                                Crashlytics.logException(e);
                            }
                            break;
                        case InstallReferrerClient.InstallReferrerResponse.FEATURE_NOT_SUPPORTED:
                            // API not available on the current Play Store app
                            break;
                        case InstallReferrerClient.InstallReferrerResponse.SERVICE_UNAVAILABLE:
                            // Connection could not be established
                            break;
                    }
                }

                @Override
                public void onInstallReferrerServiceDisconnected() {
                    // Try to restart the connection on the next request to
                    // Google Play by calling the startConnection() method.
                }
            });
        } catch (Exception e) {
            Crashlytics.logException(e);
        }

为实时应用打印的日志是 E/original-ref: utm_source=(not%20set)&utm_medium=(not%20set)

【问题讨论】:

    标签: android google-play deeplink install-referrer


    【解决方案1】:

    根据我的观察,“未设置”通常发生在通过 Facebook 安装的情况下。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-04-28
      • 2019-11-04
      • 2016-02-05
      • 1970-01-01
      • 2022-06-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多