-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from adjust/v4220
Version 4.22.0
- Loading branch information
Showing
54 changed files
with
1,314 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,22 @@ | ||
### Version 4.22.0 (17th June 2020) | ||
#### Added | ||
- Added subscription tracking feature. | ||
- Added support for Huawei App Gallery install referrer. | ||
- Added `disableThirdPartySharing` method to `Adjust2dx` interface to allow disabling of data sharing with third parties outside of Adjust ecosystem. | ||
- Added support for signature library as a plugin. | ||
- Added more aggressive sending retry logic for install session package. | ||
- Added additional parameters to `ad_revenue` package payload. | ||
- Added external device ID support. | ||
|
||
#### Changed | ||
- Updated communication flow with `iAd.framework`. | ||
|
||
#### Native SDKs | ||
- [[email protected]][ios_sdk_v4.22.1] | ||
- [[email protected]][android_sdk_v4.22.0] | ||
|
||
--- | ||
|
||
### Version 4.18.0 (4th July 2019) | ||
#### Added | ||
- Added `trackAdRevenue` method to `Adjust2dx` interface to allow tracking of ad revenue. With this release added support for `MoPub` ad revenue tracking. | ||
|
@@ -291,6 +310,7 @@ | |
[ios_sdk_v4.17.1]: https://github.com/adjust/ios_sdk/tree/v4.17.1 | ||
[ios_sdk_v4.17.2]: https://github.com/adjust/ios_sdk/tree/v4.17.2 | ||
[ios_sdk_v4.18.0]: https://github.com/adjust/ios_sdk/tree/v4.18.0 | ||
[ios_sdk_v4.22.1]: https://github.com/adjust/ios_sdk/tree/v4.22.1 | ||
|
||
[android_sdk_v4.0.8]: https://github.com/adjust/android_sdk/tree/v4.0.8 | ||
[android_sdk_v4.1.0]: https://github.com/adjust/android_sdk/tree/v4.1.0 | ||
|
@@ -308,5 +328,6 @@ | |
[android_sdk_v4.14.0]: https://github.com/adjust/android_sdk/tree/v4.14.0 | ||
[android_sdk_v4.17.0]: https://github.com/adjust/android_sdk/tree/v4.17.0 | ||
[android_sdk_v4.18.0]: https://github.com/adjust/android_sdk/tree/v4.18.0 | ||
[android_sdk_v4.22.0]: https://github.com/adjust/android_sdk/tree/v4.22.0 | ||
|
||
[windows_sdk_v4.0.3]: https://github.com/adjust/windows_sdk/tree/v4.0.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ This is the Cocos2d-x SDK of Adjust™. You can read more about Adjust™ at [Ad | |
* [Callback parameters](#callback-parameters) | ||
* [Partner parameters](#partner-parameters) | ||
* [Callback identifier](#callback-id) | ||
* [Subscription tracking](#subscription-tracking) | ||
* [Session parameters](#session-parameters) | ||
* [Session callback parameters](#session-callback-parameters) | ||
* [Session partner parameters](#session-partner-parameters) | ||
|
@@ -38,6 +39,7 @@ This is the Cocos2d-x SDK of Adjust™. You can read more about Adjust™ at [Ad | |
* [Offline mode](#offline-mode) | ||
* [Event buffering](#event-buffering) | ||
* [GDPR right to be forgotten](#gdpr-forget-me) | ||
* [Disable third-party sharing](#disable-third-party-sharing) | ||
* [SDK signature](#sdk-signature) | ||
* [Background tracking](#background-tracking) | ||
* [Device IDs](#device-ids) | ||
|
@@ -390,6 +392,113 @@ adjustEvent.setCallbackId("Your-Custom-Id"); | |
Adjust2dx::trackEvent(adjustEvent); | ||
``` | ||
|
||
### <a id="subscription-tracking"></a>Subscription tracking | ||
|
||
**Note**: This feature is only available in the SDK v4.22.0 and above. | ||
|
||
You can track App Store and Play Store subscriptions and verify their validity with the Adjust SDK. After a subscription has been successfully purchased, make the following call to the Adjust SDK: | ||
|
||
**For App Store subscription:** | ||
|
||
```cpp | ||
AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx( | ||
price, | ||
currency, | ||
transactionId, | ||
receipt | ||
); | ||
subscription.setTransactionDate(transactionDate); | ||
subscription.setSalesRegion(salesRegion); | ||
|
||
Adjust2dx::trackAppStoreSubscription(subscription); | ||
``` | ||
**For Play Store subscription:** | ||
```cpp | ||
AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx( | ||
price, | ||
currency, | ||
sku, | ||
orderId, | ||
signature, | ||
purchaseToken | ||
); | ||
subscription.setPurchaseTime(purchaseTime); | ||
Adjust2dx::trackPlayStoreSubscription(subscription); | ||
``` | ||
|
||
Subscription tracking parameters for App Store subscription: | ||
|
||
- [price](https://developer.apple.com/documentation/storekit/skproduct/1506094-price?language=objc) | ||
- currency (you need to pass [currencyCode](https://developer.apple.com/documentation/foundation/nslocale/1642836-currencycode?language=objc) of the [priceLocale](https://developer.apple.com/documentation/storekit/skproduct/1506145-pricelocale?language=objc) object) | ||
- [transactionId](https://developer.apple.com/documentation/storekit/skpaymenttransaction/1411288-transactionidentifier?language=objc) | ||
- [receipt](https://developer.apple.com/documentation/foundation/nsbundle/1407276-appstorereceipturl) | ||
- [transactionDate](https://developer.apple.com/documentation/storekit/skpaymenttransaction/1411273-transactiondate?language=objc) | ||
- salesRegion (you need to pass [countryCode](https://developer.apple.com/documentation/foundation/nslocale/1643060-countrycode?language=objc) of the [priceLocale](https://developer.apple.com/documentation/storekit/skproduct/1506145-pricelocale?language=objc) object) | ||
|
||
Subscription tracking parameters for Play Store subscription: | ||
|
||
- [price](https://developer.android.com/reference/com/android/billingclient/api/SkuDetails#getpriceamountmicros) | ||
- [currency](https://developer.android.com/reference/com/android/billingclient/api/SkuDetails#getpricecurrencycode) | ||
- [sku](https://developer.android.com/reference/com/android/billingclient/api/Purchase#getsku) | ||
- [orderId](https://developer.android.com/reference/com/android/billingclient/api/Purchase#getorderid) | ||
- [signature](https://developer.android.com/reference/com/android/billingclient/api/Purchase#getsignature) | ||
- [purchaseToken](https://developer.android.com/reference/com/android/billingclient/api/Purchase#getpurchasetoken) | ||
- [purchaseTime](https://developer.android.com/reference/com/android/billingclient/api/Purchase#getpurchasetime) | ||
|
||
**Note:** Subscription tracking API offered by Adjust SDK expects all parameters to be passed as `string` values. Parameters described above are the ones which API exects you to pass to subscription object prior to tracking subscription. There are various libraries which are handling in app purchases in Cocos2d-x and each one of them should return information described above in some form upon successfully completed subscription purchase. You should locate where these parameters are placed in response you are getting from library you are using for in app purchases, extract those values and pass them to Adjust API as string values. | ||
|
||
Just like with event tracking, you can attach callback and partner parameters to the subscription object as well: | ||
|
||
**For App Store subscription:** | ||
|
||
```cpp | ||
AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx( | ||
price, | ||
currency, | ||
transactionId, | ||
receipt | ||
); | ||
subscription.setTransactionDate(transactionDate); | ||
subscription.setSalesRegion(salesRegion); | ||
|
||
// add callback parameters | ||
subscription.addCallbackParameter("key", "value"); | ||
subscription.addCallbackParameter("foo", "bar"); | ||
|
||
// add partner parameters | ||
subscription.addPartnerParameter("key", "value"); | ||
subscription.addPartnerParameter("foo", "bar"); | ||
|
||
Adjust2dx::trackAppStoreSubscription(subscription); | ||
``` | ||
**For Play Store subscription:** | ||
```cpp | ||
AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx( | ||
price, | ||
currency, | ||
sku, | ||
orderId, | ||
signature, | ||
purchaseToken | ||
); | ||
subscription.setPurchaseTime(purchaseTime); | ||
// add callback parameters | ||
subscription.addCallbackParameter("key", "value"); | ||
subscription.addCallbackParameter("foo", "bar"); | ||
// add partner parameters | ||
subscription.addPartnerParameter("key", "value"); | ||
subscription.addPartnerParameter("foo", "bar"); | ||
Adjust2dx::trackPlayStoreSubscription(subscription); | ||
``` | ||
|
||
### <a id="session-parameters"></a>Session parameters | ||
|
||
Some parameters are saved to be sent in every event and session of the Adjust SDK. Once you have added any of these parameters, you don't need to add them again, since they will be saved locally. If you add the same parameter twice, there will be no effect. | ||
|
@@ -719,6 +828,18 @@ Adjust2dx::gdprForgetMe(); | |
|
||
Upon receiving this information, Adjust will erase the user's data and the Adjust SDK will stop tracking the user. No requests from this device will be sent to Adjust in the future. | ||
|
||
### <a id="disable-third-party-sharing"></a>Disable third-party sharing for specific users | ||
|
||
You can now notify Adjust when a user has exercised their right to stop sharing their data with partners for marketing purposes, but has allowed it to be shared for statistics purposes. | ||
|
||
Call the following method to instruct the Adjust SDK to communicate the user's choice to disable data sharing to the Adjust backend: | ||
|
||
```cpp | ||
Adjust2dx::disableThirdPartySharing(); | ||
``` | ||
|
||
Upon receiving this information, Adjust will block the sharing of that specific user's data to partners and the Adjust SDK will continue to work as usual. | ||
|
||
### <a id="sdk-signature"></a>SDK signature | ||
|
||
An account manager must activate the Adjust SDK signature. Contact Adjust support ([email protected]) if you are interested in using this feature. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
4.18.0 | ||
4.21.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// ADJAppStoreSubscription2dx.h | ||
// Adjust SDK | ||
// | ||
// Created by Uglješa Erceg (@uerceg) on 12th June 2020. | ||
// Copyright © 2015-2020 Adjust GmbH. All rights reserved. | ||
// | ||
|
||
#ifndef _ADJUST_ADJAPPSTORESUBSCRIPTION2DX_H_ | ||
#define _ADJUST_ADJAPPSTORESUBSCRIPTION2DX_H_ | ||
|
||
#include <iostream> | ||
|
||
class ADJAppStoreSubscription2dx { | ||
private: | ||
void* subscription; | ||
void initSubscription(std::string price, std::string currency, std::string transactionId, std::string receipt); | ||
|
||
public: | ||
ADJAppStoreSubscription2dx() {} | ||
ADJAppStoreSubscription2dx(std::string price, std::string currency, std::string transactionId, std::string receipt) { | ||
initSubscription(price, currency, transactionId, receipt); | ||
} | ||
|
||
void setTransactionDate(std::string transactionDate); | ||
void setSalesRegion(std::string salesRegion); | ||
void addCallbackParameter(std::string key, std::string value); | ||
void addPartnerParameter(std::string key, std::string value); | ||
void* getSubscription(); | ||
}; | ||
|
||
#endif /* _ADJUST_ADJAPPSTORESUBSCRIPTION2DX_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// | ||
// ADJAppStoreSubscription2dx.mm | ||
// Adjust SDK | ||
// | ||
// Created by Uglješa Erceg (@uerceg) on 12th June 2020. | ||
// Copyright © 2015-2020 Adjust GmbH. All rights reserved. | ||
// | ||
|
||
#include "ADJAppStoreSubscription2dx.h" | ||
#include <AdjustSdk/ADJSubscription.h> | ||
|
||
void ADJAppStoreSubscription2dx::initSubscription(std::string price, std::string currency, std::string transactionId, std::string receipt) { | ||
NSString *strPrice = [NSString stringWithUTF8String:price.c_str()]; | ||
NSString *strCurrency = [NSString stringWithUTF8String:currency.c_str()]; | ||
NSString *strTransactionId = [NSString stringWithUTF8String:transactionId.c_str()]; | ||
NSString *strReceipt = [NSString stringWithUTF8String:receipt.c_str()]; | ||
subscription = [[ADJSubscription alloc] initWithPrice:[NSDecimalNumber decimalNumberWithString:strPrice] | ||
currency:strCurrency | ||
transactionId:strTransactionId | ||
andReceipt:[strReceipt dataUsingEncoding:NSUTF8StringEncoding]]; | ||
} | ||
|
||
void ADJAppStoreSubscription2dx::setTransactionDate(std::string transactionDate) { | ||
NSString *strTransactionDate = [NSString stringWithUTF8String:transactionDate.c_str()]; | ||
[((ADJSubscription *)subscription) setTransactionDate:[NSDate dateWithTimeIntervalSince1970:[strTransactionDate doubleValue]]]; | ||
} | ||
|
||
void ADJAppStoreSubscription2dx::setSalesRegion(std::string salesRegion) { | ||
NSString *strSalesRegion = [NSString stringWithUTF8String:salesRegion.c_str()]; | ||
[((ADJSubscription *)subscription) setSalesRegion:strSalesRegion]; | ||
} | ||
|
||
void ADJAppStoreSubscription2dx::addCallbackParameter(std::string key, std::string value) { | ||
[((ADJSubscription *)subscription) addCallbackParameter:[NSString stringWithUTF8String:key.c_str()] | ||
value:[NSString stringWithUTF8String:value.c_str()]]; | ||
} | ||
|
||
void ADJAppStoreSubscription2dx::addPartnerParameter(std::string key, std::string value) { | ||
[((ADJSubscription *)subscription) addPartnerParameter:[NSString stringWithUTF8String:key.c_str()] | ||
value:[NSString stringWithUTF8String:value.c_str()]]; | ||
} | ||
|
||
void* ADJAppStoreSubscription2dx::getSubscription() { | ||
return subscription; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.