Skip to content

Commit

Permalink
Merge pull request #55 from adjust/v4220-1
Browse files Browse the repository at this point in the history
Version 4.22.0
  • Loading branch information
uerceg authored Dec 16, 2020
2 parents 5b54f36 + e064868 commit 613ddbe
Show file tree
Hide file tree
Showing 80 changed files with 2,642 additions and 610 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
### Version 4.22.0 (16th December 2020)
#### Added
- Added communication with SKAdNetwork framework by default on iOS 14.
- Added method `deactivateSKAdNetworkHandling` method to `AdjustConfig` to switch off default communication with SKAdNetwork framework in iOS 14.
- Added wrapper method `requestTrackingAuthorizationWithCompletionHandler` to `Adjust` to allow asking for user's consent to be tracked in iOS 14 and immediate propagation of user's choice to backend.
- Added handling of new iAd framework error codes introduced in iOS 14.
- Added sending of value of user's consent to be tracked with each package.
- Added `setUrlStrategy` method to `AdjustConfig` class to allow selection of URL strategy for specific market.
- Added possibility to get cost data information in attribution callback.
- Added `setNeedsCost` method to `AdjustConfig` to indicate if cost data is needed in attribution callback (by default cost data will not be part of attribution callback if not enabled with this setter method).
- Added `setPreinstallTrackingEnabled` method to `AdjustConfig` to allow enabling of preintall tracking (this feature is OFF by default).

**Note**: 4.22.0 ANE is built to support iOS 14 for which you will need **Adobe AIR SDK 33.1.1.300 or higher** and **Xcode 12** to compile your iOS app with.

#### Native SDKs
- [[email protected]][ios_sdk_v4.24.0]
- [[email protected]][android_sdk_v4.25.0]

---

### Version 4.21.1 (4th May 2020)
#### Fixed
- Removed iAd timer from iOS native SDK.
Expand Down Expand Up @@ -452,6 +472,7 @@
[ios_sdk_v4.18.3]: https://github.com/adjust/ios_sdk/tree/v4.18.3
[ios_sdk_v4.21.1]: https://github.com/adjust/ios_sdk/tree/v4.21.1
[ios_sdk_v4.21.3]: https://github.com/adjust/ios_sdk/tree/v4.21.3
[ios_sdk_v4.24.0]: https://github.com/adjust/ios_sdk/tree/v4.24.0

[android_sdk_v2.1.3]: https://github.com/adjust/android_sdk/tree/v2.1.3
[android_sdk_v2.1.4]: https://github.com/adjust/android_sdk/tree/v2.1.4
Expand All @@ -473,3 +494,4 @@
[android_sdk_v4.17.0]: https://github.com/adjust/android_sdk/tree/v4.17.0
[android_sdk_v4.18.4]: https://github.com/adjust/android_sdk/tree/v4.18.4
[android_sdk_v4.21.1]: https://github.com/adjust/android_sdk/tree/v4.21.1
[android_sdk_v4.25.0]: https://github.com/adjust/android_sdk/tree/v4.25.0
74 changes: 74 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ This is the Adobe AIR SDK of Adjust™. You can read more about Adjust™ at [Ad
* [Huawei Referrer API](#huawei-referrer-api)
* [Proguard settings](#sdk-proguard)
* [Additional features](#additional-features)
* [AppTrackingTransparency framework](#ad-att-framework)
* [App-tracking authorisation wrapper](#ad-ata-wrapper)
* [SKAdNetwork framework](#ad-skadn-framework)
* [Event tracking](#event-tracking)
* [Revenue tracking](#revenue-tracking)
* [Revenue deduplication](#revenue-deduplication)
Expand Down Expand Up @@ -261,6 +264,77 @@ If you are **not targeting the Google Play Store**, you can remove the `com.goog

You can take advantage of the following features once the Adjust SDK is integrated into your project.

### <a id="ad-att-framework"></a>AppTrackingTransparency framework

**Note**: This feature exists only in iOS platform.

For each package sent, the Adjust backend receives one of the following four (4) states of consent for access to app-related data that can be used for tracking the user or the device:

- Authorized
- Denied
- Not Determined
- Restricted

After a device receives an authorization request to approve access to app-related data, which is used for user device tracking, the returned status will either be Authorized or Denied.

Before a device receives an authorization request for access to app-related data, which is used for tracking the user or device, the returned status will be Not Determined.

If authorization to use app tracking data is restricted, the returned status will be Restricted.

The SDK has a built-in mechanism to receive an updated status after a user responds to the pop-up dialog, in case you don't want to customize your displayed dialog pop-up. To conveniently and efficiently communicate the new state of consent to the backend, Adjust SDK offers a wrapper around the app tracking authorization method described in the following chapter, App-tracking authorization wrapper.

### <a id="ad-ata-wrapper"></a>App-tracking authorisation wrapper

**Note**: This feature exists only in iOS platform.

Adjust SDK offers the possibility to use it for requesting user authorization in accessing their app-related data. Adjust SDK has a wrapper built on top of the [requestTrackingAuthorizationWithCompletionHandler:](https://developer.apple.com/documentation/apptrackingtransparency/attrackingmanager/3547037-requesttrackingauthorizationwith?language=objc) method, where you can as well define the callback method to get information about a user's choice. Also, with the use of this wrapper, as soon as a user responds to the pop-up dialog, it's then communicated back using your callback method. The SDK will also inform the backend of the user's choice. The `NSUInteger` value will be delivered via your callback method with the following meaning:

- 0: `ATTrackingManagerAuthorizationStatusNotDetermined`
- 1: `ATTrackingManagerAuthorizationStatusRestricted`
- 2: `ATTrackingManagerAuthorizationStatusDenied`
- 3: `ATTrackingManagerAuthorizationStatusAuthorized`

To use this wrapper, you can call it as such:

```actionscript
import com.adjust.sdk.Adjust;
import com.adjust.sdk.AdjustConfig;
import com.adjust.sdk.Environment;
import com.adjust.sdk.LogLevel;
public class Example extends Sprite {
public function Example() {
var appToken:String = "{YourAppToken}";
var environment:String = Environment.SANDBOX;
var adjustConfig:AdjustConfig = new AdjustConfig(appToken, environment);
adjustConfig.setLogLevel(LogLevel.VERBOSE);
Adjust.start(adjustConfig);
Adjust.requestTrackingAuthorizationWithCompletionHandler(authorizationStatusDelegate);
}
// ...
private static function authorizationStatusDelegate(status:String):void {
trace("Status = " + status);
}
}
```

### <a id="ad-skadn-framework"></a>SKAdNetwork framework

**Note**: This feature exists only in iOS platform.

If you have implemented the Adjust iOS SDK v4.22.0 or above and your app is running on iOS 14, the communication with SKAdNetwork will be set on by default, although you can choose to turn it off. When set on, Adjust automatically registers for SKAdNetwork attribution when the SDK is initialized. If events are set up in the Adjust dashboard to receive conversion values, the Adjust backend sends the conversion value data to the SDK. The SDK then sets the conversion value. After Adjust receives the SKAdNetwork callback data, it is then displayed in the dashboard.

In case you don't want the Adjust SDK to automatically communicate with SKAdNetwork, you can disable that by calling the following method on configuration object:

```actionscript
adjustConfig.deactivateSKAdNetworkHandling();
```

### <a id="event-tracking"></a>Event tracking

You can tell Adjust about every event you want to track. Suppose you want to track every tap on a button. Simply create a new event token in your [dashboard]. Let's say that event token is `abc123`. You can add the following line in your button’s click handler method to track the click:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.21.0
4.22.0
4 changes: 4 additions & 0 deletions default/src/com/adjust/sdk/Adjust.as
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ package com.adjust.sdk {
trace("Adjust: disableThirdPartySharing called");
}

public static function requestTrackingAuthorizationWithCompletionHandler(callback:Function):void {
trace("Adjust: requestTrackingAuthorizationWithCompletionHandler called");
}

public static function setTestOptions(testOptions:AdjustTestOptions):void {
trace("Adjust: setTestOptions called");
}
Expand Down
39 changes: 30 additions & 9 deletions default/src/com/adjust/sdk/AdjustAttribution.as
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ package com.adjust.sdk {
private var adgroup:String;
private var clickLabel:String;
private var adid:String;
private var costType:String;
private var costAmount:String;
private var costCurrency:String;

public function AdjustAttribution(
trackerToken:String,
Expand All @@ -17,15 +20,21 @@ package com.adjust.sdk {
creative:String,
adgroup:String,
clickLabel:String,
adid:String) {
this.trackerToken = trackerToken == null ? "" : trackerToken;
this.trackerName = trackerName == null ? "" : trackerName;
this.campaign = campaign == null ? "" : campaign;
this.network = network == null ? "" : network;
this.creative = creative == null ? "" : creative;
this.adgroup = adgroup == null ? "" : adgroup;
this.clickLabel = clickLabel == null ? "" : clickLabel;
this.adid = adid == null ? "" : adid;
adid:String,
costType:String,
costAmount:String,
costCurrency:String) {
this.trackerToken = trackerToken;
this.trackerName = trackerName;
this.campaign = campaign;
this.network = network;
this.creative = creative;
this.adgroup = adgroup;
this.clickLabel = clickLabel;
this.adid = adid;
this.costType = costType;
this.costAmount = costAmount;
this.costCurrency = costCurrency;
}

// Getters
Expand Down Expand Up @@ -60,5 +69,17 @@ package com.adjust.sdk {
public function getAdid():String {
return this.adid;
}

public function getCostType():String {
return this.costType;
}

public function getCostAmount():String {
return this.costAmount;
}

public function getCostCurrency():String {
return this.costCurrency;
}
}
}
Loading

0 comments on commit 613ddbe

Please sign in to comment.