appsflyersdk / appsflyer-cordova-plugin Goto Github PK
View Code? Open in Web Editor NEWAppsFlyer plugin for Cordova
License: MIT License
AppsFlyer plugin for Cordova
License: MIT License
Hi,
I'm trying to run calls using Ionic 4 with Cordova 8.0, when I run the initSdk call it does not return success or failure response.
Even passing the debug parameter does not get any detail of where the problem is. I tested using the Android emulator and also installing directly on the device in both cases running Android 8.
This plugin is compatible with this specification below?
========================================================
Ionic:
ionic (Ionic CLI) : 4.0.0
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.1.6
Cordova:
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 6.3.0
System:
Android SDK Tools : 26.1.1
NodeJS : v8.11.4 (/usr/local/bin/node)
npm : 6.4.1
OS : Linux 4.18
Hi,
we can we use own domain instead XXX.onelink.me?
Tomcat says
java.lang.ClassNotFoundException: com.appsflyer.cordova.plugin.AppsFlyerPlugin
06-03 09:00:40.099 15390-15798/io.ionic.starter W/System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.appsflyer.cordova.plugin.AppsFlyerPlugin" on path: DexPathList[[zip file "/data/app/io.ionic.starter-1/base.apk"],nativeLibraryDirectories=[/data/app/io.ionic.starter-1/lib/arm64, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
06-03 09:00:40.099 15390-15798/io.ionic.starter I/System.out: Error adding plugin com.appsflyer.cordova.plugin.AppsFlyerPlugin.
I use this sdk with Ionic 3.
And I tried to test on a real device ( Android 7.0).
I think this is PATH error but I cannot detect where is wrong.
Thanks.
Hi,
We try to use the enableUninstallTracking feature. It's work fine on Android (we received tracking on the dashboard) but not for the iOS part.
After a deeper look inside iOS plugin part : https://github.com/AppsFlyerSDK/cordova-plugin-appsflyer-sdk/blob/master/src/ios/AppsFlyerPlugin.m :
We found out that the registerUninstall function not being called in the cordova/javascript part of the plugin at https://github.com/AppsFlyerSDK/cordova-plugin-appsflyer-sdk/blob/master/www/appsflyer.js
Thanks
Hi!
I'm trying to run the example. After finally and successfully having installed all necessary packages (it took some time), the app runs on my Android device.
I also changed the dev key in the config to my dev key and the buttons in the app pretend to work, i.e. I get notifications such as "Event Tracked" and I do get the App User Id and the Apps Flyer UID.
What I don't get is any signal in the dashboard. Nor can I find the tracked events nor do I see there is an installation at all.
How can I verify that the SDK is working properly?
migrated from old PhoneGap:
Hi
I have a same ionic app publish in appstore/android.
The onInstallConversionDataLoaded attributionData works fine for an android user.
But when an iphone user shows no data.
document.addEventListener('onInstallConversionDataLoaded', function(e){ var attributionData = (JSON.stringify(e.detail)); $localStorage.trackingData = attributionData; }, false);
any ideas? thanks
Hi, I am using https://github.com/nordnet/cordova-universal-links-plugin and their method universalLinks.subscribe
to receive events once app is opened from universal links. It doesn't work on iOS when this plugin is installed, any way to avoid that?
Thanks
Hello,
I'm testing the registerOnAppOpenAttribution()
method on an Ionic 3 app (both using Ionic Native and using window['plugins'].appsFlyer...
directly) but the success/error callbacks are not executed.
When inspecting the logs, I can see D AppsFlyer: Executing...
which means that the native code gets the commands, but then nothing happens (in the logs below, please take a look at the third time the AppsFlyer: Executing...
is printed in the console).
The same happens on both Android and iOS which is extremely strange...
Anyway I use the following code to initialize the plugin:
private initializeAppsflyer(): Promise<any> {
let config: AppsflyerOptions = {
devKey: '***my-dev-key***',
isDebug: true,
onInstallConversionDataListener: true
};
if (this.platform.is('ios')) {
config.appId = '***app-id***';
}
return this
.appsflyerAnalytics
.initSdk(config)
.then(data => {
alert(JSON.stringify(data));
});
}
The initSdk()
method seems to be working fine since I can see the data returned by the plugin and also the logs indicating that the SDK was initialized properly. I can also see all the events being tracked by the app in the Appsflyer Dashboard. Besides that, some other methods like generateInviteLink()
and getAppsFlyerUID()
are working properly as well.
Please also notice that the device I'm using is already whitelisted.
Android Logs: logs
Ionic Info:
▶ ionic info
Ionic:
Ionic CLI : 5.2.3
Ionic Framework : ionic-angular 3.9.5
@ionic/app-scripts : 3.1.10
Cordova:
Cordova CLI : 9.0.0 ([email protected])
Cordova Platforms : android 8.0.0, ios 4.5.4
Cordova Plugins : ...
Utility:
cordova-res : 0.6.0
native-run : 0.2.6 (update available: 0.2.8)
System:
Android SDK Tools : 26.1.1
ios-deploy : 1.9.4
ios-sim : 8.0.1
NodeJS : v10.10.0 (/usr/local/bin/node)
npm : 6.4.1
OS : macOS Mojave
Xcode : Xcode 10.2.1 Build version 10E1001
Hi,
I am using version 4.3.0 with ionic 3 and cordova android 6.3.0
this.appsFlyer.initSdk(options, successData => { console.log(successData); }, error => { console.log('AppsFlyer:initSdk error: ', error); } );
Invalid JSON (without quotes) output after i clicked a OneLink:
{af_deeplink=true, campaign=testcampaign, media_source=test, install_time=2018-02-19 10:33:48, af_status=Non-organic, path=, scheme=myscheme, host=myhost}
Just opening the App gives me a correct JSON:
{"status":"success","type":"onInstallConversionDataLoaded","data":{"af_message":"organic install","af_status":"Organic"}}
Is this fixed in a newer version? It is currently not possible to upgrade to 4.4 due to not being able to upgrade cordova from 6 to 7.
Thanks
Hi, my company is very new on this adwords integration. We would like to know how to track which campaign the users are coming from for UAC. Since all the data and links are provided from Google, how do we use the "trackEvent(eventName, eventValues)" function for this case? As I read there, seems like the track event function's parameter is written and hardcoded by us when we already know the event name and value. But how to get the whole data from UAC type of ads where we could not provide the link ourselves? Everything on the Appsflyer side has been done and integrated. Just on this plugin side, we are still confused.
Out of context (if it is alright to ask here), which token should I use for:
"enableUninstallTracking" for android? is it the sender ID from firebase, or the push notification token each device will get from firebase?
And, "registerUninstall" for iOS? is it the push notification token users get from FCM?
Thanks!
Invalid type in JSON write (NSURLError)
Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x1e153b3d __exceptionPreprocess
1 libobjc.A.dylib 0x1d3db067 objc_exception_throw
2 CoreFoundation 0x1e153a85 -[NSException initWithCoder:]
3 Foundation 0x1eb1585b (Missing)
4 Foundation 0x1eb176e9 (Missing)
5 CoreFoundation 0x1e0bb2fd __65-[__NSDictionaryI enumerateKeysAndObjectsWithOptions:usingBlock:]_block_invoke
6 CoreFoundation 0x1e0ac77f -[__NSDictionaryI enumerateKeysAndObjectsWithOptions:usingBlock:]
7 Foundation 0x1eb16f5f (Missing)
8 Foundation 0x1eb1579b (Missing)
9 Foundation 0x1eb1559f (Missing)
10 Foundation 0x1eb1641b (Missing)
11 AppName 0x4594b -[AppsFlyerPlugin handleCallback:] (AppsFlyerPlugin.m:192)
The Plugin tries to serialize an NSError reported from the AppsFlyerDelegate via NSJSONSerialization, which results in a crash. Either onConversionDataRequestFailure
or onAppOpenAttributionFailure
can cause this.
See Pull Request
Hi,
I've tried to install appsflyer plugin for iOS and [email protected], iOS work fine but in Android .java files not install in android package file.
Plugin.xml file android target files path change then install properly.
plugin path :
<source-file src="src/android/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java" target-dir="app/src/main/java/com/appsflyer/cordova/plugin" />
<source-file src="src/android/com/appsflyer/cordova/plugin/AppsFlyerConstants.java" target-dir="app/src/main/java/com/appsflyer/cordova/plugin" />
After changes path install properly and work fine
<source-file src="src/android/com/appsflyer/cordova/plugin/AppsFlyerPlugin.java" target-dir="src/com/appsflyer/cordova/plugin" />
<source-file src="src/android/com/appsflyer/cordova/plugin/AppsFlyerConstants.java" target-dir="src/com/appsflyer/cordova/plugin" />
Thanks,
Lokesh Patel
Calling updateServerUninstallToken generates the following warning in the debug log:
THREAD WARNING: exec() call to AppsFlyerPlugin.updateServerUninstallToken blocked the main thread for 104ms. Plugin should use CordovaInterface.getThreadPool().
It seems like a rather long time to block the main thread. This stackoverflow post shows how to run it on a different thread https://stackoverflow.com/a/30145728 by wrapping it in cordova.getThreadPool().execute(new Runnable() {...}
.
Following the setup for this cordova project as well as enabling universal links for iOS does not result in actually directing a user to a specific page in our app.
Versions:
cordova 7.1.0
cordova-android 6.4.0
cordova-ios 4.5.3
cordova-plugin-appsflyer-sdk 4.3.0
iOS: 10.3.3
The associated domains is set to applinks:triggi.onelink.me
, we then publish a onelink with a deep link into a specific page in our app.
On Android the normal deeplinks work, e.g. handleOpenUrl
is called, we call appsflyer.handleOpenUrl
and we then continue to route into the app to the page requested in the deeplink.
However, on iOS it does open our app when it is installed but handleOpenUrl
is never called. I cannot find any other part mentioning a different handling of universal links in the documentation. As the app is opened, universal links must be configured correctly. How to proceed from here?
Rejecting re-init on previously-failed class java.lang.Class<com.appsflyer.GcmInstanceIdListener>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/iid/InstanceIDListenerService;
at void com.appsflyer.u.ˏ(android.content.Context, com.appsflyer.c$a$c) (:114)
at void com.appsflyer.AppsFlyerLib.updateServerUninstallToken(android.content.Context, java.lang.String) (:497)
at boolean com.appsflyer.cordova.plugin.AppsFlyerPlugin.updateServerUninstallToken(org.json.JSONArray, org.apache.cordova.CallbackContext) (AppsFlyerPlugin.java:472)
at boolean com.appsflyer.cordova.plugin.AppsFlyerPlugin.execute(java.lang.String, org.json.JSONArray, org.apache.cordova.CallbackContext) (AppsFlyerPlugin.java:97)
at boolean org.apache.cordova.CordovaPlugin.execute(java.lang.String, java.lang.String, org.apache.cordova.CallbackContext) (CordovaPlugin.java:98)
at void org.apache.cordova.PluginManager.exec(java.lang.String, java.lang.String, java.lang.String, java.lang.String) (PluginManager.java:132)
at java.lang.String org.apache.cordova.CordovaBridge.jsExec(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String) (CordovaBridge.java:59)
at java.lang.String org.apache.cordova.engine.SystemExposedJsApi.exec(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String) (SystemExposedJsApi.java:41)
at void android.os.MessageQueue.nativePollOnce(long, int) (MessageQueue.java:-2)
at android.os.Message android.os.MessageQueue.next() (MessageQueue.java:326)
at void android.os.Looper.loop() (Looper.java:160)
at void android.os.HandlerThread.run() (HandlerThread.java:65)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.iid.InstanceIDListenerService" on path: DexPathList[[zip file "..."],nativeLibraryDirectories=[...]]
at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:134)
at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:379)
at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312)
at void com.appsflyer.u.ˏ(android.content.Context, com.appsflyer.c$a$c) (:114)
at void com.appsflyer.AppsFlyerLib.updateServerUninstallToken(android.content.Context, java.lang.String) (:497)
at boolean com.appsflyer.cordova.plugin.AppsFlyerPlugin.updateServerUninstallToken(org.json.JSONArray, org.apache.cordova.CallbackContext) (AppsFlyerPlugin.java:472)
at boolean com.appsflyer.cordova.plugin.AppsFlyerPlugin.execute(java.lang.String, org.json.JSONArray, org.apache.cordova.CallbackContext) (AppsFlyerPlugin.java:97)
at boolean org.apache.cordova.CordovaPlugin.execute(java.lang.String, java.lang.String, org.apache.cordova.CallbackContext) (CordovaPlugin.java:98)
at void org.apache.cordova.PluginManager.exec(java.lang.String, java.lang.String, java.lang.String, java.lang.String) (PluginManager.java:132)
at java.lang.String org.apache.cordova.CordovaBridge.jsExec(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String) (CordovaBridge.java:59)
at java.lang.String org.apache.cordova.engine.SystemExposedJsApi.exec(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String) (SystemExposedJsApi.java:41)
at void android.os.MessageQueue.nativePollOnce(long, int) (MessageQueue.java:-2)
at android.os.Message android.os.MessageQueue.next() (MessageQueue.java:326)
at void android.os.Looper.loop() (Looper.java:160)
at void android.os.HandlerThread.run() (HandlerThread.java:65)
Using cordova 9 with cordova-android 8.0.0
Why is the gms.InstanceID necessary if we are providing the token from FCM?
Hi all, I tried installing with
ionic cordova plugin add cordova-plugin-appsflyer-sdk --save
for an ionic 3 app (currently working on the android version if that helps any)
and I got the error:
"UnhandledPromiseRejectionWarning: Error: Cannot find module './util/default-engines'"
any help would be apprecaited!
Thanks
ℹ Plugin Version
cordova -plugin-appsflyer-sdk - 4.4.18
ℹ Platform Details:
Angularjs and ionic - 4.5.0
ℹ What i did.
I have moved appsflyer.initSdk function to other js file. i am unable to get any error or success callbacks from the appsflyer.initSdk function in other js file. appsflyer.initSdk function is working fine in main.js file.
ℹ What to be happen.
Based on our business logic, we need to call appsflyer.initSdk function in other js file (without main.js)
ℹ What happened instead
It is not showing any responses at first call.when i try to call intSdk function in any other js file. I am not shown any sort of error or success message in first call. but when i close and open the application,it functions properly
ℹ First call and second call responses.
First call
/com.fam.card01 D/AppsFlyer_4.8.19: didConfigureTokenRefreshService=false
/com.fam.card01 W/AppsFlyer_4.8.19: Exception while collecting facebook's attribution ID.
/com.fam.card01 I/AppsFlyer_4.8.19: IMEI was not collected.
/com.fam.card01 I/AppsFlyer_4.8.19: Android ID was not collected.
Second call
2019-09-03 11:27:50.529 19118-19211/com.fam.card01 D/AppsFlyer_4.8.19: didConfigureTokenRefreshService=true
2019-09-03 11:27:50.547 19118-19211/com.fam.card01 I/AppsFlyer_4.8.19: AppsFlyerLib.sendTrackingWithEvent
2019-09-03 11:27:50.562 19118-19211/com.fam.card01 I/AppsFlyer_4.8.19: url: https://t.appsflyer.com/api/v4/androidevent?buildnumber=4.8.19&app_id=com.fam.card01
2019-09-03 11:27:50.570 19118-19211/com.fam.card01 I/AppsFlyer_4.8.19: data: {"country":"xx","kef6365":"xxxxxx","af_timestamp":"xxxxx","appsflyerKey":"R********************J"}
Thanks in advance.
The androidManifest.xml file has moved as part of support for Android Studio projects. The following error I receive on installation indicates your plugin doesn't support cordova-android 7.
Installing "cordova-plugin-appsflyer-sdk" for android
Android Studio project detected
Error during processing of action! Attempting to revert...
Failed to install 'cordova-plugin-appsflyer-sdk': Error: Uh oh!
ENOENT: no such file or directory, open 'C:\Users\bytenik\Dropbox\Projects\BallStreet\app\platforms\android\AndroidManifest.xml'
at Object.fs.openSync (fs.js:663:18)
at Object.fs.readFileSync (fs.js:568:33)
at Object.parseElementtreeSync (C:\Users\bytenik\Dropbox\Projects\BallStreet\app\platforms\android\cordova\node_modules\cordova-common\src\util\xml-helpers.js:180:27)
at new AndroidManifest (C:\Users\bytenik\Dropbox\Projects\BallStreet\app\platforms\android\cordova\lib\AndroidManifest.js:29:20)
at AndroidProject.getPackageName (C:\Users\bytenik\Dropbox\Projects\BallStreet\app\platforms\android\cordova\lib\AndroidProject.js:99:12)
at AndroidProject.getCustomSubprojectRelativeDir (C:\Users\bytenik\Dropbox\Projects\BallStreet\app\platforms\android\cordova\lib\AndroidProject.js:105:28)
at install (C:\Users\bytenik\Dropbox\Projects\BallStreet\app\platforms\android\cordova\lib\pluginHandlers.js:106:46)
at ActionStack.process (C:\Users\bytenik\Dropbox\Projects\BallStreet\app\platforms\android\cordova\node_modules\cordova-common\src\ActionStack.js:56:25)
at PluginManager.doOperation (C:\Users\bytenik\Dropbox\Projects\BallStreet\app\platforms\android\cordova\node_modules\cordova-common\src\PluginManager.js:114:20)
at PluginManager.addPlugin (C:\Users\bytenik\Dropbox\Projects\BallStreet\app\platforms\android\cordova\node_modules\cordova-common\src\PluginManager.js:144:17)
Error: Uh oh!
ENOENT: no such file or directory, open 'C:\Users\bytenik\Dropbox\Projects\BallStreet\app\platforms\android\AndroidManifest.xml'```
I have followed the steps to setup appsflyer for cordova. The appsflyer lib is available in the cordova javascript console. I have installed the SDK Integration Test tool, which I am able to whitelist my device. However when I select SDK Integration Test
the result is Package name not found
In the appsflyer dashboard I have setup an App for a standalone version. I did notive that I am required to add a channel (I added 'Standalone') and the name in the dashboard then has '-Standalone' prepended. I tried a few variations with no success
Hello,
There is a way to get the attribution link in Android? Not the install referrer.
Was looking at #37 but wasn't able to get the link.
Am i missing something?
Cheers
ℹ Plugin Version
cordova -plugin-appsflyer-sdk - 4.4.18
ℹ Platform Details:
Angularjs and ionic - 4.5.0
ℹ What i did.
I have moved appsflyer.initSdk function to other js file. appsflyer.initSdk function is working fine in main.js file. i am unable to get any error or success callbacks from the appsflyer.initSdk function in other js file .
ℹ What to be happen.
Based on our business logic, we need to call appsflyer.initSdk function in other js file (without main.js)
ℹ What happened instead
It is not showing any responses at first call.when i try to call intSdk function in any other js file. I am not shown any sort of error or success message in first call. but when i close and open the application,it functions properly
ℹ First call and second call responses.
First call
/com.fam.card01 D/AppsFlyer_4.8.19: didConfigureTokenRefreshService=false
/com.fam.card01 W/AppsFlyer_4.8.19: Exception while collecting facebook's attribution ID.
/com.fam.card01 I/AppsFlyer_4.8.19: IMEI was not collected.
/com.fam.card01 I/AppsFlyer_4.8.19: Android ID was not collected.
Second call
2019-09-03 11:27:50.529 19118-19211/com.fam.card01 D/AppsFlyer_4.8.19: didConfigureTokenRefreshService=true
2019-09-03 11:27:50.547 19118-19211/com.fam.card01 I/AppsFlyer_4.8.19: AppsFlyerLib.sendTrackingWithEvent
2019-09-03 11:27:50.562 19118-19211/com.fam.card01 I/AppsFlyer_4.8.19: url: https://t.appsflyer.com/api/v4/androidevent?buildnumber=4.8.19&app_id=com.fam.card01
2019-09-03 11:27:50.570 19118-19211/com.fam.card01 I/AppsFlyer_4.8.19: data: {"country":"xx","kef6365":"xxxxxx","af_timestamp":"xxxxx","appsflyerKey":"R********************J"}
Thanks in advance.
Hi,
I got the following message from apple once I uploaded the app to the app store.
Missing Purpose String in Info.plist File - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSLocationAlwaysUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data will be required to include a purpose string. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).Thanks so much for filing an issue or feature request! Please fill out the following (wherever relevant):
Does your plugin use the device location / uses an API that uses the device location?
I don't get any error once I build and run the app in debug/release mode.
only got the above mail from apple once I uploaded the app store
Hi,
Thank you so much for the plugin. I hope it works for everyone. I built an android app with Cordova CLI. I installed the plugin. After integrating the plugin, the app gives nothing but a black screen. I tried removing the plugin. After removing, the app works normally. I even tried with Phonegap build. It gives the same output.
I installed using CLI - cordova plugin add cordova-plugin-appsflyer-sdk. It is successfully installed.
Gradle - 3.3
Cordova cli-6.5.0
Did I miss anything?
Please help.
Hi,
I tried to track event af_login
on both iOS and Android platforms. I had no problem with iOS platform while I encountered some issues with Android.
I can't track the event with these calls on Android:
window.plugins.appsFlyer.trackEvent("af_login"); // Cannot track: I'm fine with it, one parameter is missing
window.plugins.appsFlyer.trackEvent("af_login", null); // Cannot track, error
window.plugins.appsFlyer.trackEvent("af_login", undefined); // Cannot track, error
window.plugins.appsFlyer.trackEvent("af_login", {}); // Cannot track BUT no error
I can only track the event if I pass an object as second parameter, with one generic key (e.g. af_param_1
)
window.plugins.appsFlyer.trackEvent("af_login", {"af_param_1":"true"}); // Tracking event is OK
This behaviour is the same with other events with no recommended values (e.g. af_list_view
) as documented in Android Rich In-App Events - Descriptions. The Android platform behaviour is not consistent with iOS one, should it be fixed?
AppsFlyer Android SDK version: 4.6.1
AppsFlyer iOS SDK version: 4.5.12
After we noticed missing app open attribution data for some of our users we had a deeper look at the source of the pluggin to search for a reason - and we found it:
We are setting onInstallConversionDataListener
to true
when initializing the SDK to receive the appropriate callbacks. Nevertheless, the onSuccess
callback is not called in all cases with the attribution data. The reason for this is the way the native callbacks (onConversionDataReceived
& onAppOpenAttribution
) are handled in AppsFlyerPlugin.m
.
When starting the app with an AppsFlyer deep link, we should receive both the conversion data (native: onConversionDataReceived
) and the deep link information (native: onAppOpenAttribution
). The problem in the plugin implementation is that only the first of these two callbacks is forwarded to the Java script part of the code and the one that comes second is ignored, because the conversionListeners
will be set to null after the first onSuccess
call (AppsFlyerPlugin.m
line 386, 394 and 375).
Our observation shows that the native callbacks onConversionDataReceived
& onAppOpenAttribution
are both called correctly when we open the app from a deep link, but they are called in different sequence depending if the app is in background or not. This leads to the result that if you open the app with a deeplink, only the conversion data is sent into JavaScript with onSuccess
callback in the case the app was not running at all, and only the app open attribution data is sent in the case the app was in background (app resumes).
The correct behaviour would be, that both the onConversionDataReceived
& onAppOpenAttribution
should be forwarded in both cases.
Keeping the conversionListeners
(=not setting to null in line 386, 394 and maybe also 375) seems to solve the problem, but we don't know the reason why these listeners are currently being removed after their first call.
As this problem affects all users of the Cordova AppsFlyer plugin, it would be good to solve this asap so that deep link attribution can work.
Is it possible to get the url which the user used to enter the store when he installed the app, using this library?
I would like to send this url to our server. Is it possible?
Hi,
I include this plugin and set up deep links on both platform and it not working on real device ios, but working on simulator. What I do wrong?
Versions:
ionic 4
cordova 7.1.0
cordova-ios 4.5.5
cordova-plugin-appsflyer-sdk 4.4.15
iOS: 12.3.1
Does filtering events must happen in the code which sends trackEvent or is there a way to somehow create partners postback in appsflyer dashboard according to specific condition?
For example:
If we want to create event of user third login and call this event zzz, do we have to add condition in our code to check if its the user third login and then send trackEvent with eventName = zzz, or is it possible to send af_login event on each login and then to somehow map in appsflyer dashboard the third af_login event to a custom zzz event?
1)Is it possible to create such custom event mapping?
2)Is it possible to create a condition for when an event postback happens where the condition depends on install time or number of occurrences or on some other data?
Thanks!
Thank you for providing this valuable plugin. Would it be possible to add support for onConversionDataReceived
?
We'd like to be able to track this campaign information for installs in our own system as well.
It appears some support is enabled in the AppsFlyerPlugin.m
, but not in the plugin's js. I tried to add it on my own but I was running into a lot of native errors on a Main.m file after that.
Our issues looks somewhat similar to #30 however in our case onAppOpenAttribution is not called at the very first boot of the app, subsequent times the app is started the callback returns just fine.
This is an issue for us because we rely on AppsFlyer to give us this data to present user-specific data precisely at first boot. Is there any way around this?
Hello,
When i would to install 4.3.3 version like you mentioned on the important readme, the npm response is
"
npm ERR! notarget 4.4.9, 4.4.8, 4.4.7, 4.4.6, 4.4.5, 4.4.3, 4.4.2, 4.4.0, 4.3.0, 4.2.28, 4.2.27, 4.2.25, 4.2.24, 4.2.23, 4.2.22, 4.2.21, 4.2.20, 4.2.19, 4.2.18, 4.2.17, 4.2.16, 4.2.15, 4.2.14, 4.2.13, 4.2.12, 4.2.11, 4.2.10, 4.2.9
"
Could you fixed this ?
Thank's a lot
Best,
I have the following setup (using [email protected] and also tested with [email protected]):
cli packages: (/Users/jacques/dev/mobile/node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 7.1.0
Gulp CLI : CLI version 3.9.1 Local version 3.9.1
local packages:
Cordova Platforms : android 6.4.0
Ionic Framework : ionic1 1.3.5
System:
ios-deploy : 1.9.2
Node : v8.9.4
npm : 2.15.12
OS : macOS High Sierra
Xcode : Xcode 9.3 Build version 9E145
Environment Variables:
ANDROID_HOME : /Library/Android/sdk
I get the error below
Could not resolve all files for configuration ':debugCompileClasspath'.
> Failed to transform file 'AF-Android-SDK.jar' to match attributes {artifactType=android-classes} using transform JarTransform
> Transform output file /Users/user/dev/mobile/platforms/android/src/main/libs/AF-Android-SDK.jar does not exist.
It looks like main/libs is missing from src/. It does work when I manually copy the SDK.jar file into that location, but for whatever reason it seems it's not being copied over.
I am using this Cordova plugin and it works for iOS, I am able to track installations of the iOS App built with Cordova.
I am unable though to track the installations of the Android app.
The dashboard is configured in this way:
I clicked "Add App", I chose "Android out of store APK", I added as store details: the bundle identifier of my app, "TEST" as channel name and a fake url for the App URL.
I saved and the dashboard got created successfully.
When I execute the init command the response says success but no installations appear on the dashboard.
Any help, please? :(
This package doesn't have a default file set. You can set it via jsdelivr
, browser
, or main
field in package.json
Hi
Appsflyer deep links in Facebook app (Ads) doesn’t work for us.
The error message we get is below:
App links Field Invalid:: The described URL doesn’t have app links HTML meta tags. Use a different URL or a mobile deep link(e.g ‘mobile app://).
Hi,
I'm using a demo account for AppsFlyer and was testing Uninstall feature. During my testing I found out that AppsFlyer need APNS Token to track IOS uninstall. I don't understand the reason for this.
Since we are using Firebase Notifcations for both IOS and Android, I don't understand the need to add another notification system to my app just for AppsFlyer uninstall event track.
Please correct me if I'm wrong.
Reference to this
https://github.com/AppsFlyerSDK/cordova-plugin-appsflyer-sdk#registerUninstall
https://support.appsflyer.com/hc/en-us/articles/210289286#iOS-Uninstall
Thanks
Hello everybody,
I have this error when I try to compile the project with Android
"09-05 10:43:01.202 27636-27772/com.homepaq W/System.err: java.lang.ClassNotFoundException: com.appsflyer.cordova.plugin.AppsFlyerPlugin
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:453)
09-05 10:43:01.208 27636-27772/com.homepaq W/System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.appsflyer.cordova.plugin.AppsFlyerPlugin" on path: DexPathList[[zip file "/data/app/com.homepaq-DRo61prvRC8Mkx2qSuEImg==/base.apk"],nativeLibraryDirectories=[/data/app/com.homepaq-DRo61prvRC8Mkx2qSuEImg==/lib/arm64, /system/lib64, /system/vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
09-05 10:43:01.211 27636-27772/com.homepaq I/System.out: Error adding plugin com.appsflyer.cordova.plugin.AppsFlyerPlugin."
I have Cordova v8.0.0 and cordovaAndroid v6.2.3
and the last version of AppsFlyer
Please share/comment isn't this plugin support ionic 2 as well? If yes, how to initialize this plugin in ionic 2 project?
I am not the one doing the integration. Actually it's someone in another country. So before recommending the implementation I'd just like to know if it's compatible without having to run a POC.
ℹ Plugin Version
cordova -plugin-appsflyer-sdk - 4.4.18
ℹ Platform Details:
Angularjs and ionic - 4.5.0
ℹ What i did.
I have moved appsflyer.initSdk function to other js file. i am unable to get any error or success callbacks from the appsflyer.initSdk function in other js file. appsflyer.initSdk function is working fine in main.js file.
ℹ What to be happen.
Based on our business logic, we need to call appsflyer.initSdk function in other js file (without main.js)
ℹ What happened instead
It is not showing any responses at first call.when i try to call intSdk function in any other js file. I am not shown any sort of error or success message in first call. but when i close and open the application,it functions properly
ℹ First call and second call responses.
First call
/com.fam.card01 D/AppsFlyer_4.8.19: didConfigureTokenRefreshService=false
/com.fam.card01 W/AppsFlyer_4.8.19: Exception while collecting facebook's attribution ID.
/com.fam.card01 I/AppsFlyer_4.8.19: IMEI was not collected.
/com.fam.card01 I/AppsFlyer_4.8.19: Android ID was not collected.
Second call
2019-09-03 11:27:50.529 19118-19211/com.fam.card01 D/AppsFlyer_4.8.19: didConfigureTokenRefreshService=true
2019-09-03 11:27:50.547 19118-19211/com.fam.card01 I/AppsFlyer_4.8.19: AppsFlyerLib.sendTrackingWithEvent
2019-09-03 11:27:50.562 19118-19211/com.fam.card01 I/AppsFlyer_4.8.19: url: https://t.appsflyer.com/api/v4/androidevent?buildnumber=4.8.19&app_id=com.fam.card01
2019-09-03 11:27:50.570 19118-19211/com.fam.card01 I/AppsFlyer_4.8.19: data: {"country":"xx","kef6365":"xxxxxx","af_timestamp":"xxxxx","appsflyerKey":"R********************J"}
Thanks in advance.
I'm receiving a build error since 4.4.16 was released.
Does AppsFlyerTrackingRequestListener need to be imported in AppsFlyerPlugin.java (I'm not a Java/Android dev)?
Seems to related to PR #59
platforms\android\app\src\main\java\com\appsflyer\cordova\plugin\AppsFlyerPlugin.java:198: error: cannot find symbol
instance.startTracking(c.getApplication(), devKey, new AppsFlyerTrackingRequestListener() {
^
symbol: class AppsFlyerTrackingRequestListener
location: class AppsFlyerPlugin
Cordova version: 6.5.0
Plugin version: 4.2.19
If I look at the source it looks like this method is renamed to 'setGCMProjectNumber'. Please update documentation or change it back to 'setGCMProjectID' so it's backwards compatible.
Hi,
I'm using this plugin with angularjs to trackingEvent but I canot see event on Dashboard.
This is my code:
var onSuccess = function (result) {
console.log("onSuccess init sdk");
var eventName = "Main Screen";
var params = {
"af_content_id": "id123",
"af_currency": "USD",
"af_revenue": "2"
};
$window.plugins.appsFlyer.trackEvent(eventName, params);
};
function onError(err) {
console.log("onError init sdk");
}
var options = {
devKey: 'devkey',
isDebug: false,
onInstallConversionDataListener: true
};
$window.plugins.appsFlyer.initSdk(options, onSuccess, onError);
I cannot see the event on Dashboard event, image as below:
Does my source code missing anything? Do I need setting anything?
Please help me this case.
Thanks.
Unable to install plugin.
Specs and install output as follows.
Ionic:
ionic (Ionic CLI) : 4.3.1
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.1.11
Cordova:
cordova (Cordova CLI) : 8.1.2
Cordova Platforms : android 7.1.2, ios 4.5.5
Cordova Plugins : no whitelisted plugins (23 plugins total)
System:
Android SDK Tools : 26.1.1
ios-deploy : 2.0.0
NodeJS : v11.1.0
npm : 6.4.1
OS : macOS
Xcode : Xcode 10.1 Build version 10B61
$ ionic cordova plugin add cordova-plugin-appsflyer-sdk
> cordova plugin add cordova-plugin-appsflyer-sdk --save
Installing "cordova-plugin-appsflyer-sdk" for android
Android Studio project detected
Error during processing of action! Attempting to revert...
Failed to install 'cordova-plugin-appsflyer-sdk': TypeError [ERR_INVALID_ARG_TYPE]: Uh oh!
The "path" argument must be of type string. Received type undefined
at assertPath (path.js:39:11)
at Object.resolve (path.js:1088:7)
Uh oh!
The "path" argument must be of type string. Received type undefined
Hi,
I'm testing plugin integration with a Cordova application. I activated debug mode (isDebug: true
) in Android simulator and the application logs:
W/AppsFlyer_4.6.1: Permission android.permission.ACCESS_WIFI_STATE is missing in the AndroidManifest.xml
and effectively the requested permission is missing in the manifest. However I do not found the permission config inside the plugin.xml file (as seen here).
<config-file target="AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
</config-file>
It should be added or it can be omitted without any problem?
Hi,
When installing the plugin using Cordova 6.5.0 or 7.0.1, version 4.2.18 is installed and not the latest version. Even if i specifically include 4.2.19, the wrong version is installed. Could you bump the plugin.xml?
Thanks.
Hello,
I use Appsflyer Direct Deeplink and it works fine but when I try set up Deferred Deep Linking and test it I can see that it unstable work. Specifically, I almost always get variable conversionData.data.is_first_launch - "false", even if I delete the application before.
Any help?
On Releases tab, it shows the current version is 4.3.0. But in plugin.xml the version is not updated -
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-appsflyer-sdk"
version="4.2.23">
This has caused a lot of confusion :)
Hi,
I try to use the enableUninstallTracking feature. it doesn't work on Android (I can't receive track on the dashboard) 。
My index.js file like this
www\js\index.js
document.addEventListener("deviceready", function(){
var options = {
devKey: '123456789',
isDebug: false,
onInstallConversionDataListener: true
};
var userAgent = window.navigator.userAgent.toLowerCase();
window.plugins.appsFlyer.initSdk(options);
var gcmProjectNumber = "123456";
window.plugins.appsFlyer.setGCMProjectNumber(gcmProjectNumber);
var push = PushNotification.init({
android: {
senderID: "123456"
}
});
push.on('registration', function(data) {
window.plugins.appsFlyer.enableUninstallTracking(gcmProjectNumber);
});
}, false);
Thanks
According to the documentation, when trying to pass custom data on an invite link this should be the object used.
var inviteOptions = {
channel: "gmail",
campaign: "myCampaign",
customerID: "1234",
userParams: {
myParam : "newUser",
anotherParam : "fromWeb",
amount : 1
}
};
The link is created successfully, and when opened on the application, and reading the data with
registerOnAppOpenAttribution
the data is missing the custom parameters.
On IOS
Apparently the function to generate the invite links expects the custom params on a second argument, and the plugin is only proxying one argument.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.