In what case does google return this format of utm_source=(not%20set)&utm_medium=(not%20set) .

Please let me know if there is any documentation to check if the code is working fine??

using the new google referal 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);
        }

log printed for live app is E/original-reff: utm_source=(not%20set)&utm_medium=(not%20set)

3

There are 3 answers

0
saurabh kathpalia On

As per my observation "Not Set" generally happens in case install was through FaceBook.

0
user22059944 On

For me it happend after final stages like api implemention and QA cases when url is not encoded, we will have chances to get response like this so, make sure convert the url in encoded format and make sure before utm_source add referrer= i.e., (referrer=utm_source) ex: https://play.google.com/store/apps/details?id=com.package&referrer=utm_source%3Dexample%26utm_uid%3Dds-112323%26utm_campaign%3Dexample%26utm_medium%3Dexample

not like this

https://play.google.com/store/apps/details?id=com.package&utm_source=example&utm_uid=ds-112133&utm_campaign=example&utm_medium=example

i hope this will definitely helpfull to someone

0
Youssef guba On

the data sent as not-set in many cases:

  1. if you try to install the app from a Website, not the Google Play app, and this is what Google says about this.

Google Play Campaign Tracking does not currently support web-to-device installs initiated from the web Play Store.

  1. if your Google play has mail accounts that are work emails (enterprise domain email id)it sets the UTM property as utm_source=(not%20set)&utm_medium=(not%20set).

So first try to install the app from Google Play App direct without a Website. second, try logging out from your Work email while you're testing.

finally, you can use Google Play URL Builder to generate a campaign URL.