Skip to content

Commit

Permalink
6.2.10
Browse files Browse the repository at this point in the history
6.2.10
  • Loading branch information
amit-kremer93 authored Jan 27, 2021
2 parents a2ff15a + e0d332f commit 0315faf
Show file tree
Hide file tree
Showing 11 changed files with 286 additions and 115 deletions.
42 changes: 23 additions & 19 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The list of available methods for this plugin is described below.
| [`initSdk`](#initSdk) | `(Object args, function success, function error)` | Initialize the SDK|
| [`logEvent`](#trackEvent) | `(String eventName, Object eventValue, function success, function error)` | Track rich in-app events |
| [`registerOnAppOpenAttribution`](#registerOnAppOpenAttribution) | `(function success, function error)` | Get the deeplink data |
| [`registerDeepLink`](#registerDeepLink) | `(function callBack)` | Get unified deep link data |
| [`setCurrencyCode`](#setCurrencyCode) | `(String currencyId)` | Set currency code |
| [`setAppUserId`](#setAppUserId) | `(String customerUserId)` | Set custom_user_id |
| [`setGCMProjectNumber`](#initSdk) | `(String gcmProjectNumber)` | |
Expand Down Expand Up @@ -204,27 +205,30 @@ In any event, the SDK can be reactivated by calling the same API, but to pass fa

```javascript
window.plugins.appsFlyer.registerOnAppOpenAttribution(function(res) {
console.log('AppsFlyer OAOA ==> ' + res);
alert('AppsFlyer OAOA ==> ' + res);
},
function onAppOpenAttributionError(err) {
console.log(err);
});

{
"data": {
"af_deeplink": "true",
"campaign": "boo",
"key": "val",
"media_source": "someMedia",
"install_time": "2018-07-12 13:20:19",
"af_status": "Non-organic",
"path": "",
"scheme": "https",
"host": "ionic.fess.onelink.me"
},
"type": "onAppOpenAttribution",
"status": "success"
}
},
function onAppOpenAttributionError(err){
// ...
});
```
---
##### <a id="registerDeepLink"> **`registerDeepLink(callBack): void`**

**Note:** most be called before `initSdk()` and it overrides `registerOnAppOpenAttribution`.

| parameter | type | description |
| ----------- |-----------------------------|--------------|
| `callBack` | `(message: stringifed JSON)=>void` | function called after receiving dep link data|

*Example:*

```javascript
window.plugins.appsFlyer.registerDeepLink(function(res) {
console.log('AppsFlyer DDL ==> ' + res);
alert('AppsFlyer DDL ==> ' + res);
});
```
---

Expand Down
39 changes: 37 additions & 2 deletions docs/Guides.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- [DeepLinking](#deeplinking)
- [Deferred Deep Linking (Get Conversion Data)](#deferred-deep-linking)
- [Direct Deeplinking](#handle-deeplinking)
- [Unified Deeplinking](#Unified-deep-linking)
- [Android Deeplink Setup](#android-deeplink)
- [iOS Deeplink Setup](#ios-deeplink)
- [Uninstall](#uninstall)
Expand Down Expand Up @@ -71,11 +72,13 @@ window.plugins.appsFlyer.initSdk(options, onSuccess, onError);
![alt text](https://massets.appsflyer.com/wp-content/uploads/2018/03/21101417/app-installed-Recovered.png "")


#### The 2 Deep Linking Types:
#### The 3 Deep Linking Types:
Since users may or may not have the mobile app installed, there are 2 types of deep linking:

1. Deferred Deep Linking - Serving personalized content to new or former users, directly after the installation.
2. Direct Deep Linking - Directly serving personalized content to existing users, which already have the mobile app installed.
3. Unified deep linking - Unified deep linking sends new and existing users to a specific in-app activity as soon as the app is opened.<br>
For more info please check out the [OneLink™ Deep Linking Guide](https://dev.appsflyer.com/docs/initial-setup-for-deep-linking-and-deferred-deep-linking).

For more info please check out the [OneLink™ Deep Linking Guide](https://support.appsflyer.com/hc/en-us/articles/208874366-OneLink-Deep-Linking-Guide#Intro).

Expand Down Expand Up @@ -154,6 +157,36 @@ function onAppOpenAttributionError(err){

```

### <a id="Unified-deep-linking"> 3. Unified deep linking
In order to use the unified deep link you need to send the `onDeepLinkListener: true` flag inside the object that sent to the sdk.<br>
**NOTE:** when sending this flag, the sdk will ignore `onAppOpenAttribution`!<br>
For more information about this api, please check [OneLink Guide Here](https://dev.appsflyer.com/docs/android-unified-deep-linking)


```javascript
window.plugins.appsFlyer.registerDeepLink(function(res) {
console.log('AppsFlyer DDL ==> ' + res);
alert('AppsFlyer DDL ==> ' + res);
});

let options = {
devKey: 'UsxXxXxed',
isDebug: true,
appId: '74xXxXx91',
onInstallConversionDataListener: true,
onDeepLinkListener: true // by default onDeepLinkListener is false!
};

window.plugins.appsFlyer.initSdk(options, function(res) {
console.log('AppsFlyer GCD ==>' + res);
alert('AppsFlyer GCD ==> ' + res);

}, function(err) {
console.log(`AppsFlyer GCD ==> ${err}`);
});
```

**Note:** The code implementation for `onDeepLink` must be made **prior to the initialization** code of the SDK.

### <a id="android-deeplink"> Android Deeplink Setup

Expand Down Expand Up @@ -215,7 +248,9 @@ For plugin version **6.2.0** and up you need to add this to `didFinishLaunchingW
if (_AppsFlyerdelegate == nil) {
_AppsFlyerdelegate = [[AppsFlyerPlugin alloc] init];
}
[[AppsFlyerLib shared] setDelegate:_AppsFlyerdelegate];
[[AppsFlyerLib shared] setDelegate:_AppsFlyerdelegate]; //if you want to use onAppOpenAttribution listener (registerOnAppOpenAttribution())
//OR
[[AppsFlyerLib shared] setDeepLinkDelegate:_AppsFlyerdelegate]; //if you want to use DDL listener (registerDeepLink())
```
And `#import "AppsFlyerPlugin.h"` to `AppDelegate.m`

Expand Down
8 changes: 8 additions & 0 deletions docs/RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# Release Notes
### 6.2.10
Release date **January 27, 2021**
Release type: Major / **Minor** / Hotfix

**Overview and Highlights:**

- Add Unified DDL

### 6.2.0
Release date **January 17, 2021**
Release type: Major / **Minor** / Hotfix
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-appsflyer-sdk",
"version": "6.2.0",
"version": "6.2.10",
"description": "Cordova AppsFlyer SDK Plugin",
"cordova": {
"id": "cordova-plugin-appsflyer-sdk",
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<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="6.2.0">
version="6.2.10">
<name>AppsFlyer</name>
<description>Cordova Plugin AppsFlyer</description>
<license>Apache 2.0</license>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public class AppsFlyerConstants {

final static String AF_SUCCESS ="success";
final static String AF_FAILURE ="failure";
final static String AF_ON_DEEP_LINKING = "onDeepLinkListener";
final static String AF_DEEP_LINK = "onDeepLinking";
final static String AF_ON_ATTRIBUTION_FAILURE ="onAttributionFailure";
final static String AF_ON_APP_OPEN_ATTRIBUTION ="onAppOpenAttribution";
final static String AF_ON_INSTALL_CONVERSION_FAILURE ="onInstallConversionFailure";
Expand Down
Loading

0 comments on commit 0315faf

Please sign in to comment.