3

I have added AppsFlyer SDK in application. Below is the code which i have added in the application:

In Application class:

 AppsFlyerConversionListener conversionDataListener =
                new AppsFlyerConversionListener() {

                    @Override
                    public void onInstallConversionDataLoaded(Map<String, String> conversionData) {

                    }

                    @Override
                    public void onInstallConversionFailure(String errorMessage) {
                        Log.d(AppsFlyerLib.LOG_TAG, "error getting conversion data: " + errorMessage);
                    }

                    @Override
                    public void onAppOpenAttribution(Map<String, String> attributionData) {
                        Log.d(AppsFlyerLib.LOG_TAG, "DEEP LINK WORKING");
                    }

                    @Override
                    public void onAttributionFailure(String errorMessage) {
                        Log.d(AppsFlyerLib.LOG_TAG, "error onAttributionFailure : " + errorMessage);
                    }
                };


AppsFlyerLib.getInstance().startTracking(this, "DEV_KEY");

In manifest :

<receiver android:name="com.appsflyer.SingleInstallBroadcastReceiver" android:exported="true">
      <intent-filter>
           <action android:name="com.android.vending.INSTALL_REFERRER" />
      </intent-filter>
</receiver>

In Activity for track event :

Map<String, Object> eventValue = new HashMap<String, Object>();
                    eventValue.put("login", "member");
AppsFlyerLib.getInstance().trackEvent(getApplicationContext(), "event_login", eventValue);

I am not able to view the event in AppsFlyer dashboard. Also not able to view custom parameters of event.

Any suggestions?

Thank you!

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Annie
  • 2,397
  • 3
  • 18
  • 26
  • have you found solution? – BekaBot Oct 30 '18 at 09:24
  • Yes do you need any help? – Annie Oct 31 '18 at 11:05
  • @Annie, can you leave the answer if you have found it, please? :) I'd appreciate it so much – zeroDivider Jan 17 '19 at 16:03
  • @zeroDivider this code is working perfectly. to check the event just need to download appsflyer sdk application in device and connect it to our application. then you will be able to see events in appsflyer as non organic events. this is just like a debug view of firebase. please let me know if any query. – Vidhi Dave Jan 19 '19 at 01:31
  • 1
    @VishvaDave yeah, I got that later :/ it took me a while, but I've seen in the log that my device is not whitelisted.. but thanks anyway :) – zeroDivider Jan 19 '19 at 20:11
  • Were you able to see custom parameters in the dashboard? Does Appsflyer support them? – Vadim Kotov Aug 07 '19 at 10:37

1 Answers1

3

Your device is probably not whitelisted. As mentioned here, test devices should be whitelisted via AppsFlyer's app My Device ID by AppsFlyer.

zeroDivider
  • 1,050
  • 13
  • 29