Skip to content

Commit 2601b97

Browse files
authored
Merge pull request #26 from adjust/v4290
Version 4.29.0
2 parents ad0f835 + 5530cc3 commit 2601b97

File tree

138 files changed

+2808
-2280
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+2808
-2280
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -219,3 +219,5 @@ plugin/android/app/src/main/jniLibs
219219

220220
test/android/.idea
221221
plugin/android/.idea
222+
plugin/ios/BuiltPlugin
223+
plugin/ios/libplugin_adjust.a

.gitmodules

+4
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@
66
path = ext/android/sdk
77
url = https://github.com/adjust/android_sdk.git
88
branch = master
9+
[submodule "dist_directory"]
10+
path = dist_directory
11+
url = https://github.com/solar2d/com.adjust-plugin.adjust.git
12+
branch = master

CHANGELOG.md

+27
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
### Version 4.29.0 (10th May 2021)
2+
#### Added
3+
- Added official support for Solar2D.
4+
- Added support for Apple Search Ads attribution with usage of `AdServices.framework`.
5+
- Added `appTrackingAuthorizationStatus` getter to `Adjust` API to be able to get current app tracking status.
6+
- Added improved measurement consent management and third party sharing system.
7+
- Added wrapper method `updateConversionValue` to `Adjust` API to allow updating `SKAdNetwork` conversion value via SDK API.
8+
- Added data residency feature. Support for EU and TR data residency region is added. To enable this feature, make sure to pass `"data-residency-eu"` or `"data-residency-tr"` as value of `urlStrategy` key when initialising Adjust SDK.
9+
- Added `setConversionValueUpdatedListener` method to `Adjust` API to allow setting of the callback which can be used to get information when Adjust SDK updates conversion value for the user.
10+
- Added possibility to pass `needsCost` key when initialising Adjust SDK 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). Subsequently added new cost data fields in attribution callback - `costType`, `costAmount` and `costCurrency`.
11+
- Added support for new ways of preinstall tracking in Android. To enable this feature, make sure to pass `preinstallTrackingEnabled = true` when initialising Adjust SDK.
12+
- Added support for setting custom preinstall file location in Android. To enable this feature, make sure to pass your custom path as value of `preinstallFilePath` key when initialising Adjust SDK.
13+
14+
#### Fixed
15+
- Fixed missing handling of `sku` parameter when performing subscription tracking in Android.
16+
17+
#### Kudos
18+
- Huge kudos to @Shchvova for amazing help in this release with adding support for Solar2D as well adding support for new features from native SDKs to Corona SDK.
19+
20+
#### Native SDKs
21+
- [[email protected]][android_sdk_v4.28.0]
22+
- [[email protected]][ios_sdk_v4.29.1]
23+
24+
---
25+
126
### Version 4.28.0 (3rd April 2021)
227
#### Changed
328
- Removed native iOS legacy code.
@@ -151,6 +176,7 @@
151176
[ios_sdk_v4.23.0]: https://github.com/adjust/ios_sdk/tree/v4.23.0
152177
[ios_sdk_v4.23.2]: https://github.com/adjust/ios_sdk/tree/v4.23.2
153178
[ios_sdk_v4.28.0]: https://github.com/adjust/ios_sdk/tree/v4.28.0
179+
[ios_sdk_v4.29.1]: https://github.com/adjust/ios_sdk/tree/v4.29.1
154180

155181
[android_sdk_v4.12.0]: https://github.com/adjust/android_sdk/tree/v4.12.0
156182
[android_sdk_v4.12.1]: https://github.com/adjust/android_sdk/tree/v4.12.1
@@ -163,3 +189,4 @@
163189
[android_sdk_v4.24.0]: https://github.com/adjust/android_sdk/tree/v4.24.0
164190
[android_sdk_v4.24.1]: https://github.com/adjust/android_sdk/tree/v4.24.1
165191
[android_sdk_v4.27.0]: https://github.com/adjust/android_sdk/tree/v4.27.0
192+
[android_sdk_v4.28.0]: https://github.com/adjust/android_sdk/tree/v4.28.0

README.md

+197-12
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
## Summary
22

3-
This is the Corona SDK of Adjust™. You can read more about Adjust™ at [adjust.com].
3+
This is the Adjust™ plugin for Solar2D (ex Corona SDK). You can read more about Adjust™ at [adjust.com].
44

55
## Table of contents
66

77
* [Example app](#example-app)
8+
* [Simulator integration](#sim-integration)
89
* [Basic integration](#basic-integration)
910
* [Get the SDK](#sdk-get)
1011
* [Add the SDK to your app](#sdk-add)
@@ -24,7 +25,10 @@ This is the Corona SDK of Adjust™. You can read more about Adjust™ at [adjus
2425
* [Additional features](#additional-features)
2526
* [AppTrackingTransparency framework](#att-framework)
2627
* [App-tracking authorisation wrapper](#ata-wrapper)
28+
* [Get current authorisation status](#ata-getter)
2729
* [SKAdNetwork framework](#skadn-framework)
30+
* [Update SKAdNetwork conversion value](#skadn-value)
31+
* [Conversion value updated callback](#skadn-cv-updated-callback)
2832
* [Event tracking](#event-tracking)
2933
* [Revenue tracking](#revenue-tracking)
3034
* [Revenue deduplication](#revenue-deduplication)
@@ -61,13 +65,40 @@ This is the Corona SDK of Adjust™. You can read more about Adjust™ at [adjus
6165
* [Deeplinking on Android](#deeplinking-android)
6266
* [Deferred deeplinking scenario](#deeplinking-deferred)
6367
* [Reattribution via deeplinks](#deeplinking-reattribution)
68+
* [Third-party sharing](#third-party-sharing)
69+
* [Disable third-party sharing](#disable-third-party-sharing)
70+
* [Enable third-party sharing](#enable-third-party-sharing)
71+
* [Measurement consent](#measurement-consent)
72+
* [[beta] Data residency](#data-residency)
6473
* [License](#license)
6574

6675

6776
## <a id="example-app"></a>Example app
6877

6978
There is example inside the [`plugin` directory][plugin]. In there in you can check how to integrate the Adjust SDK into your app.
7079

80+
## <a id="sim-integration"></a>Simulator integration
81+
82+
Easiest way to add Adjust plugin to your Simulator project is to add `build.settings` entry:
83+
84+
```lua
85+
settings =
86+
{
87+
iphone =
88+
{
89+
plist =
90+
{
91+
NSUserTrackingUsageDescription = "This would allow the app to advertise better.",
92+
},
93+
},
94+
plugins =
95+
{
96+
['plugin.adjust'] = { publisherId = 'com.adjust' },
97+
}
98+
}
99+
100+
```
101+
71102
## <a id="basic-integration"></a>Basic integration
72103

73104
These are the essential steps required to integrate the Adjust SDK into your Corona app project.
@@ -85,8 +116,8 @@ You can now add the Adjust SDK to your Corona Enterprise app project. The Adjust
85116
Inside your Android Studio app project, create a `libs` folder inside of your app folder and add the `plugin.adjust.jar` file to it. After that, please update your app's `build.gradle` file and add the following lines to your `dependencies` section:
86117

87118
```
88-
compile 'com.adjust.sdk:adjust-android:4.13.0'
89-
compile 'com.android.installreferrer:installreferrer:1.0'
119+
compile 'com.adjust.sdk:adjust-android:4.28.0'
120+
compile 'com.android.installreferrer:installreferrer:2.2'
90121
```
91122

92123
#### <a id="sdk-add-ios"></a>Add the SDK to your iOS project
@@ -196,7 +227,7 @@ In order to correctly attribute an install of your Android app to its source, Ad
196227
In order to support this in your app, please make sure that you have followed the [Add the SDK to your Android project](#sdk-add-android) chapter properly and that you have following line added to your `build.gradle` file:
197228

198229
```
199-
compile 'com.android.installreferrer:installreferrer:1.0'
230+
compile 'com.android.installreferrer:installreferrer:2.2'
200231
```
201232

202233
Also, make sure that you have paid attention to the [Proguard settings](#android-proguard) chapter and that you have added all the rules mentioned in it, especially the one needed for this feature:
@@ -233,11 +264,11 @@ As of v4.23.0, the Adjust SDK supports install tracking on Huawei devices with H
233264

234265
You can add following iOS frameworks to your generated Xcode project to take advantage of additional features:
235266

236-
* `iAd.framework` - in case you are running iAd campaigns
237-
* `AdSupport.framework` - for reading iOS Advertising Id (IDFA)
238-
* `CoreTelephony.framework` - for reading MCC and MNC information
239-
* `StoreKit.framework` - for communication with SKAdNetwork framework
240-
* `AppTrackingTransparency.framework` - to ask for user's consent to be tracked and obtain status of that consent
267+
* `iAd.framework` - needed for Apple Search Ads tracking
268+
* `AdServices.framework` - needed for Apple Search Ads tracking
269+
* `AdSupport.framework` - needed for reading iOS Advertising Id (IDFA)
270+
* `StoreKit.framework` - needed for communication with `SKAdNetwork` framework
271+
* `AppTrackingTransparency.framework` - needed to ask for user's consent to be tracked and obtain status of that consent
241272

242273
## <a id="additional-features"></a>Additional features
243274

@@ -286,6 +317,30 @@ adjust.requestTrackingAuthorizationWithCompletionHandler(function(event)
286317
end)
287318
```
288319

320+
### <a id="ad-ata-getter"></a>Get current authorisation status
321+
322+
**Note**: This feature exists only in iOS platform.
323+
324+
To get the current app tracking authorization status you can call `appTrackingAuthorizationStatus` method of `Adjust` API that will return one of the following possibilities:
325+
326+
* `0`: The user hasn't been asked yet
327+
* `1`: The user device is restricted
328+
* `2`: The user denied access to IDFA
329+
* `3`: The user authorized access to IDFA
330+
* `-1`: The status is not available
331+
332+
To use this wrapper, you can call it as such:
333+
334+
```lua
335+
local status = adjust.appTrackingAuthorizationStatus()
336+
print("[Adjust]: Authorization status = " .. status)
337+
if status == "0" then print("[Adjust]: ATTrackingManagerAuthorizationStatusNotDetermined")
338+
elseif status == "1" then print("[Adjust]: ATTrackingManagerAuthorizationStatusRestricted")
339+
elseif status == "2" then print("[Adjust]: ATTrackingManagerAuthorizationStatusDenied")
340+
elseif status == "3" then print("[Adjust]: ATTrackingManagerAuthorizationStatusAuthorized")
341+
end
342+
```
343+
289344
### <a id="skadn-framework"></a>SKAdNetwork framework
290345

291346
**Note**: This feature exists only in iOS platform.
@@ -305,6 +360,38 @@ adjust.create({
305360
})
306361
```
307362

363+
### <a id="skadn-value"></a>Update SKAdNetwork conversion value
364+
365+
**Note**: This feature exists only in iOS platform.
366+
367+
You can use Adjust SDK wrapper method `updateConversionValue` to update SKAdNetwork conversion value for your user:
368+
369+
```lua
370+
adjust.updateConversionValue(6)
371+
```
372+
373+
### <a id="skadn-cv-updated-callback"></a>Conversion value updated callback
374+
375+
You can register callback to get notified each time when Adjust SDK updates conversion value for the user.
376+
377+
```lua
378+
local function conversionValueUpdatedListener(event)
379+
print("[Adjust]: Update conversion value: " .. event.message)
380+
end
381+
382+
-- ...
383+
384+
adjust.setConversionValueUpdatedListener(conversionValueUpdatedListener)
385+
386+
-- ...
387+
388+
adjust.create({
389+
appToken = "{YourAppToken}",
390+
environment = "SANDBOX",
391+
logLevel = "VERBOSE",
392+
})
393+
```
394+
308395
### <a id="event-tracking"></a>Event tracking
309396

310397
You can use Adjust to track all kinds of events. Let's say you want to track every tap on a button. If you 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:
@@ -639,6 +726,22 @@ In this case, the Adjust SDK not send the initial install session and any events
639726

640727
**The maximum start time delay of the Adjust SDK is 10 seconds**.
641728

729+
### <a id="needs-cost"></a>Needs cost
730+
731+
To receive cost in attribution data you need to request it explicitly in `create` call
732+
```lua
733+
local adjust = require "plugin.adjust"
734+
735+
adjust.create({
736+
appToken = "{YourAppToken}",
737+
environment = "SANDBOX",
738+
logLevel = "VERBOSE",
739+
needsCost = true
740+
})
741+
```
742+
743+
If it is set to `true`, fields `costType`, `costAmount` and `costCurrency` would be set in the [attribution callback](#attribution-callback) event.
744+
642745
### <a id="attribution-callback"></a>Attribution callback
643746

644747
You can register a listener to be notified of tracker attribution changes. Due to the different sources considered for attribution, this information cannot be provided synchronously. The simplest way to achieve this is to create a single anonymous listener which is going to be called **each time a user's attribution value changes**. Use the `setAttributionListener` method of the `adjust` instance to set the listener before starting the SDK:
@@ -658,6 +761,9 @@ local function attributionListener(event)
658761
print("Adgroup: " .. json_attribution.adgroup)
659762
print("Click label: " .. json_attribution.clickLabel)
660763
print("ADID: " .. json_attribution.adid)
764+
print("Cost Type: " .. json_attribution.costType)
765+
print("Cost Amount: " .. json_attribution.costAmount)
766+
print("Cost Currency: " .. json_attribution.costCurrency)
661767
end
662768

663769
-- ...
@@ -669,7 +775,9 @@ adjust.setAttributionListener(attributionListener)
669775
adjust.create({
670776
appToken = "{YourAppToken}",
671777
environment = "SANDBOX",
672-
logLevel = "VERBOSE"
778+
logLevel = "VERBOSE",
779+
-- in case you want to get cost data in attribution callback
780+
-- needsCost = true,
673781
})
674782
```
675783

@@ -683,6 +791,10 @@ Within the listener function you have access to the `attribution` parameters. He
683791
- `creative` the creative grouping level of the current attribution
684792
- `clickLabel` the click label of the current attribution
685793
- `adid` the Adjust device identifier
794+
- `costType` the cost type, use `needsCost` to request this value
795+
- `costAmount` the price, use `needsCost` to request this value
796+
- `costCurrency` the currency used, use `needsCost` to request this value
797+
686798

687799
Please make sure to consider our [applicable attribution data policies][attribution-data].
688800

@@ -877,7 +989,6 @@ adjust.create({
877989
})
878990
```
879991

880-
881992
### <a id="gdpr-forget-me"></a>GDPR right to be forgotten
882993

883994
In accordance with article 17 of the EU's General Data Protection Regulation (GDPR), you can notify Adjust when a user has exercised their right to be forgotten. Calling the following method will instruct the Adjust SDK to communicate the user's choice to be forgotten to the Adjust backend:
@@ -1203,11 +1314,85 @@ end
12031314

12041315
Having added these calls, if the deeplink that opened your app contains any reattribution parameters, our SDK will pass that information to the backend, which will decide whether the user is going to be reattributed or not. As already mentioned, if a user gets reattributed, an attribution callback (if implemented) will be triggered with the new attribution value, and you will have this information in your app, as well.
12051316

1317+
## <a id="third-party-sharing"></a>Third-party sharing for specific users
1318+
1319+
You can notify Adjust when a user disables, enables, and re-enables data sharing with third-party partners.
1320+
1321+
### <a id="disable-third-party-sharing"></a>Disable third-party sharing for specific users
1322+
1323+
Call the following method to instruct the Adjust SDK to communicate the user's choice to disable data sharing to the Adjust backend:
1324+
1325+
```lua
1326+
adjust.trackThirdPartySharing({
1327+
enabled = false,
1328+
})
1329+
```
1330+
1331+
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.
1332+
1333+
### <a id="enable-third-party-sharing">Enable or re-enable third-party sharing for specific users</a>
1334+
1335+
Call the following method to instruct the Adjust SDK to communicate the user's choice to share data or change data sharing, to the Adjust backend:
1336+
1337+
```lua
1338+
adjust.trackThirdPartySharing({
1339+
enabled = true,
1340+
})
1341+
```
1342+
1343+
Upon receiving this information, Adjust changes sharing the specific user's data to partners. The Adjust SDK will continue to work as expected.
1344+
1345+
Call the following method to instruct the Adjust SDK to send the granular options to the Adjust backend:
1346+
1347+
```csharp
1348+
adjust.trackThirdPartySharing({
1349+
granularOptions = {
1350+
{
1351+
partnerName = "PartnerA",
1352+
key = "foo",
1353+
value = "bar",
1354+
},
1355+
},
1356+
})
1357+
```
1358+
1359+
### <a id="measurement-consent"></a>Consent measurement for specific users
1360+
1361+
You can notify Adjust when a user exercises their right to change data sharing with partners for marketing purposes, but they allow data sharing for statistical purposes.
1362+
1363+
Call the following method to instruct the Adjust SDK to communicate the user's choice to change data sharing, to the Adjust backend:
1364+
1365+
```lua
1366+
adjust.trackMeasurementConsent(true);
1367+
```
1368+
1369+
Upon receiving this information, Adjust changes sharing the specific user's data to partners. The Adjust SDK will continue to work as expected.
1370+
1371+
### <a id="data-residency"></a>[beta] Data residency
1372+
1373+
In order to enable data residency feature, make sure to set `urlStrategy` parameter when initialising Adjust SDK with one of the following constants:
1374+
1375+
```lua
1376+
local adjust = require "plugin.adjust"
1377+
1378+
adjust.create({
1379+
appToken = "{YourAppToken}",
1380+
environment = "SANDBOX",
1381+
logLevel = "VERBOSE",
1382+
-- for EU data region
1383+
urlStrategy = "data-residency-eu"
1384+
-- or TR data region
1385+
-- urlStrategy = "data-residency-tr"
1386+
})
1387+
```
1388+
1389+
**Note:** This feature is currently in beta testing phase. If you are interested in getting access to it, please contact your dedicated account manager or write an email to [email protected]. Please, do not turn this setting on before making sure with the support team that this feature is enabled for your app because otherwise SDK traffic will get dropped.
1390+
12061391
## <a id="license"></a>License
12071392

12081393
The Adjust SDK is licensed under the MIT License.
12091394

1210-
Copyright (c) 2012-2019 Adjust GmbH, http://www.adjust.com
1395+
Copyright (c) 2012-2021 Adjust GmbH, http://www.adjust.com
12111396

12121397
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
12131398

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.28.0
1+
4.29.0

dist/libplugin_adjust.a

-37.3 KB
Binary file not shown.

dist/plugin.adjust.jar

3.49 KB
Binary file not shown.

dist_directory

Submodule dist_directory added at 9530ad4

ext/android/sdk

Submodule sdk updated 35 files

ext/ios/sdk

Submodule sdk updated 73 files

0 commit comments

Comments
 (0)