diff --git a/.github/styles/Microsoft/HeadingAcronyms.yml b/.github/styles/Microsoft/HeadingAcronyms.yml index b101560bb..155da1e8f 100644 --- a/.github/styles/Microsoft/HeadingAcronyms.yml +++ b/.github/styles/Microsoft/HeadingAcronyms.yml @@ -18,3 +18,5 @@ exceptions: - CSV - ATT - CDN + - MSA + - HMS diff --git a/.vscode/markdown.code-snippets b/.vscode/markdown.code-snippets index 1a901281e..ec9bebbd4 100644 --- a/.vscode/markdown.code-snippets +++ b/.vscode/markdown.code-snippets @@ -111,5 +111,10 @@ "", "" ] + }, + "Abbreviation": { + "prefix": "abbreviation", + "description": "Insert an abbreviation", + "body": "${0:$TM_SELECTED_TEXT}" } } diff --git a/src/content/docs/code-snippets/unity/Adjust/_addSessionCallbackParameter.mdx b/src/content/docs/code-snippets/unity/Adjust/_addSessionCallbackParameter.mdx new file mode 100644 index 000000000..4ce7ba47a --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_addSessionCallbackParameter.mdx @@ -0,0 +1,3 @@ +```c# +Adjust.addSessionCallbackParameter("key", "value"); +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_addSessionPartnerParameter.mdx b/src/content/docs/code-snippets/unity/Adjust/_addSessionPartnerParameter.mdx new file mode 100644 index 000000000..a2429c90f --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_addSessionPartnerParameter.mdx @@ -0,0 +1,3 @@ +```c# +Adjust.addSessionPartnerParameter("key", "value"); +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_appTrackingAuthorizationStatus.mdx b/src/content/docs/code-snippets/unity/Adjust/_appTrackingAuthorizationStatus.mdx new file mode 100644 index 000000000..17109d13c --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_appTrackingAuthorizationStatus.mdx @@ -0,0 +1,3 @@ +```c# +Adjust.getAppTrackingAuthorizationStatus(); +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_checkForNewAttStatus.mdx b/src/content/docs/code-snippets/unity/Adjust/_checkForNewAttStatus.mdx new file mode 100644 index 000000000..91e555d44 --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_checkForNewAttStatus.mdx @@ -0,0 +1,3 @@ +```c# +Adjust.checkForNewAttStatus(); +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_disableThirdPartySharing.mdx b/src/content/docs/code-snippets/unity/Adjust/_disableThirdPartySharing.mdx new file mode 100644 index 000000000..ee96b8406 --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_disableThirdPartySharing.mdx @@ -0,0 +1,3 @@ +```c# +Adjust.disableThirdPartySharing(); +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_gdprForgetMe.mdx b/src/content/docs/code-snippets/unity/Adjust/_gdprForgetMe.mdx new file mode 100644 index 000000000..0c723e6bd --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_gdprForgetMe.mdx @@ -0,0 +1,3 @@ +```c# +Adjust.gdprForgetMe(); +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_getAdid.mdx b/src/content/docs/code-snippets/unity/Adjust/_getAdid.mdx new file mode 100644 index 000000000..624125dc1 --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_getAdid.mdx @@ -0,0 +1,3 @@ +```c# +string adid = Adjust.getAdid(); +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_getAmazonAdId.mdx b/src/content/docs/code-snippets/unity/Adjust/_getAmazonAdId.mdx new file mode 100644 index 000000000..b473ec7b9 --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_getAmazonAdId.mdx @@ -0,0 +1,3 @@ +```c# +string amazonAdId = Adjust.getAmazonAdId(); +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_getAttribution.mdx b/src/content/docs/code-snippets/unity/Adjust/_getAttribution.mdx new file mode 100644 index 000000000..14892335c --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_getAttribution.mdx @@ -0,0 +1,3 @@ +```c# +var attribution = Adjust.getAttribution(); +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_getGoogleAdId.mdx b/src/content/docs/code-snippets/unity/Adjust/_getGoogleAdId.mdx new file mode 100644 index 000000000..b5c5e34a5 --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_getGoogleAdId.mdx @@ -0,0 +1,5 @@ +```c# +Adjust.getGoogleAdId((string googleAdId) => { + //... +}}; +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_getIdfa.mdx b/src/content/docs/code-snippets/unity/Adjust/_getIdfa.mdx new file mode 100644 index 000000000..c52dcb653 --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_getIdfa.mdx @@ -0,0 +1,3 @@ +```c# +string idfa = Adjust.getIdfa(); +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_isEnabled.mdx b/src/content/docs/code-snippets/unity/Adjust/_isEnabled.mdx new file mode 100644 index 000000000..d3ac69d25 --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_isEnabled.mdx @@ -0,0 +1,3 @@ +```c# +Adjust.isEnabled(); +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_removeSessionCallbackParameter.mdx b/src/content/docs/code-snippets/unity/Adjust/_removeSessionCallbackParameter.mdx new file mode 100644 index 000000000..a0792de77 --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_removeSessionCallbackParameter.mdx @@ -0,0 +1,3 @@ +```c# +Adjust.removeSessionCallbackParameter("key"); +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_removeSessionPartnerParameter.mdx b/src/content/docs/code-snippets/unity/Adjust/_removeSessionPartnerParameter.mdx new file mode 100644 index 000000000..bef1bca16 --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_removeSessionPartnerParameter.mdx @@ -0,0 +1,3 @@ +```c# +Adjust.removeSessionPartnerParameter("key"); +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_requestTrackingAuthorization.mdx b/src/content/docs/code-snippets/unity/Adjust/_requestTrackingAuthorization.mdx new file mode 100644 index 000000000..6a62ecea0 --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_requestTrackingAuthorization.mdx @@ -0,0 +1,20 @@ +```c# +Adjust.requestTrackingAuthorizationWithCompletionHandler((status) => +{ + switch (status) + { + case 0: + // ATTrackingManagerAuthorizationStatusNotDetermined case + break; + case 1: + // ATTrackingManagerAuthorizationStatusRestricted case + break; + case 2: + // ATTrackingManagerAuthorizationStatusDenied case + break; + case 3: + // ATTrackingManagerAuthorizationStatusAuthorized case + break; + } +}); +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_resetSessionCallbackParameters.mdx b/src/content/docs/code-snippets/unity/Adjust/_resetSessionCallbackParameters.mdx new file mode 100644 index 000000000..4a8d95126 --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_resetSessionCallbackParameters.mdx @@ -0,0 +1,3 @@ +```c# +Adjust.resetSessionCallbackParameters(); +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_resetSessionPartnerParameters.mdx b/src/content/docs/code-snippets/unity/Adjust/_resetSessionPartnerParameters.mdx new file mode 100644 index 000000000..4730c5bd4 --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_resetSessionPartnerParameters.mdx @@ -0,0 +1,3 @@ +```c# +Adjust.resetSessionPartnerParameters(); +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_sendFirstPackages.mdx b/src/content/docs/code-snippets/unity/Adjust/_sendFirstPackages.mdx new file mode 100644 index 000000000..4ffeefa9e --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_sendFirstPackages.mdx @@ -0,0 +1,3 @@ +```c# +Adjust.sendFirstPackages(); +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_setDeviceToken.mdx b/src/content/docs/code-snippets/unity/Adjust/_setDeviceToken.mdx new file mode 100644 index 000000000..ec733f447 --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_setDeviceToken.mdx @@ -0,0 +1,3 @@ +```c# +Adjust.setDeviceToken("{YourDeviceToken}"); +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_setEnabled.mdx b/src/content/docs/code-snippets/unity/Adjust/_setEnabled.mdx new file mode 100644 index 000000000..ca7d5e0f1 --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_setEnabled.mdx @@ -0,0 +1,3 @@ +```c# +Adjust.setEnabled(false); +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_setOfflineMode.mdx b/src/content/docs/code-snippets/unity/Adjust/_setOfflineMode.mdx new file mode 100644 index 000000000..4df413eca --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_setOfflineMode.mdx @@ -0,0 +1,3 @@ +```c# +Adjust.setOfflineMode(true); +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_trackAdRevenue.mdx b/src/content/docs/code-snippets/unity/Adjust/_trackAdRevenue.mdx new file mode 100644 index 000000000..ae0af9ac8 --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_trackAdRevenue.mdx @@ -0,0 +1,5 @@ +```c# +AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue("source"); +//... +Adjust.trackAdRevenue(adjustAdRevenue); +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_trackAppStoreSubscription.mdx b/src/content/docs/code-snippets/unity/Adjust/_trackAppStoreSubscription.mdx new file mode 100644 index 000000000..1175ca54b --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_trackAppStoreSubscription.mdx @@ -0,0 +1,15 @@ +```c# +AdjustAppStoreSubscription subscription = new AdjustAppStoreSubscription( + price, + currency, + transactionId, + receipt); +subscription.setTransactionDate(transactionDate); +subscription.setSalesRegion(salesRegion); +subscription.addCallbackParameter("key1", "value1"); +subscription.addCallbackParameter("key2", "value2"); +subscription.addPartnerParameter("key1", "value1"); +subscription.addPartnerParameter("key2", "value2"); + +Adjust.trackAppStoreSubscription(subscription); +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_trackEvent.mdx b/src/content/docs/code-snippets/unity/Adjust/_trackEvent.mdx new file mode 100644 index 000000000..a1536d606 --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_trackEvent.mdx @@ -0,0 +1,5 @@ +```c# +AdjustEvent adjustEvent = new AdjustEvent("abc123"); +//... +Adjust.trackEvent(adjustEvent); +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_trackMeasurementConsent.mdx b/src/content/docs/code-snippets/unity/Adjust/_trackMeasurementConsent.mdx new file mode 100644 index 000000000..f7721986e --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_trackMeasurementConsent.mdx @@ -0,0 +1,3 @@ +```c# +Adjust.trackMeasurementConsent(true); +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_trackPlayStoreSubscription.mdx b/src/content/docs/code-snippets/unity/Adjust/_trackPlayStoreSubscription.mdx new file mode 100644 index 000000000..742759020 --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_trackPlayStoreSubscription.mdx @@ -0,0 +1,16 @@ +```c# +AdjustPlayStoreSubscription subscription = new AdjustPlayStoreSubscription( + price, + currency, + sku, + orderId, + signature, + purchaseToken); +subscription.setPurchaseTime(purchaseTime); +subscription.addCallbackParameter("key1", "value1"); +subscription.addCallbackParameter("key2", "value2"); +subscription.addPartnerParameter("key1", "value1"); +subscription.addPartnerParameter("key2", "value2"); + +Adjust.trackPlayStoreSubscription(subscription); +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_trackThirdPartySharing.mdx b/src/content/docs/code-snippets/unity/Adjust/_trackThirdPartySharing.mdx new file mode 100644 index 000000000..715e4b6bc --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_trackThirdPartySharing.mdx @@ -0,0 +1,5 @@ +```c# +AdjustThirdPartySharing adjustThirdPartySharing = new AdjustThirdPartySharing(true); +//... +Adjust.trackThirdPartySharing(adjustThirdPartySharing); +``` diff --git a/src/content/docs/code-snippets/unity/Adjust/_updateConversionValue.mdx b/src/content/docs/code-snippets/unity/Adjust/_updateConversionValue.mdx new file mode 100644 index 000000000..f74862d03 --- /dev/null +++ b/src/content/docs/code-snippets/unity/Adjust/_updateConversionValue.mdx @@ -0,0 +1,3 @@ +```c# +Adjust.updateConversionValue(6); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustAdRevenue/_addCallbackParameter.mdx b/src/content/docs/code-snippets/unity/AdjustAdRevenue/_addCallbackParameter.mdx new file mode 100644 index 000000000..5c18215ec --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustAdRevenue/_addCallbackParameter.mdx @@ -0,0 +1,7 @@ +```c# +AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue("source"); +//... +adjustAdRevenue.addCallbackParameter("key", "value"); +//... +Adjust.trackAdRevenue(adjustAdRevenue); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustAdRevenue/_addPartnerParameter.mdx b/src/content/docs/code-snippets/unity/AdjustAdRevenue/_addPartnerParameter.mdx new file mode 100644 index 000000000..fe7fe1736 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustAdRevenue/_addPartnerParameter.mdx @@ -0,0 +1,7 @@ +```c# +AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue("source"); +//... +adjustAdRevenue.addPartnerParameter("key", "value"); +//... +Adjust.trackAdRevenue(adjustAdRevenue); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustAdRevenue/_constructor.mdx b/src/content/docs/code-snippets/unity/AdjustAdRevenue/_constructor.mdx new file mode 100644 index 000000000..472becf77 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustAdRevenue/_constructor.mdx @@ -0,0 +1,4 @@ +```c# +AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue("source"); +Adjust.trackAdRevenue(adjustAdRevenue); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustAdRevenue/_setAdImpressionsCount.mdx b/src/content/docs/code-snippets/unity/AdjustAdRevenue/_setAdImpressionsCount.mdx new file mode 100644 index 000000000..d23154e33 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustAdRevenue/_setAdImpressionsCount.mdx @@ -0,0 +1,7 @@ +```c# +AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue("source"); +//... +adjustAdRevenue.setAdImpressionsCount(10); +//... +Adjust.trackAdRevenue(adjustAdRevenue); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustAdRevenue/_setAdRevenueNetwork.mdx b/src/content/docs/code-snippets/unity/AdjustAdRevenue/_setAdRevenueNetwork.mdx new file mode 100644 index 000000000..8993672a4 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustAdRevenue/_setAdRevenueNetwork.mdx @@ -0,0 +1,7 @@ +```c# +AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue("source"); +//... +adjustAdRevenue.setAdRevenueNetwork("network1"); +//... +Adjust.trackAdRevenue(adjustAdRevenue); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustAdRevenue/_setAdRevenuePlacement.mdx b/src/content/docs/code-snippets/unity/AdjustAdRevenue/_setAdRevenuePlacement.mdx new file mode 100644 index 000000000..b6cf49523 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustAdRevenue/_setAdRevenuePlacement.mdx @@ -0,0 +1,7 @@ +```c# +AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue("source"); +//... +adjustAdRevenue.setAdRevenuePlacement("banner"); +//... +Adjust.trackAdRevenue(adjustAdRevenue); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustAdRevenue/_setAdRevenueUnit.mdx b/src/content/docs/code-snippets/unity/AdjustAdRevenue/_setAdRevenueUnit.mdx new file mode 100644 index 000000000..487187f93 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustAdRevenue/_setAdRevenueUnit.mdx @@ -0,0 +1,7 @@ +```c# +AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue("source"); +//... +adjustAdRevenue.setAdRevenueUnit("unit1"); +//... +Adjust.trackAdRevenue(adjustAdRevenue); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustAdRevenue/_setRevenue.mdx b/src/content/docs/code-snippets/unity/AdjustAdRevenue/_setRevenue.mdx new file mode 100644 index 000000000..b0a7508f7 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustAdRevenue/_setRevenue.mdx @@ -0,0 +1,7 @@ +```c# +AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue("source"); +//... +adjustAdRevenue.setRevenue(1.00, "EUR"); +//... +Adjust.trackAdRevenue(adjustAdRevenue); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustAdRevenue/signatures/_addPartnerParameter.mdx b/src/content/docs/code-snippets/unity/AdjustAdRevenue/signatures/_addPartnerParameter.mdx new file mode 100644 index 000000000..58683516d --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustAdRevenue/signatures/_addPartnerParameter.mdx @@ -0,0 +1,11 @@ +```c# +public void addPartnerParameter(string key, string value) +{ + if (partnerList == null) + { + partnerList = new List(); + } + partnerList.Add(key); + partnerList.Add(value); +} +``` diff --git a/src/content/docs/code-snippets/unity/AdjustAppStoreSubscription/_addCallbackParameter.mdx b/src/content/docs/code-snippets/unity/AdjustAppStoreSubscription/_addCallbackParameter.mdx new file mode 100644 index 000000000..7ae40b07f --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustAppStoreSubscription/_addCallbackParameter.mdx @@ -0,0 +1,10 @@ +```c# +AdjustAppStoreSubscription subscription = new AdjustAppStoreSubscription( + price, + currency, + transactionId, + receipt); +//... +subscription.addCallbackParameter("key1", "value1"); +subscription.addCallbackParameter("key2", "value2"); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustAppStoreSubscription/_addPartnerParameter.mdx b/src/content/docs/code-snippets/unity/AdjustAppStoreSubscription/_addPartnerParameter.mdx new file mode 100644 index 000000000..a917120cb --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustAppStoreSubscription/_addPartnerParameter.mdx @@ -0,0 +1,10 @@ +```c# +AdjustAppStoreSubscription subscription = new AdjustAppStoreSubscription( + price, + currency, + transactionId, + receipt); +//... +subscription.addPartnerParameter("key1", "value1"); +subscription.addPartnerParameter("key2", "value2"); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustAppStoreSubscription/_adjustAppStoreSubscription.mdx b/src/content/docs/code-snippets/unity/AdjustAppStoreSubscription/_adjustAppStoreSubscription.mdx new file mode 100644 index 000000000..2d6042969 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustAppStoreSubscription/_adjustAppStoreSubscription.mdx @@ -0,0 +1,7 @@ +```c# +AdjustAppStoreSubscription subscription = new AdjustAppStoreSubscription( + price, + currency, + transactionId, + receipt); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustAppStoreSubscription/_setSalesRegion.mdx b/src/content/docs/code-snippets/unity/AdjustAppStoreSubscription/_setSalesRegion.mdx new file mode 100644 index 000000000..83ec3a28e --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustAppStoreSubscription/_setSalesRegion.mdx @@ -0,0 +1,9 @@ +```c# +AdjustAppStoreSubscription subscription = new AdjustAppStoreSubscription( + price, + currency, + transactionId, + receipt); +//... +subscription.setSalesRegion(salesRegion); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustAppStoreSubscription/_setTransactionDate.mdx b/src/content/docs/code-snippets/unity/AdjustAppStoreSubscription/_setTransactionDate.mdx new file mode 100644 index 000000000..155514f2a --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustAppStoreSubscription/_setTransactionDate.mdx @@ -0,0 +1,9 @@ +```c# +AdjustAppStoreSubscription subscription = new AdjustAppStoreSubscription( + price, + currency, + transactionId, + receipt); +//... +subscription.setTransactionDate(transactionDate); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustConfig/_constructor.mdx b/src/content/docs/code-snippets/unity/AdjustConfig/_constructor.mdx new file mode 100644 index 000000000..b91a6aa14 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustConfig/_constructor.mdx @@ -0,0 +1,5 @@ +```c# +AdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox); +// ... +Adjust.start(adjustConfig); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustConfig/_deactivateSKAdNetworkHandling.mdx b/src/content/docs/code-snippets/unity/AdjustConfig/_deactivateSKAdNetworkHandling.mdx new file mode 100644 index 000000000..f776f1ba5 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustConfig/_deactivateSKAdNetworkHandling.mdx @@ -0,0 +1,7 @@ +```c# +AdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox, true); +//... +adjustConfig.deactivateSKAdNetworkHandling(); +//... +Adjust.start(adjustConfig); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustConfig/_sendInBackground.mdx b/src/content/docs/code-snippets/unity/AdjustConfig/_sendInBackground.mdx new file mode 100644 index 000000000..fddcb32bc --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustConfig/_sendInBackground.mdx @@ -0,0 +1,7 @@ +```c# +AdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox); +//... +adjustConfig.setSendInBackground(true); +//... +Adjust.start(adjustConfig); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustConfig/_setAttributionChangedDelegate.mdx b/src/content/docs/code-snippets/unity/AdjustConfig/_setAttributionChangedDelegate.mdx new file mode 100644 index 000000000..23d873ec7 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustConfig/_setAttributionChangedDelegate.mdx @@ -0,0 +1,19 @@ +```c# {8, 13-16} +using com.adjust.sdk; + +public class ExampleGUI : MonoBehaviour { + void OnGUI() { + if (GUI.Button(new Rect(0, 0, Screen.width, Screen.height), "callback")) { + AdjustConfig adjustConfig = new AdjustConfig("{Your App Token}", AdjustEnvironmentSandbox); + adjustConfig.setLogLevel(AdjustLogLevel.Verbose); + adjustConfig.setAttributionChangedDelegate(this.attributionChangedDelegate); + Adjust.start(adjustConfig); + } + } + + public void attributionChangedDelegate(AdjustAttribution attribution) { + Debug.Log("Attribution changed"); + // ... + } +} +``` diff --git a/src/content/docs/code-snippets/unity/AdjustConfig/_setConversionValueUpdatedDelegate.mdx b/src/content/docs/code-snippets/unity/AdjustConfig/_setConversionValueUpdatedDelegate.mdx new file mode 100644 index 000000000..162e003bc --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustConfig/_setConversionValueUpdatedDelegate.mdx @@ -0,0 +1,7 @@ +```c# +AdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox, true); +//... +adjustConfig.setConversionValueUpdatedDelegate(ConversionValueUpdatedCallback); +//... +Adjust.start(adjustConfig); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustConfig/_setCoppaCompliantEnabled.mdx b/src/content/docs/code-snippets/unity/AdjustConfig/_setCoppaCompliantEnabled.mdx new file mode 100644 index 000000000..e80c043a8 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustConfig/_setCoppaCompliantEnabled.mdx @@ -0,0 +1,5 @@ +```c# +AdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox); +adjustConfig.setCoppaCompliantEnabled(true); +Adjust.start(adjustConfig); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustConfig/_setDefaultTracker.mdx b/src/content/docs/code-snippets/unity/AdjustConfig/_setDefaultTracker.mdx new file mode 100644 index 000000000..1e1ada7c5 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustConfig/_setDefaultTracker.mdx @@ -0,0 +1,7 @@ +```c# +AdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox); +//... +adjustConfig.setDefaultTracker("{TrackerToken}"); +//... +Adjust.start(adjustConfig); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustConfig/_setDelayStart.mdx b/src/content/docs/code-snippets/unity/AdjustConfig/_setDelayStart.mdx new file mode 100644 index 000000000..81f803e01 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustConfig/_setDelayStart.mdx @@ -0,0 +1,7 @@ +```c# +AdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox); +//... +adjustConfig.setDelayStart(5.5); +//... +Adjust.start(adjustConfig); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustConfig/_setEventBufferingEnabled.mdx b/src/content/docs/code-snippets/unity/AdjustConfig/_setEventBufferingEnabled.mdx new file mode 100644 index 000000000..099ea87fd --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustConfig/_setEventBufferingEnabled.mdx @@ -0,0 +1,7 @@ +```c# +AdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox); +//... +adjustConfig.setEventBufferingEnabled(true); +//... +Adjust.start(adjustConfig); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustConfig/_setEventFailureDelegate.mdx b/src/content/docs/code-snippets/unity/AdjustConfig/_setEventFailureDelegate.mdx new file mode 100644 index 000000000..14a26068f --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustConfig/_setEventFailureDelegate.mdx @@ -0,0 +1,11 @@ +```c# {3, 7-9} +AdjustConfig adjustConfig = new AdjustConfig("{Your App Token}", AdjustEnvironment.Sandbox); +adjustConfig.setLogLevel(AdjustLogLevel.Verbose); +adjustConfig.setEventFailureDelegate(EventFailureCallback); +//... +Adjust.start(adjustConfig); +//... +public void EventFailureCallback(AdjustEventFailure eventFailureData) { + //... +} +``` diff --git a/src/content/docs/code-snippets/unity/AdjustConfig/_setEventSuccessDelegate.mdx b/src/content/docs/code-snippets/unity/AdjustConfig/_setEventSuccessDelegate.mdx new file mode 100644 index 000000000..2a79b334a --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustConfig/_setEventSuccessDelegate.mdx @@ -0,0 +1,11 @@ +```c# {3, 7-9} +AdjustConfig adjustConfig = new AdjustConfig("{Your App Token}", AdjustEnvironment.Sandbox); +adjustConfig.setLogLevel(AdjustLogLevel.Verbose); +adjustConfig.setEventSuccessDelegate(EventSuccessCallback); +//... +Adjust.start(adjustConfig); +//... +public void EventSuccessCallback(AdjustEventSuccess eventSuccessData) { + //... +} +``` diff --git a/src/content/docs/code-snippets/unity/AdjustConfig/_setExternalDeviceId.mdx b/src/content/docs/code-snippets/unity/AdjustConfig/_setExternalDeviceId.mdx new file mode 100644 index 000000000..a80c99128 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustConfig/_setExternalDeviceId.mdx @@ -0,0 +1,7 @@ +```c# +AdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox, true); +//... +adjustConfig.setExternalDeviceId("{Your-External-Device-Id}"); +//... +Adjust.start(adjustConfig); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustConfig/_setLaunchDeferredDeeplink.mdx b/src/content/docs/code-snippets/unity/AdjustConfig/_setLaunchDeferredDeeplink.mdx new file mode 100644 index 000000000..da78d60ef --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustConfig/_setLaunchDeferredDeeplink.mdx @@ -0,0 +1,7 @@ +```c# +AdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox); +//... +adjustConfig.setLaunchDeferredDeeplink(true); +//... +Adjust.start(adjustConfig); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustConfig/_setLinkMeEnabled.mdx b/src/content/docs/code-snippets/unity/AdjustConfig/_setLinkMeEnabled.mdx new file mode 100644 index 000000000..2b7f86158 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustConfig/_setLinkMeEnabled.mdx @@ -0,0 +1,7 @@ +```c# +AdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox, true); +//... +adjustConfig.setLinkMeEnabled(true); +//... +Adjust.start(adjustConfig); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustConfig/_setLogDelegate.mdx b/src/content/docs/code-snippets/unity/AdjustConfig/_setLogDelegate.mdx new file mode 100644 index 000000000..e8dfb2c2f --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustConfig/_setLogDelegate.mdx @@ -0,0 +1,7 @@ +```c# +AdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox, true); +//... +adjustConfig.setLogDelegate(msg => Debug.Log(msg)); +//... +Adjust.start(adjustConfig); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustConfig/_setLogLevel.mdx b/src/content/docs/code-snippets/unity/AdjustConfig/_setLogLevel.mdx new file mode 100644 index 000000000..0a4dcdbdb --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustConfig/_setLogLevel.mdx @@ -0,0 +1,7 @@ +```c# +AdjustConfig config = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox, true); +//... +config.setLogLevel(AdjustLogLevel.Error); +//... +Adjust.start(config); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustConfig/_setNeedsCost.mdx b/src/content/docs/code-snippets/unity/AdjustConfig/_setNeedsCost.mdx new file mode 100644 index 000000000..153eb03a5 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustConfig/_setNeedsCost.mdx @@ -0,0 +1,5 @@ +```c# +AdjustConfig adjustConfig = new AdjustConfig("{Your App Token}", AdjustEnvironment.Sandbox); +adjustConfig.setLogLevel(AdjustLogLevel.Verbose); +adjustConfig.setNeedsCost(true); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustConfig/_setPreinstallFilePath.mdx b/src/content/docs/code-snippets/unity/AdjustConfig/_setPreinstallFilePath.mdx new file mode 100644 index 000000000..6e95113f4 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustConfig/_setPreinstallFilePath.mdx @@ -0,0 +1,7 @@ +```c# +AdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox, true); +//... +adjustConfig.setPreinstallFilePath("../EngagementFile.xml"); +//... +Adjust.start(adjustConfig); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustConfig/_setPreinstallTrackingEnabled.mdx b/src/content/docs/code-snippets/unity/AdjustConfig/_setPreinstallTrackingEnabled.mdx new file mode 100644 index 000000000..2e5010c8f --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustConfig/_setPreinstallTrackingEnabled.mdx @@ -0,0 +1,7 @@ +```c# +AdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox, true); +//... +adjustConfig.setPreinstallTrackingEnabled(true); +//... +Adjust.start(adjustConfig); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustConfig/_setSessionFailureDelegate.mdx b/src/content/docs/code-snippets/unity/AdjustConfig/_setSessionFailureDelegate.mdx new file mode 100644 index 000000000..5ae76fbd5 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustConfig/_setSessionFailureDelegate.mdx @@ -0,0 +1,11 @@ +```c# {3, 7-9} +AdjustConfig adjustConfig = new AdjustConfig("{Your App Token}", AdjustEnvironment.Sandbox); +adjustConfig.setLogLevel(AdjustLogLevel.Verbose); +adjustConfig.setSessionFailureDelegate(SessionFailureCallback); +//... +Adjust.start(adjustConfig); +//... +public void SessionFailureCallback (AdjustSessionFailure sessionFailureData) { + //... +} +``` diff --git a/src/content/docs/code-snippets/unity/AdjustConfig/_setSessionSuccessDelegate.mdx b/src/content/docs/code-snippets/unity/AdjustConfig/_setSessionSuccessDelegate.mdx new file mode 100644 index 000000000..1a81f6c30 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustConfig/_setSessionSuccessDelegate.mdx @@ -0,0 +1,11 @@ +```c# {3, 7-9} +AdjustConfig adjustConfig = new AdjustConfig("{Your App Token}", AdjustEnvironment.Sandbox); +adjustConfig.setLogLevel(AdjustLogLevel.Verbose); +adjustConfig.setSessionSuccessDelegate(SessionSuccessCallback); +//... +Adjust.start(adjustConfig); +//... +public void SessionSuccessCallback (AdjustSessionSuccess sessionSuccessData) { + //... +} +``` diff --git a/src/content/docs/code-snippets/unity/AdjustConfig/_setUrlStrategy.mdx b/src/content/docs/code-snippets/unity/AdjustConfig/_setUrlStrategy.mdx new file mode 100644 index 000000000..790883c64 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustConfig/_setUrlStrategy.mdx @@ -0,0 +1,5 @@ +```c# "AdjustConfig.AdjustDataResidencyEU" +AdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox); +adjustConfig.setUrlStrategy(AdjustConfig.AdjustDataResidencyEU); +Adjust.start(adjustConfig); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustEvent/_addCallbackParameter.mdx b/src/content/docs/code-snippets/unity/AdjustEvent/_addCallbackParameter.mdx new file mode 100644 index 000000000..7b306dbfa --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustEvent/_addCallbackParameter.mdx @@ -0,0 +1,7 @@ +```c# +AdjustEvent adjustEvent = new AdjustEvent("abc123"); +//... +adjustEvent.addCallbackParameter("key", "value"); +//... +Adjust.trackEvent(adjustEvent); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustEvent/_addPartnerParameter.mdx b/src/content/docs/code-snippets/unity/AdjustEvent/_addPartnerParameter.mdx new file mode 100644 index 000000000..fa2107ca0 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustEvent/_addPartnerParameter.mdx @@ -0,0 +1,7 @@ +```c# +AdjustEvent adjustEvent = new AdjustEvent("abc123"); +//... +adjustEvent.addPartnerParameter("key", "value"); +//... +Adjust.trackEvent(adjustEvent); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustEvent/_constructor.mdx b/src/content/docs/code-snippets/unity/AdjustEvent/_constructor.mdx new file mode 100644 index 000000000..a1536d606 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustEvent/_constructor.mdx @@ -0,0 +1,5 @@ +```c# +AdjustEvent adjustEvent = new AdjustEvent("abc123"); +//... +Adjust.trackEvent(adjustEvent); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustEvent/_setCallbackId.mdx b/src/content/docs/code-snippets/unity/AdjustEvent/_setCallbackId.mdx new file mode 100644 index 000000000..106c61192 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustEvent/_setCallbackId.mdx @@ -0,0 +1,7 @@ +```c# +AdjustEvent adjustEvent = new AdjustEvent("abc123"); +//... +adjustEvent.setCallbackId("{your_callback_id}"); +//... +Adjust.trackEvent(adjustEvent); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustEvent/_setRevenue.mdx b/src/content/docs/code-snippets/unity/AdjustEvent/_setRevenue.mdx new file mode 100644 index 000000000..ae8a4fcfa --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustEvent/_setRevenue.mdx @@ -0,0 +1,7 @@ +```c# +AdjustEvent adjustEvent = new AdjustEvent("abc123"); +//... +adjustEvent.setRevenue(0.01, "EUR"); +//... +Adjust.trackEvent(adjustEvent); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustEvent/_setTransactionId.mdx b/src/content/docs/code-snippets/unity/AdjustEvent/_setTransactionId.mdx new file mode 100644 index 000000000..7e8de00de --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustEvent/_setTransactionId.mdx @@ -0,0 +1,7 @@ +```c# +AdjustEvent adjustEvent = new AdjustEvent("abc123"); +//... +adjustEvent.setTransactionId("transactionId"); +//... +Adjust.trackEvent(adjustEvent); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustPlayStoreSubscription/_addCallbackParameter.mdx b/src/content/docs/code-snippets/unity/AdjustPlayStoreSubscription/_addCallbackParameter.mdx new file mode 100644 index 000000000..4c8f2a9bd --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustPlayStoreSubscription/_addCallbackParameter.mdx @@ -0,0 +1,12 @@ +```c# +AdjustPlayStoreSubscription subscription = new AdjustPlayStoreSubscription( + price, + currency, + sku, + orderId, + signature, + purchaseToken); +//... +subscription.addCallbackParameter("key1", "value1"); +subscription.addCallbackParameter("key2", "value2"); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustPlayStoreSubscription/_addPartnerParameter.mdx b/src/content/docs/code-snippets/unity/AdjustPlayStoreSubscription/_addPartnerParameter.mdx new file mode 100644 index 000000000..7259953e5 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustPlayStoreSubscription/_addPartnerParameter.mdx @@ -0,0 +1,12 @@ +```c# +AdjustPlayStoreSubscription subscription = new AdjustPlayStoreSubscription( + price, + currency, + sku, + orderId, + signature, + purchaseToken); +//... +subscription.addPartnerParameter("key1", "value1"); +subscription.addPartnerParameter("key2", "value2"); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustPlayStoreSubscription/_adjustPlayStoreSubscription.mdx b/src/content/docs/code-snippets/unity/AdjustPlayStoreSubscription/_adjustPlayStoreSubscription.mdx new file mode 100644 index 000000000..b16341a43 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustPlayStoreSubscription/_adjustPlayStoreSubscription.mdx @@ -0,0 +1,9 @@ +```c# +AdjustPlayStoreSubscription subscription = new AdjustPlayStoreSubscription( + price, + currency, + sku, + orderId, + signature, + purchaseToken); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustPlayStoreSubscription/_setPurchaseTime.mdx b/src/content/docs/code-snippets/unity/AdjustPlayStoreSubscription/_setPurchaseTime.mdx new file mode 100644 index 000000000..ec54b151b --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustPlayStoreSubscription/_setPurchaseTime.mdx @@ -0,0 +1,10 @@ +```c# +AdjustPlayStoreSubscription subscription = new AdjustPlayStoreSubscription( + price, + currency, + sku, + orderId, + signature, + purchaseToken); +subscription.setPurchaseTime(purchaseTime); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustThirdPartySharing/_addGranularOption.mdx b/src/content/docs/code-snippets/unity/AdjustThirdPartySharing/_addGranularOption.mdx new file mode 100644 index 000000000..6a9556eab --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustThirdPartySharing/_addGranularOption.mdx @@ -0,0 +1,7 @@ +```c# +AdjustThirdPartySharing adjustThirdPartySharing = new AdjustThirdPartySharing(null); +//... +adjustThirdPartySharing.addGranularOption("PartnerA", "key", "value"); +//... +Adjust.trackThirdPartySharing(adjustThirdPartySharing); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustThirdPartySharing/_addGranularOptionFacebook.mdx b/src/content/docs/code-snippets/unity/AdjustThirdPartySharing/_addGranularOptionFacebook.mdx new file mode 100644 index 000000000..2d55b7ac0 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustThirdPartySharing/_addGranularOptionFacebook.mdx @@ -0,0 +1,8 @@ +```c# +AdjustThirdPartySharing adjustThirdPartySharing = new AdjustThirdPartySharing(null); +//... +adjustThirdPartySharing.addGranularOption("facebook", "data_processing_options_country", "1"); +adjustThirdPartySharing.addGranularOption("facebook", "data_processing_options_state", "1000"); +//... +Adjust.trackThirdPartySharing(adjustThirdPartySharing); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustThirdPartySharing/_addPartnerSharingSetting.mdx b/src/content/docs/code-snippets/unity/AdjustThirdPartySharing/_addPartnerSharingSetting.mdx new file mode 100644 index 000000000..339e613aa --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustThirdPartySharing/_addPartnerSharingSetting.mdx @@ -0,0 +1,6 @@ +```c# +AdjustThirdPartySharing adjustThirdPartySharing = new AdjustThirdPartySharing(null); +//... +adjustThirdPartySharing.addPartnerSharingSetting("PartnerA", "foo", false); +Adjust.trackThirdPartySharing(adjustThirdPartySharing); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustThirdPartySharing/_initFalse.mdx b/src/content/docs/code-snippets/unity/AdjustThirdPartySharing/_initFalse.mdx new file mode 100644 index 000000000..600b3b712 --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustThirdPartySharing/_initFalse.mdx @@ -0,0 +1,5 @@ +```c# "false" +AdjustThirdPartySharing adjustThirdPartySharing = new AdjustThirdPartySharing(false); +//... +Adjust.trackThirdPartySharing(adjustThirdPartySharing); +``` diff --git a/src/content/docs/code-snippets/unity/AdjustThirdPartySharing/_initTrue.mdx b/src/content/docs/code-snippets/unity/AdjustThirdPartySharing/_initTrue.mdx new file mode 100644 index 000000000..505d5ac8f --- /dev/null +++ b/src/content/docs/code-snippets/unity/AdjustThirdPartySharing/_initTrue.mdx @@ -0,0 +1,5 @@ +```c# "true" +AdjustThirdPartySharing adjustThirdPartySharing = new AdjustThirdPartySharing(true); +//... +Adjust.trackThirdPartySharing(adjustThirdPartySharing); +``` diff --git a/src/content/docs/en/sdk/unity/configuration/att.mdx b/src/content/docs/en/sdk/unity/configuration/att.mdx new file mode 100644 index 000000000..8edb6866e --- /dev/null +++ b/src/content/docs/en/sdk/unity/configuration/att.mdx @@ -0,0 +1,100 @@ +--- +title: Set up App Tracking Transparency +description: Configure your app to use Apple's App Tracking Transparency framework +slug: en/sdk/unity/configuration/att +--- + +import RequestTrackingAuthorization from "@unity-fragments/Adjust/_requestTrackingAuthorization.mdx" +import AppTrackingAuthorizationStatus from "@unity-fragments/Adjust/_appTrackingAuthorizationStatus.mdx" +import CheckForNewAttStatus from "@unity-fragments/Adjust/_checkForNewAttStatus.mdx" + +If you want to record the device's IDFA (ID for Advertisers), you must display a prompt to get your user's authorization. To do this, you need to include Apple's ATT (App Tracking Transparency) framework in your app. The Adjust SDK stores the user's authorization status and sends it to Adjust's servers with each request. + +## Authorization statuses + + + +| Status | Code | Description | +| --------------------------------------------------- | ---- | -------------------------------------------------------------------- | +| `ATTrackingManagerAuthorizationStatusNotDetermined` | `0` | The user hasn't responded to the access prompt yet | +| `ATTrackingManagerAuthorizationStatusRestricted` | `1` | Access to app-related data is blocked at the device level | +| `ATTrackingManagerAuthorizationStatusDenied` | `2` | The user has denied access to app-related data for device tracking | +| `ATTrackingManagerAuthorizationStatusAuthorized` | `3` | The user has approved access to app-related data for device tracking | + +
+ + + +You might receive a status code of `-1` if the SDK is unable to retrieve the ATT (App Tracking Transparency) status. + + + +## App-tracking authorization wrapper + +The Adjust SDK contains a wrapper around [Apple's `requestTrackingAuthorizationWithCompletionHandler` method](https://developer.apple.com/documentation/apptrackingtransparency/attrackingmanager/3547037-requesttrackingauthorizationwith). You can use this wrapper if you don't want to customize the ATT prompt. + +The callback method triggers when your user responds to the consent dialog. This method sends the user's consent status code to Adjust's servers. You can define responses to each status code within the callback function. + +You must specify text content for the tracking request dialog. To do this, add your text to the `NSUserTrackingUsageDescription` key in your `Info.plist` file. + + + +The Adjust SDK also records the consent status if you use a custom prompt. If you show your prompt before initialization, the SDK sends the status with the install event. If you show it after initialization, the SDK sends the status to Adjust's servers as soon as the user updates it. + + + + + + + +### Example + +This example demonstrates how to log a human-readable description of the user's authorization status when they interact with a prompt. + +```c# +Adjust.requestTrackingAuthorizationWithCompletionHandler((status) => +{ + switch (status) + { + case 0: + Debug.Log("The user hasn't responded to the access prompt yet."); + break; + case 1: + Debug.Log("Access to app-related data is blocked at the device level."); + break; + case 2: + Debug.Log("The user has denied access to app-related data for device tracking."); + break; + case 3: + Debug.Log("The user has approved access to app-related data for device tracking."); + break; + } +}); +``` + + + +## Get current authorization status + +You can retrieve a user's current authorization status at any time. Call the [`appTrackingAuthorizationStatus` method](#ios-apptrackingauthorizationstatus-invocation) to return the authorization status code as an **integer**. + + + + + +### Example + +This example demonstrates how to collect the user's authorization status and convert it to a `String`. This information is assigned to a variable called `authorizationStatus` and passed as a session partner parameter with the key `"status"`. + +```c# +string authorizationStatus = Convert.ToString(Adjust.getAppTrackingAuthorizationStatus()); +Adjust.addSessionPartnerParameter("status", authorizationStatus); +``` + + + +## Check for authorization status changes + +If you use a custom ATT prompt, you need to inform the Adjust SDK of changes to the user's authorization status. Call the [`checkForNewAttStatus` method](#ios-checkfornewattstatus-invocation) to send the authorization status to Adjust's servers. + + diff --git a/src/content/docs/en/sdk/unity/configuration/background.mdx b/src/content/docs/en/sdk/unity/configuration/background.mdx new file mode 100644 index 000000000..bd3a3fc2d --- /dev/null +++ b/src/content/docs/en/sdk/unity/configuration/background.mdx @@ -0,0 +1,19 @@ +--- +title: Record activity in the background +description: Configure the SDK to send requests in the background. +slug: en/sdk/unity/configuration/background +--- + +import SetSendInBackground from "@unity-fragments/AdjustConfig/_sendInBackground.mdx" + +By default, the Adjust SDK pauses the sending of requests when your app is running in the background. You can configure the SDK to send requests in the background by enabling the background recording feature. + +Your config object contains a boolean `sendInBackground` property that controls this behavior. You can set this property by calling the [`setSendInBackground` method](#ios-setsendinbackground-invocation) on your config instance with a boolean value. + + + +You must set the `sendInBackground` property *before* you initialize the Adjust SDK. + + + + diff --git a/src/content/docs/en/sdk/unity/configuration/deep-links.mdx b/src/content/docs/en/sdk/unity/configuration/deep-links.mdx new file mode 100644 index 000000000..5d99398c5 --- /dev/null +++ b/src/content/docs/en/sdk/unity/configuration/deep-links.mdx @@ -0,0 +1,118 @@ +--- +title: Deep linking +description: Follow the guides in this section to set up deep linking. +category-title: Deep linking +slug: en/sdk/unity/configuration/deep-links +--- + +import SetLinkMeEnabled from "@unity-fragments/AdjustConfig/_setLinkMeEnabled.mdx" +import SetLaunchDeferredDeeplink from "@unity-fragments/AdjustConfig/_setLaunchDeferredDeeplink.mdx" + +Deep links are URIs (Uniform Resource Identifiers) that direct users to a specific page in your app without any additional navigation. You can use them throughout your marketing funnel to improve user acquisition, engagement, and retention. + +The Adjust SDK uses different logic depending on whether the user already has your app installed on their device: + +Direct deep linking +: Occurs if the user already has your app installed. The link takes the user to the page specified in the link + +Deferred deep linking +: Occurs if the user doesn't have your app installed. The link takes the user to a storefront to install your app first. After the user installs the app, it opens to the page specified in the link. + +To get started, follow these steps. + +## Set up deep linking + +If a user has your app installed, it opens when they interact with a link containing deep link information. The Adjust SDK contains tools to parse deep link information for use throughout your app. + +The SDK injects the required settings into Android and iOS projects in v4.30 and above. To configure deep linking, add your URL schemes in the Unity Editor inspector window. + +![A screenshot of the Unity editor](https://images.ctfassets.net/5s247im0esyq/4zj31Hg4AXE8WDKKqbz5xM/1535bc4d75e1b4ad826c002c7e9fe61a/ios_deeplinks.png) + +For Adjust SDK below v4.30 or Unity Editor below v2019.2 (Android only), you need to set up deep linking on an app level. Follow the instructions linked below to set up deep linking on your target platform: + +- [iOS](/en/sdk/ios/configuration/deep-links) +- [Android](/en/sdk/android/configuration/deep-links) + +## Deep linking on iOS + +### Set up universal links + +Devices running iOS 9 and later use [universal links](https://developer.apple.com/library/ios/documentation/General/Conceptual/AppSearch/UniversalLinks.html) to handle deep links. You need to add your universal link scheme to your app to open deep links in your app. To do this: + +1. Set up your universal links in the Adjust dashboard. +2. Configure Associated Domains for your app in the Apple Developer Portal. +3. Open the Unity editor. +4. Navigate to the DEEP LINKING section of the Adjust prefab. +5. Enter your universal link(s) in the iOS Universal Links Domain field. Replace the `https://` protocol with `applinks:` + +### Set up a custom URL scheme + +Devices running iOS 8 and earlier use a custom URL scheme to handle deep links. + +1. Set up your deep links in the Adjust dashboard. +2. Open the Unity editor. +3. Navigate to the DEEP LINKING section of the Adjust prefab. +4. Enter your URL scheme(s) in the iOS URL Schemes field. Enter only the scheme without the following `://`. + +## Deep linking on Android + +Android devices use a unique URI scheme to handle deep links. To set up deep linking, add your scheme to the Android URI Schemes section of the Adjust prefab. The SDK adds the required XML tags to your `AndroidManifest.xml`. + +![A screenshot of the Android URI Schemes section in the Unity prefab menu](https://images.ctfassets.net/5s247im0esyq/3NYo4ctARqUSwJJz7wyOjI/276b2699ef82fc0ab72989a5aaa2b347/android_uri_schemes.png) + +## Deferred deep linking + +### Disable deferred deep linking + +The SDK opens deferred deep links by default. You can configure this by passing a **boolean** argument to the [`setLaunchDeferredDeeplink` method](#unity-setlaunchdeferreddeeplink-invocation). + + + +### Set up a deferred deep link delegate + +You can configure the Adjust SDK to call a delegate function when it receives a deferred deep link. This delegate function receives the deep link as a **string** argument. + +```c# {1-3, 6} +private void DeferredDeeplinkCallback(string deeplinkURL) { + //... +} + +AdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox); +adjustConfig.setDeferredDeeplinkDelegate(DeferredDeeplinkCallback); +Adjust.start(adjustConfig); +``` + + + +### Example + +This example demonstrates how to log a deep link address when the user opens a deferred deep link. + +```c# +private void LogDeepLink(string deepLinkURL) { + Debug.Log("Deeplink URL: " + deeplinkURL); +} +//... +AdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox); +adjustConfig.setDeferredDeeplinkDelegate(LogDeepLink); +//... +Adjust.start(adjustConfig); +``` + + + +### Enable LinkMe + +The Adjust SDK lets you copy deep link information from the device pasteboard. When combined with Adjust’s LinkMe solution, this feature enables deferred deep linking on devices running iOS 15 and above. + + + +The Adjust SDK checks the pasteboard when a user opens the app for the first time. The device displays a dialog asking if the user wants to allow the app to read the pasteboard. + + + +When a user clicks on a LinkMe URL they have the option to copy the link information to their system pasteboard. You can use the Adjust SDK to read the system pasteboard for deep link information. If deep link information is present, the SDK forwards the user to the correct page in your app. + +To enable pasteboard checking in your app, pass a true value to the [`setLinkMeEnabled` method](#unity-setlinkmeenabled-invocation) on your config object: + + diff --git a/src/content/docs/en/sdk/unity/configuration/delay.mdx b/src/content/docs/en/sdk/unity/configuration/delay.mdx new file mode 100644 index 000000000..abffe3c62 --- /dev/null +++ b/src/content/docs/en/sdk/unity/configuration/delay.mdx @@ -0,0 +1,28 @@ +--- +title: Delay recording +description: Configure the SDK to delay the sending of information to Adjust's servers. +slug: en/sdk/unity/configuration/delay +--- + +import SetOfflineMode from "@unity-fragments/Adjust/_setOfflineMode.mdx" +import SetEventBufferingEnabled from "@unity-fragments/AdjustConfig/_setEventBufferingEnabled.mdx" + + + +The offline mode setting isn't remembered between sessions. Offline mode is disabled at the start of each new session. + + + +The Adjust SDK sends event and session data to Adjust's servers in real time. You can pause the sending of information by putting the SDK in offline mode. In offline mode the SDK stores all data in a local file on the device. The SDK sends this information to Adjust's servers when you disable offline mode. + +Your config object contains a boolean `isOffline` property that controls this behavior. You can update this property at any time by calling the [`setOfflineMode` method](#ios-setofflinemode-invocation) with a boolean argument. The SDK sends all saved information to Adjust's servers when you deactivate offline mode. + + + +## Event buffering + +The Adjust SDK sends event information as soon as a user triggers an event in your app. You can send event information on a schedule by enabling event buffering. Event buffering stores events in a local buffer on the device and sends all requests once per minute. + +Your config object contains a boolean `eventBufferingEnabled` property that controls this behavior. You can set this property by calling the [`setEventBufferingEnabled` method](#ios-seteventbufferingenabled-invocation) on your config object with a boolean argument. + + diff --git a/src/content/docs/en/sdk/unity/configuration/disable.mdx b/src/content/docs/en/sdk/unity/configuration/disable.mdx new file mode 100644 index 000000000..dec8964a0 --- /dev/null +++ b/src/content/docs/en/sdk/unity/configuration/disable.mdx @@ -0,0 +1,48 @@ +--- +title: Disable the Adjust SDK +description: Disable the Adjust SDK to pause recording. +slug: en/sdk/unity/configuration/disable +--- + +import SetEnabled from "@unity-fragments/Adjust/_setEnabled.mdx" +import IsEnabled from "@unity-fragments/Adjust/_isEnabled.mdx" + +The Adjust SDK runs by default when your app is open. You can disable and re-enable the Adjust SDK to pause and resume recording. When you disable the Adjust SDK, it doesn't send any data to Adjust's servers. + +You can enable or disable the SDK at any time by calling the [`setEnabled` method](#ios-setenabled-invocation) with a boolean argument. + + + +You can only call this method after the first session. This setting persists between sessions. + + + + + +## Check enabled status + +You can check if the Adjust SDK is enabled at any time by calling the [`isEnabled` method](#ios-isenabled-invocation). This method returns a boolean value. + + + +## Example + +This example demonstrates how to generate a button to enable or disable the Adjust SDK. The button displays the correct action based on the value of the txtSetEnabled variable. + +* When `txtSetEnabled` = `"Disable SDK"`, the button disables the SDK and sets `txtSetEnabled` to `"Enable SDK"`. +* When `txtSetEnabled` = `"Enable SDK"`, the button enables the SDK and sets `txtSetEnabled` to `"Disable SDK"`. + +```c# +private string txtSetEnabled = "Disable SDK"; + +if (GUI.Button(new Rect(0, Screen.height * 6 / numberOfButtons, Screen.width, Screen.height / numberOfButtons), txtSetEnabled)) { + if (string.Equals(txtSetEnabled, "Disable SDK", StringComparison.OrdinalIgnoreCase)) { + Adjust.setEnabled(false); + txtSetEnabled = "Enable SDK"; + } + else { + Adjust.setEnabled(true); + txtSetEnabled = "Disable SDK"; + } +} +``` diff --git a/src/content/docs/en/sdk/unity/configuration/external-device-id.mdx b/src/content/docs/en/sdk/unity/configuration/external-device-id.mdx new file mode 100644 index 000000000..22067af23 --- /dev/null +++ b/src/content/docs/en/sdk/unity/configuration/external-device-id.mdx @@ -0,0 +1,39 @@ +--- +title: Set external device identifiers +description: Configure an external device ID as a custom identifier for a device. +slug: en/sdk/unity/configuration/external-device-id +--- + +import SetExternalDeviceId from "@unity-fragments/AdjustConfig/_setExternalDeviceId.mdx" + +An external device identifier is a custom value that you can assign to a device or user. They help you recognize users across sessions and platforms. They can also help you deduplicate installs by user so that a user isn't counted as duplicate new installs. Contact your Adjust representative to get started with external device IDs. + +You can use an external device ID as a custom identifier for a device. This helps you keep continuity with your other systems. + + + +See the [External device identifiers article](https://help.adjust.com/en/article/external-device-identifiers) in the Adjust help center for more information. + + + +Your config object contains a **string** `externalDeviceId` property that you can use to store your external device ID. You can set property calling the [`setExternalDeviceId` method](#ios-setexternaldeviceid-invocation) with your ID as an argument. + + + +You must set your external device ID **before** initializing the Adjust SDK. + + + +The external device ID is case-sensitive. If you have imported external device IDs, make sure the value you pass matches the imported value. + + + +If you want to use the external device ID in your business analytics, you can pass it as a session callback parameter. + + + +See [Session parameters](/en/sdk/unity/features/session-parameters) for more information. + + + +You can import existing external device IDs into Adjust. This ensures that the Adjust servers match future data to your existing device records. Contact your Adjust representative for more information. diff --git a/src/content/docs/en/sdk/unity/configuration/index.mdx b/src/content/docs/en/sdk/unity/configuration/index.mdx new file mode 100644 index 000000000..389399a61 --- /dev/null +++ b/src/content/docs/en/sdk/unity/configuration/index.mdx @@ -0,0 +1,8 @@ +--- +title: Configuration +description: Follow the guides in this section to configure the Adjust SDK. +category-title: Configuration +slug: en/sdk/unity/configuration/index +--- + +Follow the guides in this section to configure the Adjust SDK. diff --git a/src/content/docs/en/sdk/unity/configuration/log-level.mdx b/src/content/docs/en/sdk/unity/configuration/log-level.mdx new file mode 100644 index 000000000..2462b9db6 --- /dev/null +++ b/src/content/docs/en/sdk/unity/configuration/log-level.mdx @@ -0,0 +1,54 @@ +--- +title: Set log level +description: Configure the Adjust SDK's logging verbosity. +slug: en/sdk/unity/configuration/log-level +--- + +import SetLogLevel from "@unity-fragments/AdjustConfig/_setLogLevel.mdx"; +import SetLogDelegate from "@unity-fragments/AdjustConfig/_setLogDelegate.mdx"; + +The Adjust SDK provides configurable log levels to return different amounts of information. The following log levels are available: + + + +| Log level | Description | +| ------------------------- | ------------------------------------------ | +| `AdjustLogLevel.Verbose` | Enable all logging | +| `AdjustLogLevel.Debug` | Enable debug logging | +| `AdjustLogLevel.Info` | Only show info level logs (default option) | +| `AdjustLogLevel.Warn` | Disable info logging | +| `AdjustLogLevel.Error` | Disable warning level logging and below | +| `AdjustLogLevel.Assert` | Disable error level logging and below | +| `AdjustLogLevel.Suppress` | Suppress all logging | + +
+ +You can set your log level by calling the [`setLogLevel` method](#ios-setloglevel-invocation) on your `AdjustConfig` instance. + + + +## Disable all logging + +To disable all log output when initializing the SDK manually, call `setLogLevel(AdjustLogLevel.Suppress)` on your config instance. You need to set `allowSuppressLogLevel` by passing a `true` value as the third argument in your `AdjustConfig` declaration. + +```c# {3} +AdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox, true); +//... +adjustConfig.setLogLevel(AdjustLogLevel.Suppress); +//... +Adjust.start(adjustConfig); +``` + +## View compiled logs on Windows + +If your target is Windows-based and you want to see the compiled logs from the SDK in **Production** mode, redirect the log output to your app while testing it in **Sandbox** mode. + +To register a log delegate, call the [`setLogDelegate` method](#unity-setlogdelegate-invocation) on your `AdjustConfig` instance. + + + +You must call the `setLogDelegate` method **before** you initialize the Adjust SDK. + + + + diff --git a/src/content/docs/en/sdk/unity/configuration/preinstalled.mdx b/src/content/docs/en/sdk/unity/configuration/preinstalled.mdx new file mode 100644 index 000000000..147a29a9f --- /dev/null +++ b/src/content/docs/en/sdk/unity/configuration/preinstalled.mdx @@ -0,0 +1,89 @@ +--- +title: Send preinstalled app activity +description: Configure a campaign to send information from preinstalled apps. +slug: en/sdk/unity/configuration/preinstalled +--- + +import SetPreinstallTrackingEnabled from "@unity-fragments/AdjustConfig/_setPreinstallTrackingEnabled.mdx" +import SetPreinstallFilePath from "@unity-fragments/AdjustConfig/_setPreinstallFilePath.mdx" +import SetDefaultTracker from "@unity-fragments/AdjustConfig/_setDefaultTracker.mdx" + +You can use the Adjust SDK to record activity from apps that came preinstalled on a user's device. This enables you to send information from users who didn't download your app from a campaign. + +Your config object contains a **boolean** `preinstallTrackingEnabled` property that controls this feature. To enable preinstall measurement, call the [`setPreinstallTrackingEnabled` method](#unity-setpreinstalltrackingenabled-invocation) with a `true` argument. + + + +The Adjust SDK provides 5 methods for measuring preinstalled apps: + +* [System Properties](#system-properties) (Android only). +* [Content provider](#content-provider) (Android only). +* [System Installer Receiver](#system-installer-receiver) (Android only). +* [World Readable Directory](#world-readable-directory) (Android only). +* [Default campaign](#default-campaign) (iOS and Android). + +## System properties + +OEM (Original Equipment Manufacturer) partners can leverage Android system properties to attribute preinstalled apps. The OEM writes attribution information to a file and adds its path to the system properties. The Adjust SDK reads this file on initialization to attribute the install. + +## Content provider + +The content provider method makes use of a read-only content provider. The SDK uses a content resolver to gather preinstall information from the request. + +To set the permissions, add the following to your `AndroidManifest.xml` file. + +```xml title="AndroidManifest.xml" + +``` + +To access a list of preinstalled apps on the device, add the following to your `AndroidManifest.xml` file. + +```xml title="AndroidManifest.xml" + + + + + +``` + +## System installer receiver + +The system installer method uses a broadcast receiver. The system installer broadcasts preinstall information. The Adjust SDK reads this information using the system preinstall referrer receiver. + +To set up the receiver, add the following to your `AndroidManifest.xml` file. + +```xml title="AndroidManifest.xml" + + + + + +``` + +## World-readable directory + +Save attribution information for your preinstalled app in a world-readable directory. The SDK reads the information from this file at install to attribute the user. The system encryption protocol protects app data. + +Pass the file path at which your preinstall information can be found to the [`setPreinstallFilePath` method](#unity-setpreinstallfilepath-invocation) to give the Adjust SDK access to the information. + + + +## Default campaign + +Configuring a default campaign enables you to attribute all preinstalls to a predefined campaign token. Adjust records all information against this token until the attribution source changes. To set this up: + +1. Create a new link in Adjust. + + ```http "{token}" + https://app.adjust.com/{token} + ``` + +2. Copy this token and pass it to the [`setDefaultTracker` method](#ios-setdefaulttracker-invocation) in your app delegate file. + + + +3. Build and run your app. If you have logging enabled, you should see a message in your log + + ```text + Default tracker: 'abc123'. + ``` diff --git a/src/content/docs/en/sdk/unity/configuration/privacy.mdx b/src/content/docs/en/sdk/unity/configuration/privacy.mdx new file mode 100644 index 000000000..fc8fa63c7 --- /dev/null +++ b/src/content/docs/en/sdk/unity/configuration/privacy.mdx @@ -0,0 +1,148 @@ +--- +title: Set up privacy features +description: Configure features that you can use to handle user privacy in your app. +slug: en/sdk/unity/configuration/privacy +--- + +import GdprForgetMe from "@unity-fragments/Adjust/_gdprForgetMe.mdx"; +import InitWithIsEnabledNumberBoolFalse from "@unity-fragments/AdjustThirdPartySharing/_initFalse.mdx"; +import InitWithIsEnabledNumberBoolTrue from "@unity-fragments/AdjustThirdPartySharing/_initTrue.mdx"; +import AddGranularOption from "@unity-fragments/AdjustThirdPartySharing/_addGranularOption.mdx"; +import AddPartnerSharingSetting from "@unity-fragments/AdjustThirdPartySharing/_addPartnerSharingSetting.mdx"; +import AddGranularOptionFacebook from "@unity-fragments/AdjustThirdPartySharing/_addGranularOptionFacebook.mdx"; +import DisableThirdPartySharing from "@unity-fragments/Adjust/_disableThirdPartySharing.mdx"; +import SetUrlStrategy from "@unity-fragments/AdjustConfig/_setUrlStrategy.mdx"; +import TrackMeasurementConsent from "@unity-fragments/Adjust/_trackMeasurementConsent.mdx"; + +The Adjust SDK contains features that you can use to handle user privacy in your app. + +## GDPR right to be forgotten + +Article 17 of the European Union's GDPR (General Data Protection Regulation) grants users the right to be forgotten. When Adjust's servers receive an RTBF (Right to be Forgotten) request, Adjust erases the user's data. The SDK also stops sending requests from the device for the app in question. + +You can send the user's RTBF request to Adjust by calling the [`gdprForgetMe` method](#ios-gdprforgetme-invocation). + + + +## Third-party sharing for specific users + +You can use the Adjust SDK to record when a user changes their third-party sharing settings. + +### Disable third-party sharing + +Some users may want to opt-out of sharing their data with third-parties. To communicate this to Adjust, call the [`trackThirdPartySharing` method](#ios-trackthirdpartysharing-invocation) with an [`ADJThirdPartySharing` object](/ios/reference/ADJThirdPartySharing.md) initialized with a `false` value. When Adjust's servers receive this information, Adjust stops sharing the user's data with third-parties. The Adjust SDK continues to work as expected. + + + +### Enable third-party sharing + + + +### Send granular information + +You can attach granular information when a user updates their third-party sharing preferences. Use this information to communicate more detail about a user's decision. To do this, call the [`addGranularOption` method](#ios-addgranularoption-invocation) with your partner name and your options. + + + +### Update partner settings + +You can use the Adjust SDK to update your third party sharing settings on a per-partner basis. To do this, call the [`addPartnerSharingSetting` method](#ios-addpartnersharingsetting-invocation) with your partner name and your options. + + + + + +- - Partner name + - String value +- - AppleAds + - `apple_ads` +- - Facebook + - `facebook` +- - GoogleAds + - `adwords` +- - GoogleMarketingPlatform + - `google_marketing_platform` +- - Snapchat + - `snapchat` +- - Tencent + - `tencent` +- - TikTokSan + - `tiktok_san` +- - Twitter + - `twitter` +- - YahooGemini + - `yahoo_gemini` +- - YahooJapanSearch + - `yahoo_japan_search` + +
+ +### Manage Facebook Limited Data Use + + + +The Adjust SDK sends information to Facebook as soon as the app is installed. You need to make sure you call this method **before** initializing the SDK. + + + +Facebook provides a feature called Limited Data Use (LDU) to comply with the `CCPA (California Consumer Privacy Act). This feature enables you to notify Facebook when a California-based user is opted out of the sale of data. You can also use it if you want to opt all users out by default. + +You can update the Facebook LDU status by passing arguments to the [`addGranularOption` method](#ios-addgranularoption-invocation). + + + + + +- - Parameter + - Description +- - `partner_name` + - Use `facebook` to toggle LDU. +- - `data_processing_options_country` + - The country the user is located in. + - `0`: Request that Facebook use geolocation. + - `1`: United States of America. +- - `data_processing_options_state` + - Notifies Facebook which state the user is located in. + - `0`: Request that Facebook use geolocation. + - `1000`: California. + +
+ + + +If you call this method with a `0` value for **either** `data_processing_options_country` or `data_processing_options_state`, the Adjust SDK passes **both** fields back as `0`. + + + +## Disable third-party sharing + +To disable third-party sharing for all users, call the [`disableThirdPartySharing` method](#ios-disablethirdpartysharing-invocation). When Adjust's servers receive this information, Adjust stops sharing the user's data with third-parties. The Adjust SDK continues to work as expected. + + + +## Data residency + +The data residency feature allows you to choose the country in which Adjust stores your data. This is useful if you're operating in a country with strict privacy requirements. When you set up data residency, Adjust stores your data in a data center located in the region your have chosen. + +To set your country of data residency, call the [setUrlStrategy method](#ios-seturlstrategy-invocation) on your `AdjustConfig` instance. + + + + + +| Value | Description | +| ------------------------ | --------------------------------------------------------- | +| `AdjustDataResidencyEU` | Sets the area of data residency to the EU | +| `AdjustDataResidencyTR` | Sets the area of data residency to Turkey | +| `AdjustDataResidencyUS` | Sets the area of data residency to the USA | +| `AdjustUrlStrategyChina` | Points the URL strategy to the `app.adjust.world` domain | +| `AdjustUrlStrategyCn` | Points the URL strategy to the `app.adjust.cn` domain | +| `AdjustUrlStrategyIndia` | Points the URL strategy to the `app.adjust.net.in` domain | + +
+ +## Consent measurement for specific users + +If you are using [Data Privacy settings](https://help.adjust.com/en/article/manage-data-collection-and-retention) in your Adjust dashboard, you need to set up the Adjust SDK to work with them. This includes settings such as consent expiry period and user data retention period. To toggle this feature, call the [`trackMeasurementConsent` method](#ios-trackmeasurementconsent-invocation). When enabled, the SDK communicates the data privacy settings to Adjust's servers. Adjust's servers then applies your data privacy rules to the user. The Adjust SDK continues to work as expected. + + diff --git a/src/content/docs/en/sdk/unity/configuration/push-tokens.mdx b/src/content/docs/en/sdk/unity/configuration/push-tokens.mdx new file mode 100644 index 000000000..9579feca1 --- /dev/null +++ b/src/content/docs/en/sdk/unity/configuration/push-tokens.mdx @@ -0,0 +1,22 @@ +--- +title: Set up push tokens +description: Configure push tokens for your app. +slug: en/sdk/unity/configuration/push-tokens +--- + +import SetDeviceToken from "@unity-fragments/Adjust/_setDeviceToken.mdx" + +Push tokens are used for [Audience Builder](https://help.adjust.com/en/article/audience-builder) and client callbacks. They're also required for [Uninstall and reinstall tracking](https://help.adjust.com/en/article/uninstalls-reinstalls). + +Your config object contains a string `pushToken` property that you can use to store your push token. You can update this property at any time by calling the [`setDeviceToken` method](#unity-setdevicetoken-invocation) and passing your token as an argument. + + + +## Example + +This example demonstrates how to set a new push token with the value _`HrFmrcq96tj723aWFfrw`_ to track your app's retention rates. You can update this value at any time by passing a new token to the `setDeviceToken` method as an argument: + +```c# '"HrFmrcq96tj723aWFfrw"' +Adjust.setDeviceToken("HrFmrcq96tj723aWFfrw"); +``` + diff --git a/src/content/docs/en/sdk/unity/configuration/skad.mdx b/src/content/docs/en/sdk/unity/configuration/skad.mdx new file mode 100644 index 000000000..004cd284c --- /dev/null +++ b/src/content/docs/en/sdk/unity/configuration/skad.mdx @@ -0,0 +1,96 @@ +--- +title: Set up SKAdNetwork and conversion values +description: Configure SKAdNetwork features for your iOS apps. +slug: en/sdk/unity/configuration/skad +--- + +import DeactivateSKAdNetworkHandling from "@unity-fragments/AdjustConfig/_deactivateSKAdNetworkHandling.mdx"; +import UpdateConversionValue from "@unity-fragments/Adjust/_updateConversionValue.mdx"; +import SetConversionValueUpdatedDelegate from "@unity-fragments/AdjustConfig/_setConversionValueUpdatedDelegate.mdx"; + + + +This feature is only available on devices running iOS 14 and above. + + + +SKAdNetwork (StoreKit Ad Network) is Apple's attribution framework for +app install and reinstall attribution. The SKAdNetwork workflow goes like this: + +1. Apple gathers attribution information and notifies the relevant ad network. +2. The network sends a postback with this information to Adjust. +3. Adjust displays SKAdNetwork data in [Datascape](https://help.adjust.com/en/suite/article/datascape) and [Data Canvas](https://help.adjust.com/en/article/data-canvas). + +## Disable SKAdNetwork communication + +The Adjust SDK communicates with SKAdNetwork by default on v4.23.0 and above. The SDK registers for SKAdNetwork attribution upon initialization. + +Your config object contains a boolean `isSKAdNetworkHandlingActive` property that controls this behavior. You can disable SKAdNetwork communication by calling the [`deactivateSKAdNetworkHandling` method](#ios-deactivateskadnetworkhandling-invocation) with no argument. + + + +You must call the `deactivateSKAdNetworkHandling` method _before_ initializing the Adjust SDK. + + + + + +## Update conversion values + +Conversion values are a mechanism used to track user behavior in SKAdNetwork. You can map 64 conditions to values from 0 through 63 and send this integer value to SKAdNetwork on user install. This gives you insight into how your users interact with your app in the first few days. + +If you manage your conversion values with Adjust, the servers update this value in the SDK. You can also update this value by using the [`updateConversionValue` method](#ios-updateconversionvalue-invocation). This method wraps [Apple's `updateConversionValue` method](https://developer.apple.com/documentation/storekit/skadnetwork/3566697-updateconversionvalue). It accepts an integer argument representing your updated conversion value. + + + + + +### Example + +This example demonstrates how to update a conversion value to `10` in response to a user triggering an event. + +```c# {2} +public void OnButtonClick() { + Adjust.updateConversionValue(10); +} +``` + + + +## Listen for changes to conversion values + +If you use Adjust to manage conversion values, the Adjust's servers send conversion value updates to the SDK. You can set up a delegate function to listen for these changes using the `setConversionValueUpdatedDelegate` method. Pass your function as an argument. + + + + + +### Example + +This example demonstrates how to log the following when the conversion value updates: + +- A message confirming the conversion value update +- The new conversion value + +```c# {8, 14-17} +using com.adjust.sdk; + +public class ExampleGUI : MonoBehaviour { + void OnGUI() { + if (GUI.Button(new Rect(0, 0, Screen.width, Screen.height), "callback")) { + AdjustConfig adjustConfig = new AdjustConfig("{Your App Token}", AdjustEnvironment.Sandbox); + adjustConfig.setLogLevel(AdjustLogLevel.Verbose); + adjustConfig.setConversionValueUpdatedDelegate(ConversionValueUpdatedCallback); + + Adjust.start(adjustConfig); + } + } + + private void ConversionValueUpdatedCallback(int conversionValue) { + Debug.Log("Conversion value updated. Callback received"); + Debug.Log("Conversion value: " + conversionValue); + } +} +``` + + diff --git a/src/content/docs/en/sdk/unity/features/ad-revenue.mdx b/src/content/docs/en/sdk/unity/features/ad-revenue.mdx new file mode 100644 index 000000000..3e0fc83bd --- /dev/null +++ b/src/content/docs/en/sdk/unity/features/ad-revenue.mdx @@ -0,0 +1,184 @@ +--- +title: Record ad revenue information +description: Record ad revenue information for supported network partners using the Adjust SDK. +slug: en/sdk/unity/features/ad-revenue +--- + +import TrackAdRevenue from "@unity-fragments/Adjust/_trackAdRevenue.mdx"; +import SetRevenue from "@unity-fragments/AdjustAdRevenue/_setRevenue.mdx"; +import SetAdImpressionsCount from "@unity-fragments/AdjustAdRevenue/_setAdImpressionsCount.mdx"; +import SetAdRevenueNetwork from "@unity-fragments/AdjustAdRevenue/_setAdRevenueNetwork.mdx"; +import SetAdRevenueUnit from "@unity-fragments/AdjustAdRevenue/_setAdRevenueUnit.mdx"; +import SetAdRevenuePlacement from "@unity-fragments/AdjustAdRevenue/_setAdRevenuePlacement.mdx"; +import AddCallbackParameter from "@unity-fragments/AdjustAdRevenue/_addCallbackParameter.mdx"; +import AddPartnerParameter from "@unity-fragments/AdjustAdRevenue/_addPartnerParameter.mdx"; + +You can record ad revenue for [supported network partners](https://help.adjust.com/en/article/ad-revenue) using the Adjust SDK. + + + +You need to perform some extra setup steps in your Adjust dashboard to measure ad revenue. Contact your Technical Account Manager or support@adjust.com to get started. + + + +To send ad revenue to Adjust: + +1. Create a new Adjust ad revenue instance and pass your ad revenue source as an argument. +2. Call the [`trackAdRevenue` method](#ios-trackadrevenue-invocation) with your ad revenue instance as an argument. + + + +## Sources + + + +| Parameter | Source | +| ---------------------------------------------------- | ----------------- | +| `AdjustConfig.AdjustAdRevenueSourceAppLovinMAX` | AppLovin MAX | +| `AdjustConfig.AdjustAdRevenueSourceMopub` | Mopub | +| `AdjustConfig.AdjustAdRevenueSourceAdMob` | AdMob | +| `AdjustConfig.AdjustAdRevenueSourceIronSource` | ironSource | +| `AdjustConfig.AdjustAdRevenueSourceAdmost` | AdMost | +| `AdjustConfig.AdjustAdRevenueSourceUnity` | Unity | +| `AdjustConfig.AdjustAdRevenueSourceHeliumChartboost` | Helium Chartboost | +| `AdjustConfig.AdjustAdRevenueSourcePublisher` | Generic source | + +
+ +## Record ad revenue amount + +You can record ad revenue by setting the `revenue` and `currency` properties on your ad revenue instance. + +To set these properties, call the [`setRevenue` method](#ios-adjadrevenue-setrevenue-invocation) and pass the following arguments: + +`revenue` **number** +: The amount of revenue + +`currency` **string** +: The 3 character [ISO 4217 code](https://www.iban.com/currency-codes) of your reporting currency + + + +Check the [guide to tracking purchases in different currencies](https://help.adjust.com/en/article/currency-conversion) for more information. + + + + + +## Record ad campaign details + +The ad revenue object contains properties you can use to report on your ad campaigns. + + + +### Ad impressions + +Record the number of ad impressions by passing an **integer** value to the [`setAdImpressionsCount` method](#ios-setadimpressionscount-invocation). + + + + + + + +### Ad revenue network + +Record which network generated the revenue by passing a **string** value to the [`setAdRevenueNetwork` method](#ios-setadrevenuenetwork-invocation). + + + + + + + +### Ad revenue unit + +Record which ad revenue unit generated the revenue by passing a **string** value to the [`setAdRevenueUnit` method](#ios-setadrevenueunit-invocation). + + + + + + + +### Ad revenue placement + +Record the placement of your ad by passing a **string** value to the [`setAdRevenuePlacement` method](#ios-setadrevenueplacement-invocation). + + + + + +## Add callback parameters + +If you [register a callback URL](https://help.adjust.com/en/article/recommended-placeholders-callbacks) in the Adjust dashboard, the SDK sends a GET request to your callback URL when it records an event. + +You can configure callback parameters to your servers. Once you configure parameters on an event, the SDK appends them to your [callback URL](https://help.adjust.com/en/article/raw-data-exports). You can use this information to analyze your users' in-app behavior with your BI system. + +Add callback parameters to your event by calling the [`addCallbackParameter` method](#ios-adjadrevenue-addcallbackparameter-invocation) with **string** key-value arguments. You can add multiple parameters by calling this method multiple times. + +The Adjust SDK measures the event and sends a request to your URL with the callback parameters. For example, if you register the URL `https://www.mydomain.com/callback`, your callback looks like this: + +```http +https://www.mydomain.com/callback?key=value&foo=bar +``` + + + +Adjust doesn't store your custom callback parameters. Custom parameters are only appended to your callback URL. + + + +If you are using CSV uploads, make sure to add the parameters to your CSV definition. + +Adjust supports many placeholders which you can use to pass information from the SDK to your URL. For example, the `{idfa}` placeholder for iOS and the `{gps_adid}` placeholder for Android. The `{publisher_parameter}` placeholder presents all callback parameters in a single string. + + + +You can read more about using URL callbacks, including a full list of available values, in the [callbacks guide](https://help.adjust.com/en/article/callbacks). + + + + + +## Add partner parameters + +You can send extra information to your network partners by adding [partner parameters](https://help.adjust.com/en/article/advanced-event-setup#receive-custom-data-with-partner-parameters). + +Adjust sends partner parameters to [external partners](https://help.adjust.com/en/article/integrated-partners) you have set up. This information is useful for more granular analysis and retargeting purposes. Adjust's servers forward these parameters once you have set them up and enabled them for a partner. + + + +Partner parameters don't appear in raw data by default. You can add the `{partner_parameters}` placeholder to receive them as a single string. + + + +Add partner parameters to your event by calling the [`addPartnerParameter` method](#ios-adjadrevenue-addpartnerparameter-invocation) with **string** key-value arguments. You can add multiple parameters by calling this method multiple times. + + + +## Example + +This example demonstrates how to set up and record an ad revenue object with the following properties: + +- AppLovin MAX as the revenue source +- 1 Euro as the revenue amount +- 10 ad impressions +- _`"network1"`_ as the ad revenue network +- _`"unit1"`_ as the ad revenue unit +- _`"banner"`_ as the ad revenue placement +- A callback parameter: `"key1" = "value1"` +- A partner parameter: `"key2" = "value2"` + + +```c# +AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue(AdjustConfig.AdjustAdRevenueSourceAppLovinMAX); +adjustAdRevenue.setRevenue(1.00, "EUR"); +adjustAdRevenue.setAdImpressionsCount(10); +adjustAdRevenue.setAdRevenueNetwork("network1"); +adjustAdRevenue.setAdRevenueUnit("unit1"); +adjustAdRevenue.setAdRevenuePlacement("banner"); +adjustAdRevenue.addCallbackParameter("key1", "value1"); +adjustAdRevenue.addPartnerParameter("key2", "value2"); +Adjust.trackAdRevenue(adjustAdRevenue); +``` diff --git a/src/content/docs/en/sdk/unity/features/attribution.mdx b/src/content/docs/en/sdk/unity/features/attribution.mdx new file mode 100644 index 000000000..aca75b57e --- /dev/null +++ b/src/content/docs/en/sdk/unity/features/attribution.mdx @@ -0,0 +1,30 @@ +--- +title: Get attribution information +description: Listen for attribution changes using the Adjust SDK +slug: en/sdk/unity/features/attribution +--- + +import SetAttributionChangedDelegate from "@unity-fragments/AdjustConfig/_setAttributionChangedDelegate.mdx"; +import Attribution from "@unity-fragments/Adjust/_getAttribution.mdx"; + +When a user interacts with a campaign link, their attribution information updates. This can happen if the user interacts with a [deep link](https://help.adjust.com/en/article/deep-links). The SDK can listen for attribution changes and call a function when it detects an update. + +To configure your callback function, call the [`setAttributionChangedDelegate` method](#unity-setattributionchangeddelegate-invocation) with your function name as an argument. + + + +You must call the `setAttributionChangedDelegate` method **before** initializing the Adjust SDK in your app. + + + + + +Within your delegate function, you have access to the user's `Attribution` information. See the [`AdjustAttribution` class reference](/en/sdk/unity/reference/adjustattribution) for a list of available properties. + +## Get current attribution information + +When a user installs your app, Adjust attributes the install to a campaign. The Adjust SDK gives you access to campaign attribution details for your install. To return this information, call the [`attribution` method](#ios-attribution-invocation). + +This method returns an Attribution object. See the [`AdjustAttribution` class reference](/en/sdk/unity/reference/adjustattribution) for a list of available properties. + + diff --git a/src/content/docs/en/sdk/unity/features/callbacks.mdx b/src/content/docs/en/sdk/unity/features/callbacks.mdx new file mode 100644 index 000000000..508f8a0c7 --- /dev/null +++ b/src/content/docs/en/sdk/unity/features/callbacks.mdx @@ -0,0 +1,160 @@ +--- +title: Set up callbacks +description: Set up callbacks to trigger functions when the SDK sends information to Adjust. +slug: en/sdk/unity/features/callbacks +--- + +import SetSessionSuccessDelegate from "@unity-fragments/AdjustConfig/_setSessionSuccessDelegate.mdx"; +import SetEventSuccessDelegate from "@unity-fragments/AdjustConfig/_setEventSuccessDelegate.mdx"; +import SetSessionFailureDelegate from "@unity-fragments/AdjustConfig/_setSessionFailureDelegate.mdx"; +import SetEventFailureDelegate from "@unity-fragments/AdjustConfig/_setEventFailureDelegate.mdx"; + +Set up callbacks to trigger functions when the SDK sends information to Adjust. You can set up callbacks for sessions and events. + + + +You must register your callbacks **before** initializing the SDK. + + + +## Session callbacks + +Set up session callbacks to trigger functions when the SDK sends session information. You can create **success** callbacks and **failure** callbacks. **Success** callbacks trigger when the SDK sends information to Adjust's servers. **Failure** callbacks trigger when the SDK encounters a problem while sending the information. + +Session callbacks have access to a response data object. You can use its properties in your callback function. + + + +| Property | Data type | Description | +| -------------- | ----------------------------- | ---------------------------------------------------------------------- | +| `Message` | String | The message from the server or the error logged by the SDK. | +| `Timestamp` | String | The timestamp from Adjust's servers. | +| `Adid` | String | A unique device identifier provided by Adjust. | +| `JsonResponse` | Dictionary \ | The JSON object with the response from the server. | +| `WillRetry` | Boolean | Indicates whether there will be an attempt to resend a failed package. | + +
+ +### Success callbacks + +Set up success callbacks to trigger functions when the SDK records a session. + + + + + +### Example + +This example demonstrates how to created a callback function `sessionSuccess` and register it as a **success** callback. The function logs the timestamp at which the SDK recorded the session. + +```c# +AdjustConfig adjustConfig = new AdjustConfig("{Your App Token}", AdjustEnvironment.Sandbox); +adjustConfig.setLogLevel(AdjustLogLevel.Verbose); +adjustConfig.setSessionSuccessDelegate(sessionSuccess); +// ... +Adjust.start(adjustConfig); +// ... +public void sessionSuccess (AdjustSessionSuccess sessionSuccessData) { + Debug.Log("Session recorded at " + sessionSuccessData.Timestamp); +} +``` + + + +### Failure callbacks + +Set up failure callbacks to trigger functions when the SDK fails to record a session. + + + + + +### Example + +This example demonstrates how to created a callback function `sessionFailure` and register it as a **failure** callback. The function logs the session failure message. + +```c# +AdjustConfig adjustConfig = new AdjustConfig("{Your App Token}", AdjustEnvironment.Sandbox); +adjustConfig.setLogLevel(AdjustLogLevel.Verbose); +adjustConfig.setSessionFailureDelegate(sessionFailure); +// ... +Adjust.start(adjustConfig); +// ... +public void sessionFailure (AdjustSessionFailure sessionFailureData) { + Debug.Log("Session recording failed. Response: " + sessionFailureData.Message); +} +``` + + + +## Event callbacks + +Set up event callbacks to trigger functions when the SDK sends event information. You can create **success** callbacks and **failure** callbacks. **Success** callbacks trigger when the SDK sends information to Adjust's servers. **Failure** callbacks trigger when the SDK encounters a problem while sending the information. + +Event callbacks have access to a response data object. You can use its properties in your callback function. + + + +| Property | Data type | Description | +| -------------- | ----------------------------- | ---------------------------------------------------------------------- | +| `Message` | String | The message from the server or the error logged by the SDK. | +| `Timestamp` | String | The timestamp from Adjust's servers. | +| `Adid` | String | A unique device identifier provided by Adjust. | +| `JsonResponse` | Dictionary \ | The JSON object with the response from the server. | +| `EventToken` | String | The event token | +| `CallbackId` | String | The custom callback ID set on the event object | +| `WillRetry` | Boolean | Indicates whether there will be an attempt to resend a failed package. | + +
+ +### Success callbacks + +Set up success callbacks to trigger functions when the SDK records an event. + + + + + +### Example + +This example demonstrates how to created a callback function `eventSuccess` and register it as a **success** callback. The function logs the timestamp at which the SDK recorded the event. + +```c# +AdjustConfig adjustConfig = new AdjustConfig("{Your App Token}", AdjustEnvironment.Sandbox); +adjustConfig.setLogLevel(AdjustLogLevel.Verbose); +adjustConfig.setEventSuccessDelegate(eventSuccess); +// ... +Adjust.start(adjustConfig); +// ... +public void eventSuccess (AdjustEventSuccess eventSuccessData) { + Debug.Log("Event recorded at " + eventSuccessData.Timestamp); +} +``` + + + +### Failure callbacks + +Set up failure callbacks to trigger functions when the SDK fails to record an event. + + + + + +### Example + +This example demonstrates how to created a callback function `eventFailure` and register it as a **failure** callback. The function logs the event failure message. + +```c# +AdjustConfig adjustConfig = new AdjustConfig("{Your App Token}", AdjustEnvironment.Sandbox); +adjustConfig.setLogLevel(AdjustLogLevel.Verbose); +adjustConfig.setEventFailureDelegate(eventFailure); +// ... +Adjust.start(adjustConfig); +// ... +public void eventFailure (AdjustEventFailure eventFailureData) { + Debug.Log("Event recording failed. Response: " + eventFailureData.Message); +} +``` + + diff --git a/src/content/docs/en/sdk/unity/features/device-info.mdx b/src/content/docs/en/sdk/unity/features/device-info.mdx new file mode 100644 index 000000000..48db5833c --- /dev/null +++ b/src/content/docs/en/sdk/unity/features/device-info.mdx @@ -0,0 +1,40 @@ +--- +title: Get device information +description: Use these methods to add details to your callbacks and improve your reporting. +slug: en/sdk/unity/features/device-info +--- + +import GetIdfa from "@unity-fragments/Adjust/_getIdfa.mdx" +import GetAdid from "@unity-fragments/Adjust/_getAdid.mdx" +import GetAmazonAdId from "@unity-fragments/Adjust/_getAmazonAdId.mdx" +import GetGoogleAdId from "@unity-fragments/Adjust/_getGoogleAdId.mdx" + +The Adjust SDK contains helper methods that return device information. Use these methods to add details to your callbacks and improve your reporting. + +## Adjust device identifier + +Adjust generates a unique ADID (Adjust Device ID) for each device. Call the [`adid` method](#ios-adid-invocation) to return this ID as a **string**. + + + +## ID For Advertisers + +The IDFA (ID for Advertisers) is a device-specific identifier for Apple devices. Call the [`idfa` method](#ios-idfa-invocation) to return this ID as a **string**. + + + +## Google Play Services Advertising ID + +The GPS ADID (Google Play Services Advertising ID) is a device-specific identifier for Android devices. + +Users can opt out of sharing their GPS ADID by toggling the "Opt out of Ads Personalization" setting on their device. When a user enables this setting, the Adjust SDK returns a string of zeros when trying to read the GPS ADID. + +You can access this value by calling the [`getGoogleAdId` method](#unity-getgoogleadid-invocation) in a background thread. Assign a delegate function to access the GPS ADID value. + + + +## Amazon Advertiser ID + +The Amazon Ad ID (Amazon Advertising ID) is a device-specific identifier for Android devices. Call the [`getAmazonAdId` method](#unity-getamazonadid-invocation) to return this ID as a **string**. + + diff --git a/src/content/docs/en/sdk/unity/features/events.mdx b/src/content/docs/en/sdk/unity/features/events.mdx new file mode 100644 index 000000000..3d129c394 --- /dev/null +++ b/src/content/docs/en/sdk/unity/features/events.mdx @@ -0,0 +1,214 @@ +--- +title: Send event information +description: Use these methods send event information to Adjust. +slug: en/sdk/unity/features/events +--- + +import TrackEvent from "@unity-fragments/Adjust/_trackEvent.mdx" +import SetRevenue from "@unity-fragments/AdjustEvent/_setRevenue.mdx" +import SetTransactionId from "@unity-fragments/AdjustEvent/_setTransactionId.mdx" +import SetCallbackId from "@unity-fragments/AdjustEvent/_setCallbackId.mdx" +import AddCallbackParameter from "@unity-fragments/AdjustEvent/_addCallbackParameter.mdx" +import AddPartnerParameter from "@unity-fragments/AdjustEvent/_addPartnerParameter.mdx" + +You can associate your [Adjust event tokens](https://help.adjust.com/en/article/basic-event-setup#create-an-event-token) to actions in your app to record them. To record an event: + +* Create a new Adjust event instance and pass your event token as a string argument. +* Call the [`trackEvent` method](#ios-trackevent-invocation) with your event instance as an argument. + + + + + +### Example + +This example demonstrates how to record an event with the token `g3mfiw` whenever a user interacts with a button. + +```c# +if (GUI.Button(new Rect(0, Screen.height * 1 / numberOfButtons, Screen.width, Screen.height / numberOfButtons), "Track Simple Event")) { + AdjustEvent adjustEvent = new AdjustEvent("g3mfiw"); + Adjust.trackEvent(adjustEvent); +} +``` + + + +## Record event revenue + +You can record revenue associated with an event by setting the revenue and currency properties on your event instance. Use this feature to record revenue-generating actions in your app. + +To set these properties, call the [`setRevenue` method](#ios-adjevent-setrevenue-invocation) and pass the following arguments: + +`revenue` (**number**) +: The amount of revenue generated by the event + +`currency` (**string**) +: The [ISO 4217 code](https://www.iban.com/currency-codes) of the event currency. + + + +Check the guide to [tracking purchases in different currencies](https://help.adjust.com/en/article/currency-conversion) for more information. + + + + + + + +### Example + +This example demonstrates how to record an event with the token `g3mfiw` whenever a user interacts with a button. The function sets the `revenue` property of this event to _`0.25`_ and the `currency` property to _`EUR`_. + +```c# +if (GUI.Button(new Rect(0, Screen.height * 2 / numberOfButtons, Screen.width, Screen.height / numberOfButtons), "Track Revenue Event")) { + AdjustEvent adjustEvent = new AdjustEvent("g3mfiw"); + adjustEvent.setRevenue(0.25, "EUR"); + Adjust.trackEvent(adjustEvent); +} +``` + + + +## Unique events + +You can pass an optional identifier to avoid recording duplicate events. The SDK stores the last ten identifiers and skips revenue events with duplicate transaction IDs. + +To set the identifier, call the [`setTransactionId` method](#ios-settransactionid-invocation) and pass your transaction ID as a **string** argument. + + + + + +### Example + +This example demonstrates how to record an event with the token `g3mfiw` whenever a user interacts with a button. The function sets the `uniqueId` to `5e85484b-1ebc-4141-aab7-25b869e54c49` using the [`setTransactionId` method](#ios-settransactionid-invocation). + +```c# +if (GUI.Button(new Rect(0, Screen.height * 2 / numberOfButtons, Screen.width, Screen.height / numberOfButtons), "Track Unique Event")) { + AdjustEvent adjustEvent = new AdjustEvent("g3mfiw"); + string uniqueId = "5e85484b-1ebc-4141-aab7-25b869e54c49" + adjustEvent.setTransactionId(uniqueId); + Adjust.trackEvent(adjustEvent); +} +``` + + + +## Add callback parameters + +If you [register a callback URL](https://help.adjust.com/en/article/set-up-callbacks) in the Adjust dashboard, the SDK sends a GET request to your callback URL when it records an event. + +You can configure callback parameters to send to your servers. Once you configure parameters on an event, the SDK appends them to your [callback URL](https://help.adjust.com/en/article/raw-data-exports). You can use this information to analyze your users' in-app behavior with your BI system. + +Add callback parameters to your event by calling the [`addCallbackParameter` method](#ios-adjevent-addcallbackparameter-invocation) with **string** key-value arguments. You can add multiple parameters by calling this method multiple times. + + + +The Adjust SDK measures the event and sends a request to your URL with the callback parameters. For example, if you register the URL `https://www.mydomain.com/callback`, your callback looks like this: + +```http +https://www.mydomain.com/callback?key=value&foo=bar +``` + + + +Adjust doesn't store your custom callback parameters. Custom parameters are only appended to your callback URL. + + + +If you're using CSV uploads, make sure to add the parameters to your CSV definition. + +Adjust supports many placeholders which you can use to pass information from the SDK to your URL. For example, the `{idfa}` placeholder for iOS and the `{gps_adid}` placeholder for Android. The `{publisher_parameter}` placeholder presents all callback parameters in a single string. + + + +You can read more about using URL callbacks, including a full list of available values, in the [callbacks guide](https://help.adjust.com/en/article/callbacks). + + + + + +### Example + +This example demonstrates how to record an event with the token `g3mfiw` whenever a user interacts with a button. The following callback parameters are added: + +* The `event_token` +* The `revenue_amount` generated by the event + +The resulting callback URL looks like this: + +```http +http://www.mydomain.com/callback?event_token=g3mfiw&revenue_amount=0.05 +``` + +```c# +if (GUI.Button(new Rect(0, Screen.height * 2 / numberOfButtons, Screen.width, Screen.height / numberOfButtons), "Track Callback Event")) { + AdjustEvent adjustEvent = new AdjustEvent("g3mfiw"); + adjustEvent.addCallbackParameter("event_token", "g3mfiw"); + adjustEvent.addCallbackParameter("revenue_amount", "0.05"); + Adjust.trackEvent(adjustEvent); +} +``` + + + +## Add partner parameters + +You can send extra information to your network partners by adding [partner parameters](https://help.adjust.com/en/article/advanced-event-setup#receive-custom-data-with-partner-parameters). + +Adjust sends partner parameters to [external partners](https://help.adjust.com/en/article/integrated-partners) you have set up. This information is useful for more granular analysis and retargeting purposes. Adjust's servers forward these parameters once you have set them up and enabled them for a partner. + + + +Partner parameters don't appear in raw data by default. You can add the `{partner_parameters}` placeholder to receive them as a single string. + + + +Add partner parameters to your event by calling the [`addPartnerParameter` method](#ios-adjevent-addpartnerparameter-invocation) with **string** key-value arguments. You can add multiple parameters by calling this method multiple times. + + + + + +### Example + +This example demonstrates how to record an event with the token `g3mfiw` whenever a user interacts with a button. The following partner parameters are added: + +* The `product_id` of the associated product +* The `user_id` of the user who triggered the event + +```c# +if (GUI.Button(new Rect(0, Screen.height * 2 / numberOfButtons, Screen.width, Screen.height / numberOfButtons), "Track Partner Event")) { + AdjustEvent adjustEvent = new AdjustEvent("g3mfiw"); + adjustEvent.addPartnerParameter("product_id", "29"); + adjustEvent.addPartnerParameter("user_id", "835"); + Adjust.trackEvent(adjustEvent); +} +``` + + + +## Add a callback identifier + +You can add a custom string identifier to each event you want to measure. Adjust's servers can report on this identifier in event callbacks. This enables you to keep track of which events have been successfully measured. + +Set up this identifier by calling the [`setCallbackId` method](#ios-setcallbackid-invocation) with your ID as a **string** argument. + + + + + +### Example + +This example demonstrates how to record an event with the token `g3mfiw` whenever a user interacts with a button. In this example, the `callbackId` is set to `f2e728d8-271b-49ab-80ea-27830a215147`. + +```c# +if (GUI.Button(new Rect(0, Screen.height * 2 / numberOfButtons, Screen.width, Screen.height / numberOfButtons), "Track Unique Callback Event")) { + AdjustEvent adjustEvent = new AdjustEvent("g3mfiw"); + string callbackId = "f2e728d8-271b-49ab-80ea-27830a215147" + adjustEvent.setCallbackId(callbackId); + Adjust.trackEvent(adjustEvent); +} +``` + + diff --git a/src/content/docs/en/sdk/unity/features/index.mdx b/src/content/docs/en/sdk/unity/features/index.mdx new file mode 100644 index 000000000..3f873572a --- /dev/null +++ b/src/content/docs/en/sdk/unity/features/index.mdx @@ -0,0 +1,8 @@ +--- +title: Features +description: Use the Adjust SDK to send in-app information to Adjust's servers. +category-title: Features +slug: en/sdk/unity/features/index +--- + +Use the Adjust SDK to send in-app information to Adjust's servers. diff --git a/src/content/docs/en/sdk/unity/features/session-parameters.mdx b/src/content/docs/en/sdk/unity/features/session-parameters.mdx new file mode 100644 index 000000000..64baadc60 --- /dev/null +++ b/src/content/docs/en/sdk/unity/features/session-parameters.mdx @@ -0,0 +1,76 @@ +--- +title: Configure session parameters +description: Send information to your callback URL with each session. +slug: en/sdk/unity/features/session-parameters +--- + +import AddSessionCallbackParameter from "@unity-fragments/Adjust/_addSessionCallbackParameter.mdx" +import RemoveSessionCallbackParameter from "@unity-fragments/Adjust/_removeSessionCallbackParameter.mdx" +import ResetSessionCallbackParameters from "@unity-fragments/Adjust/_resetSessionCallbackParameters.mdx" +import AddSessionPartnerParameter from "@unity-fragments/Adjust/_addSessionPartnerParameter.mdx" +import RemoveSessionPartnerParameter from "@unity-fragments/Adjust/_removeSessionPartnerParameter.mdx" +import ResetSessionPartnerParameters from "@unity-fragments/Adjust/_resetSessionPartnerParameters.mdx" +import SetDelayStart from "@unity-fragments/AdjustConfig/_setDelayStart.mdx" +import SendFirstPackages from "@unity-fragments/Adjust/_sendFirstPackages.mdx" + +If you [register a callback URL](https://help.adjust.com/en/article/recommended-placeholders-callbacks) in the Adjust dashboard, Adjust sends a GET request to your callback URL when the SDK measures a session. + +You can configure callback parameters to your servers. Once you configure parameters on an event, the SDK appends them to your callback URL. You can use this information to analyze your users' in-app behavior with your BI system. + + + +The Adjust SDK merges session callback parameters with event callback parameters. Event callback parameters take priority over session callback parameters. This means that if you add a parameter key to both an event and a session, the SDK sends the event parameter. + + + +Add callback parameters to your event by calling the [`addSessionCallbackParameter` method](#ios-addsessioncallbackparameter-invocation) with **string** key-value arguments. You can add multiple parameters by calling this method multiple times. + + + +You can remove specific session callback parameters if they're no longer required. To do this, pass the parameter key to the [`removeSessionCallbackParameter` method](#ios-removesessioncallbackparameter-invocation). + + + +You can remove all session parameters if they're no longer required. To do this, call the [`resetSessionCallbackParameters` method](#ios-resetsessioncallbackparameters-invocation). + + + +## Session partner parameters + +You can send extra information to your network partners by adding [partner parameters](https://help.adjust.com/en/article/advanced-event-setup#receive-custom-data-with-partner-parameters). + +Adjust sends partner parameters to [external partners](https://help.adjust.com/en/article/integrated-partners) you've set up. This information is useful for more granular analysis and retargeting purposes. Adjust's servers forward these parameters once you've set them up and enabled them for a partner. + + + +Partner parameters don't appear in raw data by default. You can add the `{partner_parameters}` placeholder to receive them as a single string. + + + +Add partner parameters to your event by calling the [`addSessionPartnerParameter` method](#ios-addsessionpartnerparameter-invocation) with **string** key-value arguments. You can add multiple parameters by calling this method multiple times. + + + +You can remove specific session partner parameters if they're no longer required. To do this, pass the parameter key to the [`removeSessionPartnerParameter` method](#ios-removesessionpartnerparameter-invocation). + + + +You can remove all session partner parameters if they're no longer required. To do this, call the [`resetSessionPartnerParameters` method](#ios-resetsessionpartnerparameters-invocation). + + + +## Delay start + + + +You can delay the startup of the SDK by up to **10 seconds**. + + + +The Adjust SDK starts as soon as your app opens. If you want to send data that's not available at launch in session parameters, you can delay the start of the SDK. To do this, pass the delay time in seconds to the [`setDelayStart` method](#ios-setdelaystart-invocation) on your config object. + + + +After this time has elapsed, the SDK sends the information to Adjust's servers. You can send the information before the timeout by calling the [`sendFirstPackages` method](#ios-sendfirstpackages-invocation). + + diff --git a/src/content/docs/en/sdk/unity/features/subscriptions.mdx b/src/content/docs/en/sdk/unity/features/subscriptions.mdx new file mode 100644 index 000000000..5c1f4b930 --- /dev/null +++ b/src/content/docs/en/sdk/unity/features/subscriptions.mdx @@ -0,0 +1,172 @@ +--- +title: Send subscription information +description: Use these methods send subscription information to Adjust. +slug: en/sdk/unity/features/subscriptions +--- + +import AdjustAppStoreSubscription from "@unity-fragments/AdjustAppStoreSubscription/_adjustAppStoreSubscription.mdx"; +import AdjustPlayStoreSubscription from "@unity-fragments/AdjustPlayStoreSubscription/_adjustPlayStoreSubscription.mdx"; +import SetTransactionDate from "@unity-fragments/AdjustAppStoreSubscription/_setTransactionDate.mdx"; +import SetPurchaseTime from "@unity-fragments/AdjustPlayStoreSubscription/_setPurchaseTime.mdx"; +import SetSalesRegion from "@unity-fragments/AdjustAppStoreSubscription/_setSalesRegion.mdx"; +import AddCallbackParameterAppStore from "@unity-fragments/AdjustAppStoreSubscription/_addCallbackParameter.mdx"; +import AddCallbackParameterPlayStore from "@unity-fragments/AdjustPlayStoreSubscription/_addCallbackParameter.mdx"; +import AddPartnerParameterAppStore from "@unity-fragments/AdjustAppStoreSubscription/_addPartnerParameter.mdx"; +import AddPartnerParameterPlayStore from "@unity-fragments/AdjustPlayStoreSubscription/_addPartnerParameter.mdx"; +import TrackAppStoreSubscription from "@ios-fragments/Adjust/_trackSubscription.mdx"; +import TrackPlayStoreSubscription from "@ios-fragments/Adjust/_trackSubscription.mdx"; + + + +The following steps only set up subscription tracking within the Adjust SDK. To enable the feature, Adjust need to set up app-specific information. Contact support@adjust.com or talk to your Technical Account manager to set this up. + + + +You can record App Store and Play Store subscriptions and verify their validity with the Adjust SDK. After the user purchases a subscription, create an `AdjustAppStoreSubscription` or `AdjustPlayStoreSubscription` instance containing the details. + +## 1. Set up your subscription object + +To get started, you need to create a subscription object containing details of the subscription purchase. + + + + +### App Store + +Create an `AdjustAppStoreSubscription` object with the following properties + + + +| Parameter | Data type | Description | +| --------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `price` | Number | The price of the subscription | +| `currency` | String | The currency of the subscription. Formatted as the [`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` | String | Your ID for the transaction | +| `receipt` | String | The receipt information | + +
+ + + +
+ + +### Play Store + +Create an `AdjustPlayStoreSubscription` object with the following properties + + + +| Parameter | Data type | Description | +| --------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `price` | Number | The price of the subscription | +| `currency` | String | The currency of the subscription | +| `sku` | String | The ID of the product | +| `orderId` | String | Your ID for the transaction | +| `signature` | String | The signature of the purchase data | +| `purchaseToken` | String | The unique token of the transaction. See [Google's documentation]() for more information | + +
+ + + +
+
+ +### Record the purchase date + +You can record the date on which the user purchased a subscription. The SDK returns this data for you to report on. + + + + +### App Store + +Call the [`setTransactionDate` method](#unity-settransactiondate-invocation) method on your subscription object to record the timestamp of the subscription. + + + + + + +### Play Store + +Call the [`setPurchaseTime` method](#unity-setpurchasetime-invocation) on your subscription object to record the timestamp of the subscription. + + + + + + +### Record the purchase region (iOS only) + +You can record the region in which the user purchased a subscription. To do this, call the [`setSalesRegion` method](#unity-setsalesregion-invocation) on your subscription object and pass the country code as a **string**. This needs to be formatted as the [`countryCode`](https://developer.apple.com/documentation/foundation/nslocale/1643060-countrycode?language=swift) of the [`priceLocale`](https://developer.apple.com/documentation/storekit/skproduct/1506145-pricelocale?language=swift) object. + + + +### Add callback parameters + +You can add callback parameters to your subscription object. The SDK appends these parameters to your callback URL. To add callback parameters, call the `addCallbackParameter` method on your subscription object. You can add multiple callback parameters by calling this method multiple times. + + + + +### App Store + + + + + + +### Play Store + + + + + + +### Add partner parameters + +You can add partner parameters to your subscription object. The SDK sends these to Adjust's servers when the user purchases a subscription. Adjust's servers forward the information on to your network partner. To add partner parameters, call the `addPartnerParameter` method on your subscription object. You can add multiple partner parameters by calling this method multiple times. + + + + +### App Store + + + + + + +### Play Store + + + + + + +## 2. Record subscription information + +Once you have set up your subscription object, you can record it using the Adjust SDK. + + + + +### App Store + +Pass your subscription object to the [`trackAppStoreSubscription` method](#unity-trackappstoresubscription-invocation) method to record the user's subscription purchase. + + + + + + +### Play Store + +Pass your subscription object to the [`trackPlayStoreSubscription` method](#unity-trackplaystoresubscription-invocation) method to record the user's subscription purchase. + + + + + diff --git a/src/content/docs/en/sdk/unity/index.mdx b/src/content/docs/en/sdk/unity/index.mdx new file mode 100644 index 000000000..8f252b7fc --- /dev/null +++ b/src/content/docs/en/sdk/unity/index.mdx @@ -0,0 +1,256 @@ +--- +title: Get started +description: Use the Unity SDK to access Adjust's features in your Unity apps +category-title: Unity SDK +slug: en/sdk/unity/index +--- + +The Adjust Unity SDK enables you to record attribution, events, and more in your Unity app. Follow the steps in this guide to set up your app to work with the Adjust SDK. + + + +The Adjust SDK supports iOS 9 or later and Android API level 9 (Gingerbread) or later. + + + +## 1. Get the Adjust SDK + +To use the Adjust SDK in your Unity app, you need to add it to your project. You can download the latest version from the [GitHub releases page](https://github.com/adjust/adjust_unity_sdk/releases/latest). + +To import the Adjust SDK to your Unity project: + +1. Open the Unity Editor. +2. Select Assets --> Import Package --> Custom Package. +3. Select the downloaded SDK package. + +## 2. Integrate the SDK + +The Adjust SDK contains a Unity [prefab](https://docs.unity3d.com/Manual/Prefabs.html) that includes a template game object and an Adjust script. You can use this script to configure the SDK. To open the prefab in the Unity editor: + +1. Add the prefab from `Assets/Adjust/Adjust.prefab` to your first scene. +2. Open the prefab Inspector Menu. +3. The prefab menu contains editable fields that control the behavior of the Adjust SDK. + +![A screenshot of the Adjust SDK prefab configuration script in the Unity editor.](https://images.ctfassets.net/5s247im0esyq/4sh9TsPWBDWrQSMz3HFWu7/69607cff5c78059a6fac9eed2ad2aa31/unity.png) + +To set up the Adjust SDK, enter the following information: + +1. Your App Token. See App settings for instructions on how to find your token. +2. Your Environment: + - Choose **Sandbox** if you are testing your app and want to send test data. You need to enable sandbox mode in the dashboard to see test data. + - Choose **Production** when you have finished testing and are ready to release your app. +3. Your Log Level. This controls what logs you receive. See [Set log level](/en/sdk/unity/configuration/log-level) for more information. + +The Adjust SDK starts when the app's Awake event triggers by default. To override this behavior, check the START SDK MANUALLY option. This enables you to initialize the Adjust SDK by calling `Adjust.start()` with your config instance as an argument. + +```c# +AdjustConfig adjustConfig = new AdjustConfig("{YourAppToken}", AdjustEnvironment.Sandbox); +// ... +Adjust.start(adjustConfig); +``` + +## 3. Set up Android devices + +### Add Google Play Services + +Apps that target the Google Play Store must use the gps_adid (Google Advertising ID) to identify devices. You need to add the `play-services-ads-identifier` AAR to your project to access the `gps_adid`. + + + +### Google External Dependency Manager + +If you are using the [Google External Dependency Manager plugin](https://developers.google.com/unity/archive#external_dependency_manager_for_unity), add the following to your `Dependencies.xml` file: + +```xml + + + +``` + + + + + +### Manual installation + +To install the ARR (Android Archive) manually, [download it from Maven](https://maven.google.com/web/index.html#com.google.android.gms:play-services-ads-identifier:18.0.1 "A link to the AAR artifact on Maven.") and add it to the `Assets/Plugins/Android` directory. + + + +### Collect App Set Identifier + +The [App Set Identifier](https://developer.android.com/design-for-safety/privacy-sandbox/reference/adservices/appsetid/AppSetId) is a unique identifier that enables you to measure information from any of your apps that a user has installed on their device. All apps by the same developer share the same App Set ID, meaning you can gather meaningful insights from users across all your apps. + + + +### Google External Dependency Manager + +To record a device's App Set ID, you need to add the following dependency to your `Dependencies.xml` file: + +```xml + + + +``` + + + + + +### Manual installation + +To install the ARR (Android Archive) manually, [download it from Maven](https://maven.google.com/web/index.html#com.google.android.gms:play-services-appset:16.0.2 "A link to the AAR artifact on Maven.") and add it to the `Assets/Plugins/Android` directory. + + + +### Set up Proguard + +If you are using Proguard, add the following rules to your [custom Proguard file](https://docs.unity3d.com/Manual/class-PlayerSettingsAndroid.html#build). + +```groovy +-keep public class com.adjust.sdk.** { *; } +-keep class com.google.android.gms.common.ConnectionResult { + int SUCCESS; +} +-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient { + com.google.android.gms.ads.identifier.AdvertisingIdClient$Info getAdvertisingIdInfo(android.content.Context); +} +-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info { + java.lang.String getId(); + boolean isLimitAdTrackingEnabled(); +} +-keep public class com.android.installreferrer.** { *; } +``` + +### Set up install referrer + +The install referrer is a unique identifier which you can use to attribute an app install to a source. The Adjust SDK requires this information to perform attribution. There are two methods you can use to gather this information depending on which stores you target: + +- Use the [Google Play Referrer API](https://developer.android.com/google/play/installreferrer). +- Use the Huawei Referrer API. + + + +### Google Play Referrer API + +There are 2 ways to add support for the Google Play Referrer API: + +1. Add the install referrer library as a dependency in a [custom `build.gradle` file](https://docs.unity3d.com/2023.1/Documentation/Manual/android-gradle-overview.html) + +```groovy +dependencies { + implementation 'com.android.installreferrer:installreferrer:2.2' +} +``` + +2. Download the install referrer library from [Maven](https://maven.google.com/web/index.html?q=install#com.android.installreferrer:installreferrer) and put the ARR (Android Archive) file in your `Plugins/Android` folder. + + + + + +### Huawei Referrer API + +As of v4.21.1, the Adjust SDK supports install tracking on Huawei devices using Huawei App Gallery v10.4 and later. You don't need to make any changes to start using the Huawei Referrer API. + + + +## 4. Build your app + +To complete the app build process, the Adjust Unity package performs custom post-build actions to ensure the Adjust SDK works in your app. + +This process is performed by the `OnPostprocessBuild` method in `AdjustEditor.cs`. Output logs show up in the Unity IDE console output window. + +![A screenshot of the Adjust SDK post-build configuration script in the Unity editor.](https://images.ctfassets.net/5s247im0esyq/5yFmvFN4y3LJSieJQcF4qE/bad5913682af34cfe61224daca312373/post-build-unity.png) + + + +### iOS + + + +To run the iOS post-build process, make sure that you have iOS build support installed in the Unity Editor. + + + +The iOS post-build process makes the following changes to your generated Xcode project: + +- Adds the other linker flag `-ObjC`: required to recognize Adjust Objective-C categories at build time. +- Enables Objective-C exceptions. + +### Frameworks + +You can enable the following frameworks to access iOS features: + +- AdServices.framework: required for Apple Search Ads tracking +- AdSupport.framework: required to read the device IDFA +- AppTrackingTransparency.framework: required to ask for user's consent to be tracked and obtain consent status +- StoreKit.framework: required to communicate with the SKAdNetwork framework. +- iAd.framework - **Deprecated**. Use `AdServices.framework` + +### App Tracking Transparency consent dialog + +If you are using the ATT (App Tracking Transparency) wrapper, enter a **User Tracking Description** message. This displays when you present the tracking consent dialog to your user. + +### Deep linking + +To enable deep linking, add the following information: + +- iOS Universal Links Domain: the associated domain used for universal links. +- iOS URL Identifier: your app's bundle ID. +- iOS URL Schemes: the URL scheme associated with your app. + + + + + +### Android + +The Android post-build process checks for an `AndroidManifest.xml` file in `Assets/Plugins/Android/`. If this file isn't present, it creates a copy from [`AdjustAndroidManifest.xml`](https://github.com/adjust/unity_sdk/blob/master/Assets/Adjust/Android/AdjustAndroidManifest.xml "A link to the AdjustAndroidManifest file on GitHub"). + +### Permissions + +You can enable the following permissions to access Android features: + +- android.permission.INTERNET: required to connect to the internet. +- android.permission.ACCESS_NETWORK_STATE: required to read the type of network the device is connected to. +- com.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE: **Deprecated**. Required to fetch install referrer information via Google Play Store intent. +- com.google.android.gms.permission.AD_ID: required to read the device advertising ID on Android 12 (API level 31) and above. See [Google's `AdvertisingIdClient.info` documentation](https://developers.google.com/android/reference/com/google/android/gms/ads/identifier/AdvertisingIdClient.Info#public-string-getid) for more information. + +### Deep linking + +To enable deep linking, add the following information: + +- Android URI Schemes: the destination of your deep link. + + + +## 5. Add the Adjust SDK signature + +You can use the Adjust SDK signature to sign all communications sent by the Adjust SDK. This enables Adjust’s servers to detect and reject any install activity that's not legitimate. + +To get started with the Adjust SDK signature, contact your Technical Account Manager or support@adjust.com. + +## 6. Test your integration + +The Adjust SDK provides tools for testing and troubleshooting issues with your integration. To test your setup: + +- Set your environment to **Sandbox**. +- Add a sandbox filter to your Adjust dashboard results. +- Set your [log level](/en/sdk/unity/configuration/log-level) to **verbose**. + + + +If you encounter any issues, email support@adjust.com with all details and logs. + + + + + +### Test Google Play Services integration + +To test that the Adjust SDK can receive a device's Google Advertising ID, set the [log level](/en/sdk/unity/configuration/log-level) to **verbose** and the environment to **Sandbox**. Start your app and measure a `session` or an event. The SDK logs the gps_adid (Google Play Services Advertiser ID) parameter if it has read the advertising ID. + +If you are having issues retrieving the Google Advertising ID, open an issue in the [GitHub repository](https://github.com/adjust/unity_sdk) or contact support@adjust.com. + + diff --git a/src/content/docs/en/sdk/unity/integrations/admob.mdx b/src/content/docs/en/sdk/unity/integrations/admob.mdx new file mode 100644 index 000000000..9a78c671c --- /dev/null +++ b/src/content/docs/en/sdk/unity/integrations/admob.mdx @@ -0,0 +1,40 @@ +--- +title: Admob SDK integration +description: Use the Admob integration to pass Admob information to Adjust's servers. +slug: en/sdk/unity/integrations/admob +--- + +If you want to measure ad revenue with the AdMob SDK, you can use the SDK-to-SDK integration to pass this information to Adjust's servers. + + + +If you have any questions about ad revenue tracking with AdMob, please contact your dedicated account manager or send an email to support@adjust.com. + + + +## Before you begin + +To use this feature, you need to first reach out to your Google representative and request access. Once that's done, you can proceed with setup in Adjust. + +### Requirements + +- Adjust Unity SDK v4.29.0 and later + +## Examples + +```c# +this.rewardedAd.OnPaidEvent += this.HandleAdPaidEvent; +public void HandleAdPaidEvent(object sender, AdValueEventArgs args) +{ + // for more information, please check AdMob official docs at: + // https://developers.google.com/admob/unity/impression-level-ad-revenue + AdValue adValue = args.AdValue; + AdapterResponseInfo loadedAdapterResponseInfo = rewardedAd.GetResponseInfo().GetLoadedAdapterResponseInfo(); + + // send ad revenue info to Adjust + AdjustAdRevenue adRevenue = new AdjustAdRevenue(AdjustConfig.AdjustAdRevenueSourceAdMob); + adRevenue.setRevenue(adValue.Value / 1000000f, adValue.CurrencyCode); + adRevenue.setAdRevenueNetwork(loadedAdapterResponseInfo.AdSourceName) + Adjust.trackAdRevenue(adRevenue); +} +``` diff --git a/src/content/docs/en/sdk/unity/integrations/admost.mdx b/src/content/docs/en/sdk/unity/integrations/admost.mdx new file mode 100644 index 000000000..47a2fc45d --- /dev/null +++ b/src/content/docs/en/sdk/unity/integrations/admost.mdx @@ -0,0 +1,22 @@ +--- +title: Admost SDK integration +description: Use the Admost integration to pass Admost information to Adjust's servers. +slug: en/sdk/unity/integrations/admost +--- + +If you want to measure ad revenue with the Admost SDK, you can use the SDK-to-SDK integration to pass this information to Adjust's servers. + + + +If you have any questions about ad revenue tracking with Admost, please contact your dedicated Technical Account Manager or send an email to support@adjust.com. + + + +## Before you begin + +To use this feature, you need to first ask your Admost representative to enable SDK-to-SDK revenue sharing for your app. + +### Requirments + +- Integrate the Admost Android SDK v2.4.5 or later in your app. +- Integrate the Adjust Unity SDK v4.29.5 or later in your app. diff --git a/src/content/docs/en/sdk/unity/integrations/applovin.mdx b/src/content/docs/en/sdk/unity/integrations/applovin.mdx new file mode 100644 index 000000000..ac991974a --- /dev/null +++ b/src/content/docs/en/sdk/unity/integrations/applovin.mdx @@ -0,0 +1,34 @@ +--- +title: AppLovin MAX SDK integration +description: Use the Applovin MAX integration to pass Applovin information to Adjust's servers. +slug: en/sdk/unity/integrations/applovin +--- + +If you want to measure ad revenue with the AppLovin MAX SDK, you can use the SDK-to-SDK integration to pass this information to Adjust's servers. + + + +If you have any questions about ad revenue tracking with AppLovin MAX, please contact your dedicated Technical Account Manager or send an email to support@adjust.com. + + + +## Requirements + +- Adjust Unity SDK v4.33.1 and later + +## Examples + +```c# +private void OnRewardedAdRevenuePaidEvent(string adUnitId, MaxSdkBase.AdInfo adInfo) +{ + var adRevenue = new AdjustAdRevenue(AdjustConfig.AdjustAdRevenueSourceAppLovinMAX); + adRevenue.setRevenue(adInfo.Revenue, "USD"); + adRevenue.setAdRevenueNetwork(adInfo.NetworkName); + adRevenue.setAdRevenueUnit(adInfo.AdUnitIdentifier); + adRevenue.setAdRevenuePlacement(adInfo.Placement); + + Adjust.trackAdRevenue(adRevenue); +} +``` + +To see how this integration works in context, check out AppLovin's [example Unity application](https://github.com/AppLovin/AppLovin-MAX-Unity-Plugin/blob/954030309d991fff76e9dbf31001055456472b62/DemoApp/Assets/Scripts/HomeScreen.cs#L513-L524). diff --git a/src/content/docs/en/sdk/unity/integrations/helium.mdx b/src/content/docs/en/sdk/unity/integrations/helium.mdx new file mode 100644 index 000000000..f63beacb1 --- /dev/null +++ b/src/content/docs/en/sdk/unity/integrations/helium.mdx @@ -0,0 +1,38 @@ +--- +title: Helium by Chartboost SDK integration +description: Use the Helium integration to pass Helium information to Adjust's servers. +slug: en/sdk/unity/integrations/helium +--- + + + +If you have any questions about ad revenue measurement with Helium by Chartboost, please contact your dedicated Technical Account Manager or send an email to support@adjust.com. + + + +If you want to measure ad revenue with the Helium by Chartboost SDK, you can use SDK-to-SDK integration to pass this information to Adjust's servers. + +## Requirements + +- Integrate the Adjust Unity SDK v4.29.6 or later in your app. + +## Example + +```c# +void DidReceiveImpressionLevelRevenueData(string placement, Hashtable impressionData) +{ + var json = HeliumJSON.Serialize(impressionData); + + ParsedJsonObject parsedJsonObject = foobar.parse(json); //app developer defined function to parse Helium impressionData JSON string + + AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue(AdjustConfig.AdjustAdRevenueSourceHeliumChartboost); + adjustAdRevenue.setRevenue(parsedJsonObject.ad_revenue, parsedJsonObject.currency_type); + + // optional fields + adjustAdRevenue.setAdRevenueNetwork(parsedJsonObject.network_name); // Helium demand network name + adjustAdRevenue.setAdRevenueUnit(parsedJsonObject.placement_name); // Helium placement name + adjustAdRevenue.setAdRevenuePlacement(parsedJsonObject.line_item_name); // Helium line item name + // track Adjust ad revenue + Adjust.trackAdRevenue(adjustAdRevenue); +} +``` diff --git a/src/content/docs/en/sdk/unity/integrations/index.mdx b/src/content/docs/en/sdk/unity/integrations/index.mdx new file mode 100644 index 000000000..9a581c00f --- /dev/null +++ b/src/content/docs/en/sdk/unity/integrations/index.mdx @@ -0,0 +1,8 @@ +--- +title: Integrations +description: Use SDK to SDK integrations to pass information from third-party SDKs to Adjust. +category-title: Integrations +slug: en/sdk/unity/integrations/index +--- + +Use SDK to SDK integrations to pass information from third-party SDKs to Adjust. diff --git a/src/content/docs/en/sdk/unity/integrations/ironsource.mdx b/src/content/docs/en/sdk/unity/integrations/ironsource.mdx new file mode 100644 index 000000000..e95aa9f0f --- /dev/null +++ b/src/content/docs/en/sdk/unity/integrations/ironsource.mdx @@ -0,0 +1,34 @@ +--- +title: Ironsource SDK integration +description: Use the Ironsource integration to pass Ironsource information to Adjust's servers. +slug: en/sdk/unity/integrations/ironsource +--- + +If you want to measure ad revenue with the ironSource SDK, you can use the SDK-to-SDK integration to pass this information to Adjust's servers. + + + +If you have any questions about ad revenue measurement with ironSource, please contact your dedicated account manager or send an email to support@adjust.com. + + + +## Requirements + +- Integrate the Adjust Unity SDK v4.29.0 or later in your app. + +## Example + +```c# +IronSourceEvents.onImpressionDataReadyEvent += ImpressionDataReadyEvent; +private void ImpressionDataReadyEvent(IronSourceImpressionData impressionData) +{ + AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue(AdjustConfig.AdjustAdRevenueSourceIronSource); + adjustAdRevenue.setRevenue(impressionData.revenue, "USD"); + // optional fields + adjustAdRevenue.setAdRevenueNetwork(impressionData.adNetwork); + adjustAdRevenue.setAdRevenueUnit(impressionData.adUnit); + adjustAdRevenue.setAdRevenuePlacement(impressionData.placement); + // track Adjust ad revenue + Adjust.trackAdRevenue(adjustAdRevenue); +} +``` diff --git a/src/content/docs/en/sdk/unity/integrations/unity.mdx b/src/content/docs/en/sdk/unity/integrations/unity.mdx new file mode 100644 index 000000000..98a565b8e --- /dev/null +++ b/src/content/docs/en/sdk/unity/integrations/unity.mdx @@ -0,0 +1,46 @@ +--- +title: Unity SDK integration +description: Use the Unity integration to pass Unity information to Adjust's servers. +slug: en/sdk/unity/integrations/unity +--- + +If you want to measure ad revenue with the Unity SDK, you can use the SDK-to-SDK integration to pass this information to Adjust's servers. + + + +If you have any questions about ad revenue measurement with Unity, please contact your dedicated account manager or send an email to support@adjust.com. + + + +## Before you begin + +To use this feature, you first need to download and set up the Adjust Unity SDK for your app. + +### Requirements + +- Adjust Unity SDK v4.29.6 or later + +For more information, see the Unity [Mediation API](https://docs.unity.com/mediation/APIReferenceUnity.html) and [impression events](https://docs.unity.com/mediation/SDKIntegrationUnityImpressionEvents.html) documentation. + +## Example + +```c# +static void OnImpression(object sender, ImpressionEventArgs e) +{ + var impressionData = e.ImpressionData != null ? JsonUtility.ToJson(e.ImpressionData, true) : "null"; + Debug.Log($"Impression event from ad unit id {e.AdUnitId} : {impressionData}"); + + // send impression data to Adjust + if (e.ImpressionData != null) + { + AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue(AdjustConfig.AdjustAdRevenueSourceUnity); + adjustAdRevenue.setRevenue(e.ImpressionData.PublisherRevenuePerImpression, e.ImpressionData.Currency); + // optional fields + adjustAdRevenue.setAdRevenueNetwork(e.ImpressionData.AdSourceName); + adjustAdRevenue.setAdRevenueUnit(e.ImpressionData.AdUnitId); + adjustAdRevenue.setAdRevenuePlacement(e.ImpressionData.AdSourceInstance); + // track Adjust ad revenue + Adjust.trackAdRevenue(adjustAdRevenue); + } +} +``` diff --git a/src/content/docs/en/sdk/unity/plugins/imei.mdx b/src/content/docs/en/sdk/unity/plugins/imei.mdx new file mode 100644 index 000000000..08a554175 --- /dev/null +++ b/src/content/docs/en/sdk/unity/plugins/imei.mdx @@ -0,0 +1,75 @@ +--- +title: IMEI plugin +description: Use the IMEI plugin to read a device's IMEI. +slug: en/sdk/unity/plugins/imei +--- + + + +This plugin is intended only for apps that don't target the Google Play Store. + + + +Mobile devices come with an IMEI (International Mobile Equipment Identity) and a MEID (Mobile Equipment Identifier). You can use an Android device's IMEI and MEID for attribution in certain markets. To use this feature, you first need to complete the required steps in your Adjust dashboard. Once you have completed the steps, you can use this plugin. + +The IMEI plugin provides the IMEI and MEID values of a device. The SDK will continue to use other identifiers as well as the IMEI and MEID. + +Before you use this plugin, make sure to follow the [get started guide](/en/sdk/unity/index) and integrate the Adjust SDK into your app. + +## Add the plugin to your app + +To use the IMEI plugin, you need to add it to your project. There are two ways to add the plugin: + +- [Download the JAR from Adjust's GitHub releases page](https://github.com/adjust/android_sdk/releases). +- Add the dependency to your `build.gradle` file. + +```groovy title="build.gradle" +dependencies { + implementation 'com.adjust.sdk:adjust-android:4.36.0' + implementation 'com.adjust.sdk:adjust-android-imei:4.36.0' +} +``` + +## Add permissions + +Ensure the following permission is present in your `AndroidManifest.xml` file. Add it if it's not. + +```xml title="AndroidManifest.xml" + +``` + + + +As of Android 6.0 you may need to [request app permission](https://developer.android.com/training/permissions/requesting). This isn't required if the OS has been set up to not require app permissions. + + + +## Update Proguard settings + +If your app doesn't target the Google Play Store, you don't need to add all the rules set out in the get started guide. You can remove rules related to Google Play Services and install referrer libraries. You only need to keep the rules that apply to the Adjust SDK. + +```java title="proguard.pro" +-keep public class com.adjust.sdk.** { *; } +``` + +## Use the plugin + + + +The IMEI and MEID are persistent identifiers. You are responsible for ensuring that your collection and processing of this data is lawful. + + + +Once you've set up the plugin, you can gather the device's IMEI and MEID. To do this, call the `AdjustImei.readImei` method before starting the Adjust SDK. + +```c# +AdjustImei.ReadImei(); +// ... +Adjust.start(config); +``` + +If you want to prevent the SDK from reading the IMEI and MEID, call the `AdjustImei.doNotReadImei` method. + +```c# +AdjustImei.doNotReadImei(); +``` diff --git a/src/content/docs/en/sdk/unity/plugins/index.mdx b/src/content/docs/en/sdk/unity/plugins/index.mdx new file mode 100644 index 000000000..f0f1227b5 --- /dev/null +++ b/src/content/docs/en/sdk/unity/plugins/index.mdx @@ -0,0 +1,8 @@ +--- +title: Third-party plugins +description: Use third-party plugins to pass information from third-party SDKs to Adjust. +category-title: Plugins +slug: en/sdk/unity/plugins/index +--- + +Use plugins to pass information to third-party plugins. diff --git a/src/content/docs/en/sdk/unity/plugins/oaid.mdx b/src/content/docs/en/sdk/unity/plugins/oaid.mdx new file mode 100644 index 000000000..44d16e916 --- /dev/null +++ b/src/content/docs/en/sdk/unity/plugins/oaid.mdx @@ -0,0 +1,114 @@ +--- +title: OAID plugin +description: Use the OAID plugin to read a device's OAID. +slug: en/sdk/unity/plugins/oaid +--- + +The OAID (Open Anonymous Device Identifier) is a unique identifier for Android devices. The MSA (Mobile Security Alliance) recommends all Chinese-manufactured devices provide an OAID. You can use the OAID to attribute and track devices where Google Play Services isn't available. + +The OAID plugin provides the OAID of a device. The SDK will continue to use other identifiers as well as the OAID. The OAID is readable on all devices using the MSA SDK or HMS (Huawei Mobile Service) Core SDK on Huawei devices. + +## Add the plugin to your app + +### Install standalone binary + +You can also add the plugin as a standalone binary from the [releases page](https://github.com/adjust/android_sdk/releases). + +### Use the plugin as a Prefab + + + +You need to load the Adjust OAID Prefab **before** the Adjust Prefab. This ensures the plugin reads the instructions before the SDK initializes. + + + +You can load the OAID plugin as a [Prefab](https://docs.unity3d.com/Manual/Prefabs.html) on Unity apps. The standalone binary includes a Prefab folder containing this information. + +To load the OAID plugin as a Prefab: + +1. Locate the Prefab in the `AdjustOaid/Prefab` folder. +2. Untick the Start Manually option. +3. Tick the Read Oaid option. + +## Add the MSA SDK to your app + + + +You don't need to add the MSA SDK to read the OAID value on Huawei devices. The OAID plugin can use the HMS Core SDK for this. + + + +### Requirements + + + +| MSA SDK version | Adjust OAID plugin version | +| --------------- | -------------------------- | +| v1.0.10+ | v4.19.0+ | +| v1.0.12+ | v4.22.0+ | +| v1.0.13+ | v4.23.0+ | +| v1.0.23+ | v4.24.1+ | +| v1.0.25+ | v4.27.0+ | +| v1.0.26+ | v4.28.4+ | +| v1.1.0+ | v4.28.9+ | +| v2.0.0+ | v4.33.0+ | + +
+ +To enable the OAID plugin to read OAID values from the MSA SDK, you need to add it to your project. To do this: + +1. Copy the MSA SDK (AAR file) to the `libs` directory of your project and set the dependency. +2. Copy the `supplierconfig.json` file to the `assets` directory of your project. +3. You can find the MSA SDK and detailed instructions at the [MSA website](http://www.msa-alliance.cn/col.jsp?id=120). + +## Add the HMS Core SDK to your app + +You can use the HMS Core SDK to access the OAID of Huawei devices. To enable the Adjust OAID plugin to read values from the HMS Core SDK, update your `build.gradle` as follows: + +1. Add the Huawei maven repository. + +```groovy title="build.gradle" +repositories { + maven { + url "https://developer.huawei.com/repo/" + } +} +``` + +2. Add the HMS Core SDK. + +```groovy title="build.gradle" +dependencies { + implementation 'com.huawei.hms:ads-identifier:3.4.62.300' +} +``` + +## Proguard settings + +If your app isn't targeting the Google Play Store, you don't need to add all the rules set out in the Android get started guide. You can remove rules related to Google Play Services and install referrer libraries. You only need to keep the rules that apply to the Adjust SDK. + +```java title="proguard.pro" +-keep public class com.adjust.sdk.** { *; } +``` + +If you are adding the MSA SDK AAR as a dependency, add the following rules: + +```java title="proguard.pro" +-keep class com.bun.miitmdid.core.** { *; } +``` + +## Use the plugin + +Once you have set up the plugin, you can gather the device's OAID. To do this, call the `AdjustOaid.readOaid(applicationContext)` method before starting the Adjust SDK. + +```c# +AdjustOaid.ReadOaid(); +// ... +Adjust.start(config); +``` + +If you want to prevent the SDK from reading the OAID, call the `AdjustOaid.doNotReadOaid()` method. + +```c# +AdjustOaid.DoNotReadOaid(); +``` diff --git a/src/content/docs/en/sdk/unity/reference/adjust/config.mdx b/src/content/docs/en/sdk/unity/reference/adjust/config.mdx new file mode 100644 index 000000000..c8718b7ab --- /dev/null +++ b/src/content/docs/en/sdk/unity/reference/adjust/config.mdx @@ -0,0 +1,131 @@ +--- +title: Configuration methods +description: Use these methods to update the Adjust SDK's configuration. +slug: en/sdk/unity/reference/adjust/config +--- + +Use these methods to update the Adjust SDK's configuration. + + + +Enable or disable the Adjust SDK. The SDK doesn't send any information while disabled. + + + +import SetEnabled from "@unity-fragments/Adjust/_setEnabled.mdx" + + + + + + + +`enabled` (bool) +: Whether the SDK is enabled. + + + + + + + +Call this method to check whether the Adjust SDK is enabled. + + + +import IsEnabled from "@ios-fragments/Adjust/_isEnabled.mdx" + + + + + + + +`enabled` (bool) +: Whether the SDK is enabled. + + + + + + + + + +This method has an effect only if you delay the start of the Adjust SDK. + + + +The Adjust SDK sends information to Adjust's servers as soon as it starts. If you delay the start of the SDK, you can use this method to send packages before the delay ends. + + + +import SendFirstPackages from "@unity-fragments/Adjust/_sendFirstPackages.mdx" + + + + + + + + + +Controls whether the SDK is in offline mode. When in offline mode, the SDK queues all events in a file until offline mode is disabled. When offline mode is disabled, the SDK sends all queued events. + + + +import SetOfflineMode from "@unity-fragments/Adjust/_setOfflineMode.mdx" + + + + + + + +`enabled` (bool) +: Whether the SDK is in offline mode. + + + + + + + +Set your [push token](https://help.adjust.com/en/article/push-notifications) to record [uninstalls and reattributions](https://help.adjust.com/en/article/uninstalls-reinstalls). You can update this value at any time. + + + +import SetDeviceToken from "@unity-fragments/Adjust/_setDeviceToken.mdx" + + + + + + + +`deviceToken` (string) +: Your push token. + + + + diff --git a/src/content/docs/en/sdk/unity/reference/adjust/device-info.mdx b/src/content/docs/en/sdk/unity/reference/adjust/device-info.mdx new file mode 100644 index 000000000..e5a7e2051 --- /dev/null +++ b/src/content/docs/en/sdk/unity/reference/adjust/device-info.mdx @@ -0,0 +1,114 @@ +--- +title: Device information methods +description: Use these methods to retrieve device information. +slug: en/sdk/unity/reference/adjust/device-info +sidebar-position: 2 +--- + +Use these methods to retrieve device information. + + + + + +The ADID is available only after the install has been recorded. + + + +Returns the ADID (Adjust Device ID) associated with the device. + + + +import GetAdid from "@unity-fragments/Adjust/_getAdid.mdx" + + + + + + + +`adid` (string) +: The Adjust identifier associated with the device + + + + + + + +Returns the IDFA (ID for advertisers) associated with the device. + + + +import GetIdfa from "@unity-fragments/Adjust/_getIdfa.mdx" + + + + + + + +`idfa` (string) +: The IDFA associated with the device + + + + + + + +Returns the Google ADID (Google advertiser ID) associated with the device. + + + +import GetGoogleAdid from "@unity-fragments/Adjust/_getGoogleAdId.mdx" + + + + + + + +`googleAdid` (string) +: The Google ADID associated with the device + + + + + + + +Returns the Amazon ADID (Amazon advertiser ID) associated with the device. + + + +import GetAmazonAdid from "@unity-fragments/Adjust/_getAmazonAdId.mdx" + + + + + + + +`amazonAdId` (string) +: The Amazon ADID associated with the device + + + + diff --git a/src/content/docs/en/sdk/unity/reference/adjust/index.mdx b/src/content/docs/en/sdk/unity/reference/adjust/index.mdx new file mode 100644 index 000000000..400449e15 --- /dev/null +++ b/src/content/docs/en/sdk/unity/reference/adjust/index.mdx @@ -0,0 +1,8 @@ +--- +title: Adjust class +description: Use the Adjust class send information about your application and users to Adjust +category-title: Adjust class +slug: en/sdk/unity/reference/adjust +--- + +The Adjust class can be used to send information about your application and users to Adjust. This can be used for attribution as well as recording events for analytics. diff --git a/src/content/docs/en/sdk/unity/reference/adjust/privacy.mdx b/src/content/docs/en/sdk/unity/reference/adjust/privacy.mdx new file mode 100644 index 000000000..692e82530 --- /dev/null +++ b/src/content/docs/en/sdk/unity/reference/adjust/privacy.mdx @@ -0,0 +1,94 @@ +--- +title: Privacy methods +description: Use these methods to handle user privacy in your app. +slug: en/sdk/unity/reference/adjust/privacy +sidebar-position: 3 +--- + +Use these methods to handle user privacy in your app. + + + +Disable sharing of information with third parties for all users. + + + +import DisableThirdPartySharing from "@unity-fragments/Adjust/_disableThirdPartySharing.mdx" + + + + + + + + + +Disable or enable sharing of information with third parties on a per-user basis. Accepts a third party sharing object initialized with a **boolean** value. + + + +import TrackThirdPartySharing from "@unity-fragments/Adjust/_trackThirdPartySharing.mdx" + + + + + + + +`thirdPartySharing` (AdjustThirdPartySharing) +: The third party sharing object + + + + + + + +Set whether [data collection and retention rules](https://help.adjust.com/en/article/manage-data-collection-and-retention) apply to a user. + + + +import TrackMeasurementConsent from "@unity-fragments/Adjust/_trackMeasurementConsent.mdx" + + + + + + + +`enabled` (bool) +: Whether data collection and retention rules apply for the user. + + + + + + + +Send an RTBF (Right To Be Forgotten) request to Adjust's servers. This erases all information about the user the source app. The SDK stops sending requests for the user. + + + +import GdprForgetMe from "@unity-fragments/Adjust/_gdprForgetMe.mdx" + + + + + + diff --git a/src/content/docs/en/sdk/unity/reference/adjust/recording.mdx b/src/content/docs/en/sdk/unity/reference/adjust/recording.mdx new file mode 100644 index 000000000..8556092fd --- /dev/null +++ b/src/content/docs/en/sdk/unity/reference/adjust/recording.mdx @@ -0,0 +1,275 @@ +--- +title: Recording methods +description: Use these methods to send information about your app to Adjust. +slug: en/sdk/unity/reference/adjust/recording +sidebar-position: 4 +--- + +Use these methods to send information about your app to Adjust. + + + +Record event information using an `Adjust` object and an [Adjust event token](https://help.adjust.com/en/article/basic-event-setup#create-an-event-token). + + + +import TrackEvent from "@unity-fragments/Adjust/_trackEvent.mdx" + + + + + + + +`event` (AdjustEvent) +: An event object containing the information you want to send to Adjust. + + + + + + + +Adds callback parameters to send with each session recorded by the Adjust SDK. You can add extra parameters by calling on this method multiple times. + + + +import AddSessionCallbackParameter from "@unity-fragments/Adjust/_addSessionCallbackParameter.mdx" + + + + + + + +`key` (string) +: The data key + +`value` (string) +: The data value + + + + + + + +Remove a session callback parameter. + + + +import RemoveSessionCallbackParameter from "@unity-fragments/Adjust/_removeSessionCallbackParameter.mdx" + + + + + + + +`key` (string) +: The data key of the parameter you want to remove. + + + + + + + +Removes all session callback parameters. + + + +import ResetSessionCallbackParameters from "@unity-fragments/Adjust/_resetSessionCallbackParameters.mdx" + + + + + + + + + +Adds partner parameters to send with each session recorded by the Adjust SDK. You can add extra parameters by calling on this method multiple times. + + + +import AddSessionPartnerParameter from "@unity-fragments/Adjust/_addSessionPartnerParameter.mdx" + + + + + + + +`key` (string) +: The data key + +`value` (string) +: The data value + + + + + + + +Remove a session partner parameter. + + + +import RemoveSessionPartnerParameter from "@unity-fragments/Adjust/_removeSessionPartnerParameter.mdx" + + + + + + + +`key` (string) +: The data key of the parameter you want to remove. + + + + + + + +Removes all session partner parameters. + + + +import ResetSessionPartnerParameters from "@unity-fragments/Adjust/_resetSessionPartnerParameters.mdx" + + + + + + + + + +Record the details of an AdjustAdRevenue object. + + + +import TrackAdRevenue from "@unity-fragments/Adjust/_trackAdRevenue.mdx" + + + + + + + +`adRevenue` (AdjustAdRevenue) +: The ad revenue object containing the revenue details. + + + + + + + +Record a Play Store subscription object. + + + +import TrackPlayStoreSubscription from "@unity-fragments/Adjust/_trackPlayStoreSubscription.mdx" + + + + + + + +`subscription` (AdjustPlayStoreSubscription) +: The subscription object containing the purchase details. + + + + + + + +Record an App Store subscription object. + + + +import TrackAppStoreSubscription from "@unity-fragments/Adjust/_trackAppStoreSubscription.mdx" + + + + + + + +`subscription` (AdjustAppStoreSubscription) +: The subscription object containing the purchase details. + + + + + + + +Fetches attribution data about the device. + + + +import GetAttribution from "@unity-fragments/Adjust/_getAttribution.mdx" + + + + + + + +`attribution` (AdjustAttribution) +: An attribution object containing attribution data associated with the device. + + + + diff --git a/src/content/docs/en/sdk/unity/reference/adjust/skan-att.mdx b/src/content/docs/en/sdk/unity/reference/adjust/skan-att.mdx new file mode 100644 index 000000000..911b8202e --- /dev/null +++ b/src/content/docs/en/sdk/unity/reference/adjust/skan-att.mdx @@ -0,0 +1,101 @@ +--- +title: SKAdNetwork and ATT methods +description: Use these methods to send information about your app to Adjust. +slug: en/sdk/unity/reference/adjust/skan-att +sidebar-position: 5 +--- + +Use these methods to manage your [SKAdNetwork](https://help.adjust.com/en/article/skadnetwork) and [App Tracking Transparency](https://help.adjust.com/en/article/app-tracking-transparency-att-framework) logic. + + + +Receives the user's authorization status from the ATT prompt and passes it to a completion function. + + + +import RequestTrackingAuthorization from "@unity-fragments/Adjust/_requestTrackingAuthorization.mdx" + + + + + + + +`statusCallback` (Action\) +: Completion handler to which the status is passed. + + + + + + + +Retrieves the user's current authorization status. + + + +import GetAppTrackingAuthorizationStatus from "@unity-fragments/Adjust/_appTrackingAuthorizationStatus.mdx" + + + + + + + +`status` (int) +: The user's authorization status. + + + + + + + +Prompts the SDK to check the current state of `att_status`. + + + +import CheckForNewAttStatus from "@unity-fragments/Adjust/_checkForNewAttStatus.mdx" + + + + + + + + + +Updates the [conversion value](https://help.adjust.com/en/suite/article/conversion-hub). + + + +import UpdateConversionValue from "@unity-fragments/Adjust/_updateConversionValue.mdx" + + + + + + + +conversionValue (int) +: The new conversion value. + + + + diff --git a/src/content/docs/en/sdk/unity/reference/adjustadrevenue.mdx b/src/content/docs/en/sdk/unity/reference/adjustadrevenue.mdx new file mode 100644 index 000000000..81e9099e9 --- /dev/null +++ b/src/content/docs/en/sdk/unity/reference/adjustadrevenue.mdx @@ -0,0 +1,232 @@ +--- +title: AdjustAdRevenue class +description: Use this class to store ad revenue information. +category-title: AdjustAdRevenue class +slug: en/sdk/unity/reference/adjustadrevenue +--- + +Use this class to store ad revenue information. + + + +Creates an ad revenue object initialized with an external ad revenue source. + + + +import Constructor from "@unity-fragments/AdjustAdRevenue/_constructor.mdx"; + + + + + + + +`source` (NSString) +: The source of the ad revenue. + + + +| Parameter | Source | +| ---------------------------------------------------- | ----------------- | +| `AdjustConfig.AdjustAdRevenueSourceAppLovinMAX` | AppLovin MAX | +| `AdjustConfig.AdjustAdRevenueSourceMopub` | Mopub | +| `AdjustConfig.AdjustAdRevenueSourceAdMob` | AdMob | +| `AdjustConfig.AdjustAdRevenueSourceIronSource` | ironSource | +| `AdjustConfig.AdjustAdRevenueSourceAdmost` | AdMost | +| `AdjustConfig.AdjustAdRevenueSourceUnity` | Unity | +| `AdjustConfig.AdjustAdRevenueSourceHeliumChartboost` | Helium Chartboost | +| `AdjustConfig.AdjustAdRevenueSourcePublisher` | Generic source | + +
+ +
+ +
+ + + +Set the revenue amount associated with the ad revenue object. + + + +import SetRevenue from "@unity-fragments/AdjustAdRevenue/_setRevenue.mdx" + + + + + + + +`amount` (double) +: The amount of currency units associated with the ad. + +`currency` (string) +: The 3 character [ISO 4217 code](https://www.iban.com/currency-codes) of the currency unit. + + + + + + + +Sets the number of impressions received for an ad. + + + +import SetAdImpressionsCount from "@unity-fragments/AdjustAdRevenue/_setAdImpressionsCount.mdx" + + + + + + + +`adImpressionsCaount` (int) +: The number of impressions associated with the ad. + + + + + + + +Sets the network associated with the ad revenue. + + + +import SetAdRevenueNetwork from "@unity-fragments/AdjustAdRevenue/_setAdRevenueNetwork.mdx" + + + + + + + +`adRevenueNetwork` (string) +: The network associated with the ad revenue. + + + + + + + +Sets the ad unit ID associated with the ad revenue. + + + +import SetAdRevenueUnit from "@unity-fragments/AdjustAdRevenue/_setAdRevenueUnit.mdx" + + + + + + + +`unit` (string) +: The ad unit ID associated with the ad revenue. + + + + + + + +Sets the placement of the ad associated with the ad revenue. + + + +import SetAdRevenuePlacement from "@unity-fragments/AdjustAdRevenue/_setAdRevenuePlacement.mdx" + + + + + + + +`adRevenuePlacement` (string) +: The placement of the ad associated with the revenue. + + + + + + + +Adds key-value information to send to your callback URL. + + + +import AddCallbackParameter from "@unity-fragments/AdjustAdRevenue/_addCallbackParameter.mdx" + + + + + + + +`key` (string) +: The data key. + +`value` (string) +: The data value. + + + + + + + +Adds key-value information to share with partners. + + + +import AddPartnerParameter from "@unity-fragments/AdjustAdRevenue/_addPartnerParameter.mdx" + + + + + + + +`key` (string) +: The data key. + +`value` (string) +: The data value. + + + + diff --git a/src/content/docs/en/sdk/unity/reference/adjustappstoresubscription.mdx b/src/content/docs/en/sdk/unity/reference/adjustappstoresubscription.mdx new file mode 100644 index 000000000..1eb05366c --- /dev/null +++ b/src/content/docs/en/sdk/unity/reference/adjustappstoresubscription.mdx @@ -0,0 +1,148 @@ +--- +title: AdjustAppStoreSubscription class +description: Use this class to store App Store subscription information. +category-title: AdjustAppStoreSubscription class +slug: en/sdk/unity/reference/adjustappstoresubscription +--- + +Use this class to store App Store subscription information. You can pass this to Adjust's servers using the [`trackAppStoreSubscription` method](#unity-trackappstoresubscription-invocation). + + + +Instantiates a subscription object. + + + +import Constructor from "@unity-fragments/AdjustAppStoreSubscription/_adjustAppStoreSubscription.mdx" + + + + + + + +`price` (string) +: The price of the subscription. + +`currency` (string) +: The currency of the subscription. Formatted as the [`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` (string) +: Your ID for the transaction. + +`receipt` (string) +: The receipt information. + + + + + + + +Sets the date of the transaction in the subscription object. + + + +import SetTransactionDate from "@unity-fragments/AdjustAppStoreSubscription/_setTransactionDate.mdx" + + + + + + + +`transactionDate` (string) +: The date on which the subscription was purchased. + + + + + + + +You can record the region in which the user purchased a subscription. + + + +import SetSalesRegion from "@unity-fragments/AdjustAppStoreSubscription/_setSalesRegion.mdx" + + + + + + + +`salesRegion` (string) +: The region in which the subscription was purchased. + + + + + + + +Adds key-value callback parameters to the subscription object. You can add multiple parameters by calling this method multiple times. + + + +import AddCallbackParameter from "@unity-fragments/AdjustAppStoreSubscription/_addCallbackParameter.mdx" + + + + + + + +`key` (string) +: The data key. + +`value` (string) +: The data value. + + + + + + + +Adds key-value callback parameters to the subscription object. You can add multiple parameters by calling this method multiple times. + + + +import AddPartnerParameter from "@unity-fragments/AdjustAppStoreSubscription/_addPartnerParameter.mdx" + + + + + + + +`key` (string) +: The data key. + +`value` (string) +: The data value. + + + + diff --git a/src/content/docs/en/sdk/unity/reference/adjustattribution.mdx b/src/content/docs/en/sdk/unity/reference/adjustattribution.mdx new file mode 100644 index 000000000..34ff281ec --- /dev/null +++ b/src/content/docs/en/sdk/unity/reference/adjustattribution.mdx @@ -0,0 +1,41 @@ +--- +title: AdjustAttribution class +description: Use this class to see attribution information. +category-title: AdjustAttribution class +slug: en/sdk/unity/reference/adjustattribution +--- + +The `AdjustAttribution` class contains details about the current attribution status of the device. + +## Properties + +The following properties can be accessed by calling the [`attribution` method](#ios-attribution-invocation). Any values that aren't populated for the user are returned as a null value. + + + +The following values can only be accessed if the [`needsCost`](#ios-setneedscost-invocation) property on your `ADJConfig` instance is `true`: + +- `costType` +- `costAmount` +- `costCurrency` + + + + + +| Values | Data type | Description | +| ------------------- | --------- | ---------------------------------------------------------------------------------------------------------------- | +| `trackerToken` | String | The token of the tracker to which the device is currently attributed | +| `trackerName` | String | The name of the tracker to which the device is currently attributed | +| `network` | String | The name of the network to which the device is currently attributed | +| `campaign` | String | The name of the campaign to which the device is currently attributed | +| `adgroup` | String | The name of the adgroup to which the device is currently attributed | +| `creative` | String | The name of the creative to which the device is currently attributed | +| `clickLabel` | String | The [click label](https://help.adjust.com/en/article/user-rewards) that the install is tagged with | +| `adid` | String | The unique Adjust ID assigned to the device | +| `costType` | String | The campaign pricing model (for example cpi) | +| `costAmount` | Number | The cost of the install. | +| `costCurrency` | String | The [3 character ISO 4217 code](https://www.iban.com/currency-codes) of the currency associated with the cost. | +| `fbInstallReferrer` | String | The [Facebook install referrer](https://developers.facebook.com/docs/app-ads/install-referrer/). _Android only_. | + +
diff --git a/src/content/docs/en/sdk/unity/reference/adjustconfig/index.mdx b/src/content/docs/en/sdk/unity/reference/adjustconfig/index.mdx new file mode 100644 index 000000000..8b9a97eb3 --- /dev/null +++ b/src/content/docs/en/sdk/unity/reference/adjustconfig/index.mdx @@ -0,0 +1,53 @@ +--- +title: AdjustConfig class +description: Use the methods in this class to set up the Adjust SDK. +category-title: AdjustConfig class +slug: en/sdk/unity/reference/adjustconfig +--- + +Use the methods in this class to set up the Adjust SDK. + + + + +The methods in this class must be called **before** you initialize the SDK. + + + + + +Initialize the configuration object with your Adjust app token. + + + +import ConfigWithAppToken from "@unity-fragments/AdjustConfig/_constructor.mdx" + + + + + + + +`appToken` (string) +: Your Adjust app token. + +`environment` (AdjustEnvironment) +: The environment your app is running in. + +`allowSuppressLogLevel` (bool) +: Whether to allow all logging to be suppressed. + + + + + +`config` (AdjustConfig) +: A config object initialized with the provided params. + + + + diff --git a/src/content/docs/en/sdk/unity/reference/adjustconfig/privacy.mdx b/src/content/docs/en/sdk/unity/reference/adjustconfig/privacy.mdx new file mode 100644 index 000000000..ea56732c7 --- /dev/null +++ b/src/content/docs/en/sdk/unity/reference/adjustconfig/privacy.mdx @@ -0,0 +1,69 @@ +--- +title: Privacy methods +description: Configure these properties to set up privacy features in the Adjust SDK. +slug: en/sdk/unity/reference/adjustconfig/privacy +sidebar-position: 2 +--- + + + +Sets the country or region of data residency. If called with a `UrlStrategy` parameter, sets the country/region where data will be sent preferentially. + + + +import SetUrlStrategy from "@unity-fragments/AdjustConfig/_setUrlStrategy.mdx" + + + + + + + +`urlStrategy` (string) +: The data residency target (see available values below) + + + +| Value | Description | +| --- | --- | +| `AdjustDataResidencyEU` | Sets the area of data residency to the EU | +| `AdjustDataResidencyTR` | Sets the area of data residency to Turkey | +| `AdjustDataResidencyUS` | Sets the area of data residency to the USA | +| `AdjustUrlStrategyChina` | Points the URL strategy to the `app.adjust.world` domain | +| `AdjustUrlStrategyCn` | Points the URL strategy to the `app.adjust.cn` domain | +| `AdjustUrlStrategyIndia` | Points the URL strategy to the `app.adjust.net.in` domain | + +
+ +
+ +
+ + + +Enable COPPA (Children's Online Privacy Protection Act) compliance in your app. + + + +import SetCoppaCompliantEnabled from "@unity-fragments/AdjustConfig/_setCoppaCompliantEnabled.mdx" + + + + + + + +`coppaCompliantEnabled` (bool) +: Whether the app should be COPPA compliant. + + + + diff --git a/src/content/docs/en/sdk/unity/reference/adjustconfig/setup.mdx b/src/content/docs/en/sdk/unity/reference/adjustconfig/setup.mdx new file mode 100644 index 000000000..97b30bcf2 --- /dev/null +++ b/src/content/docs/en/sdk/unity/reference/adjustconfig/setup.mdx @@ -0,0 +1,508 @@ +--- +title: Setup methods +description: Configure these properties to set up the Adjust SDK. +slug: en/sdk/unity/reference/adjustconfig/setup +sidebar-position: 1 +--- + +Configure these properties to set up the Adjust SDK. + + + +Set the verbosity of logs you want to receive from the Adjust SDK. + + + +import SetLogLevel from "@unity-fragments/AdjustConfig/_setLogLevel.mdx"; + + + + + + + +`logLevel` (AdjustLogLevel) +: The level of logging output by the SDK. + + + +| Log level | Description | +| ------------------------- | ------------------------------------------ | +| `AdjustLogLevel.Verbose` | Enable all logging | +| `AdjustLogLevel.Debug` | Enable debug logging | +| `AdjustLogLevel.Info` | Only show info level logs (default option) | +| `AdjustLogLevel.Warn` | Disable info logging | +| `AdjustLogLevel.Error` | Disable warning level logging and below | +| `AdjustLogLevel.Assert` | Disable error level logging and below | +| `AdjustLogLevel.Suppress` | Suppress all logging | + +
+ +
+ +
+ + + +Add a description of the method or function here + + + +import SetLogDelegate from "@unity-fragments/AdjustConfig/_setLogDelegate.mdx" + + + + + + + +`logDelegate` (Action\) +: The delegate function or program that handles log output. + + + + + + + +Sets a default token to record installs against. + + + +import SetDefaultTracker from "@unity-fragments/AdjustConfig/_setDefaultTracker.mdx" + + + + + + + +`defaultTracker` (string) +: The token to which all preinstalled sessions are attributed. + + + + + + + +Sets whether the SDK should send data while the app is running in the background. + + + +import SetSendInBackground from "@unity-fragments/AdjustConfig/_sendInBackground.mdx" + + + + + + + +`sendInBackground` (bool) +: Whether the SDK should send information to Adjust when the app is running in the background. + + + + + + + +Sets up a success callback to trigger a function when the SDK records a session. + + + +import SetSessionSuccessDelegate from "@unity-fragments/AdjustConfig/_setSessionSuccessDelegate.mdx" + + + + + + + +`sessionSuccessDelegate` (Action\) +: The function to launch when the SDK successfully records a session. + + + + + + + +Sets up a callback to trigger a function when the SDK fails to record a session. + + + +import SetSessionFailureDelegate from "@unity-fragments/AdjustConfig/_setSessionFailureDelegate.mdx" + + + + + + + +`sessionFailureDelegate` (Action\) +: The function to launch when the SDK fails to record a session. + + + + + + + +Sets up a success callback to trigger a function when the SDK records an event. + + + +import SetEventSuccessDelegate from "@unity-fragments/AdjustConfig/_setEventSuccessDelegate.mdx" + + + + + + + +`eventSuccessDelegate` (Action\) +: The function to launch when the SDK successfully records an event. + + + + + + + +Sets up a callback to trigger a function when the SDK fails to record a session. + + + +import SetEventFailureDelegate from "@unity-fragments/AdjustConfig/_setEventFailureDelegate.mdx" + + + + + + + +`eventFailureDelegate` (Action\) +: The function to launch when the SDK fails to record an event. + + + + + + + +Sets a delay before the SDK starts to allow data to load before session information is sent to Adjust's servers. + + + +You can delay the start of the SDK by up to **10 seconds**. + + + + + +import SetDelayStart from "@unity-fragments/AdjustConfig/_setDelayStart.mdx" + + + + + + + +`delayStart` (double) +: The time (in seconds) to delay the start of the SDK by. + + + + + + + +Sets an external device identifier for reporting purposes. + + + +import SetExternalDeviceId from "@unity-fragments/AdjustConfig/_setExternalDeviceId.mdx" + + + + + + + +`externalDeviceId` (string) +: The external device ID associated with the device. + + + + + + + +Sets event buffering. If enabled, the SDK stores events on the device and sends all requests once per minute. + + + +import SetEventBufferingEnabled from "@unity-fragments/AdjustConfig/_setEventBufferingEnabled.mdx" + + + + + + + +`eventBufferingEnabled` (bool) +: Whether event buffering is enabled. + + + + + + + +Sets whether the SDK should gather cost data. This is accessible in the user's attribution information. + + + +import SetNeedsCost from "@unity-fragments/AdjustConfig/_setNeedsCost.mdx" + + + + + + + +`needsCost` (bool) +: Whether the SDK should gather cost data + + + + + + + +Sets a delegate function that fires when a user's attribution information updates. + + + +import SetAttributionChangedDelegate from "@unity-fragments/AdjustConfig/_setAttributionChangedDelegate.mdx" + + + + + + + +`attributionChangedDelegate` (Action\) +: The delegate function that the SDK calls when the user's attribution information changes. + + + + + + + +Enables or disables preinstall tracking. + + + +import SetPreinstallTrackingEnabled from "@unity-fragments/AdjustConfig/_setPreinstallTrackingEnabled.mdx" + + + + + + + +`preinstallTrackingEnabled` (bool) +: Whether preinstall tracking is enabled. + + + + + + + +Defines a relative path where preinstall information is available. + + + +This directory must be world-readable + + + + + +import SetPreinstallFilePath from "@unity-fragments/AdjustConfig/_setPreinstallFilePath.mdx" + + + + + + + +`preinstallFilePath` (string) +: The path where the preinstall information is written. + + + + + + + +Turns off communication with SKAdNetwork. + + + +SKAdNetwork communication is enabled by default. + + + + + +import DeactivateSKAdNetworkHandling from "@unity-fragments/AdjustConfig/_deactivateSKAdNetworkHandling.mdx" + + + + + + + + + +Enables or disables launching deferred deep links with the SDK. If enabled, the SDK launches deep links the user interacts with. + + + +import SetLaunchDeferredDeepLink from "@unity-fragments/AdjustConfig/_setLaunchDeferredDeeplink.mdx" + + + + + + + +`launchDeferredDeepLink` (bool) +: Whether to enable launching deferred deep links. + + + + + + + +Toggle support for Adjust's [LinkMe solution](https://help.adjust.com/en/article/linkme) for deep linking. + + + +import SetLinkMeEnabled from "@unity-fragments/AdjustConfig/_setLinkMeEnabled.mdx" + + + + + + + +`linkMeEnabled` (bool) +: Whether to enable LinkMe. + + + + + + + +Sets a delegate function to call when the user's conversion value updates. + + + +import SetConversionValueUpdatedDelegate from "@unity-fragments/AdjustConfig/_setConversionValueUpdatedDelegate.mdx" + + + + + + + +`conversionValueUpdatedDelegate` (Action\) +: The delegate function the SDK launches when the conversion value updates + + + + diff --git a/src/content/docs/en/sdk/unity/reference/adjustevent.mdx b/src/content/docs/en/sdk/unity/reference/adjustevent.mdx new file mode 100644 index 000000000..9371aa644 --- /dev/null +++ b/src/content/docs/en/sdk/unity/reference/adjustevent.mdx @@ -0,0 +1,167 @@ +--- +title: AdjustEvent class +description: Record information about events to send to Adjust. +category-title: AdjustEvent class +slug: en/sdk/unity/reference/adjustevent +--- + +This class contains information about events triggered in your application. You can send this information to Adjust's servers by passing an `AdjustEvent` object to the [`trackEvent` method](#ios-trackevent-invocation). + + + +Instantiates an event object with an Adjust event token. + + + +import Constructor from "@unity-fragments/AdjustEvent/_constructor.mdx" + + + + + + + +`eventToken` (string) +: A 6 character Adjust event token. + + + + + + + +Sets the revenue and currency associated with an event. + + + +import SetRevenue from "@unity-fragments/AdjustEvent/_setRevenue.mdx" + + + + + + + +`amount` (double) +: The amount of currency units associated with the event. + +`currency` (string) +: The 3 character [ISO 4217 code](https://www.iban.com/currency-codes) of the currency unit. + + + + + + + +Sets a deduplication ID on your event to avoid recording duplicates. The SDK stores the last ten identifiers and skips revenue events with duplicate IDs. + + + +import SetTransactionId from "@unity-fragments/AdjustEvent/_setTransactionId.mdx" + + + + + + + +`transactionId` (string) +: A unique identifier used to deduplicate events. + + + + + + + +Sets a custom identifier for your event object. Adjust's servers can report on this identifier in event callbacks. + + + +import SetCallbackId from "@unity-fragments/AdjustEvent/_setCallbackId.mdx" + + + + + + + +`callbackId` (string) +: A custom identifier for your event object. + + + + + + + +Adds key-value information to send to your callback URL. + + + +import AddCallbackParameter from "@unity-fragments/AdjustEvent/_addCallbackParameter.mdx" + + + + + + + +`key` (string) +: The data key. + +`value` (string) +: The data value. + + + + + + + +Adds key-value information to share with partners. + + + +import AddPartnerParameter from "@unity-fragments/AdjustEvent/_addPartnerParameter.mdx" + + + + + + + +`key` (string) +: The data key. + +`value` (string) +: The data value. + + + + diff --git a/src/content/docs/en/sdk/unity/reference/adjustplaystoresubscription.mdx b/src/content/docs/en/sdk/unity/reference/adjustplaystoresubscription.mdx new file mode 100644 index 000000000..0f2fb83b2 --- /dev/null +++ b/src/content/docs/en/sdk/unity/reference/adjustplaystoresubscription.mdx @@ -0,0 +1,129 @@ +--- +title: AdjustPlayStoreSubscription class +description: Use this class to store Play Store subscription information. +category-title: AdjustPlayStoreSubscription class +slug: en/sdk/unity/reference/adjustplaystoresubscription +--- + +Use this class to store Play Store subscription information. You can pass this to Adjust's servers using the [`trackPlayStoreSubscription` method](#unity-trackplaystoresubscription-invocation). + + + +Instantiates a subscription object. + + + +import Constructor from "@unity-fragments/AdjustPlayStoreSubscription/_adjustPlayStoreSubscription.mdx" + + + + + + + +`price` (string) +: The price of the subscription. + +`currency` (string) +: The currency of the subscription. Formatted as the [`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 + +`sku` (string) +: The ID of the product. + +`orderId` (string) +: Your ID for the transaction. + +`signature` (string) +: The signature of the purchase data. + +`purchaseToken` (string) +: The unique token of the transaction. See [Google's documentation](https://developer.android.com/reference/com/android/billingclient/api/Purchase#getPurchaseToken()) for more information. + + + + + + + +Sets the date of the transaction in the subscription object. + + + +import SetPurchaseTime from "@unity-fragments/AdjustPlayStoreSubscription/_setPurchaseTime.mdx" + + + + + + + +`purchaseTime` (string) +: The date on which the subscription was purchased. + + + + + + + +Adds key-value callback parameters to the subscription object. You can add multiple parameters by calling this method multiple times. + + + +import AddCallbackParameter from "@unity-fragments/AdjustPlayStoreSubscription/_addCallbackParameter.mdx" + + + + + + + +`key` (string) +: The data key. + +`value` (string) +: The data value. + + + + + + + +Adds key-value callback parameters to the subscription object. You can add multiple parameters by calling this method multiple times. + + + +import AddPartnerParameter from "@unity-fragments/AdjustPlayStoreSubscription/_addPartnerParameter.mdx" + + + + + + + +`key` (string) +: The data key. + +`value` (string) +: The data value. + + + + diff --git a/src/content/docs/en/sdk/unity/reference/adjustthirdpartysharing.mdx b/src/content/docs/en/sdk/unity/reference/adjustthirdpartysharing.mdx new file mode 100644 index 000000000..9330f347f --- /dev/null +++ b/src/content/docs/en/sdk/unity/reference/adjustthirdpartysharing.mdx @@ -0,0 +1,133 @@ +--- +title: AdjustThirdPartySharing class +description: Use this class to communicate a user's third party sharing preferences. +category-title: AdjustThirdPartySharing class +slug: en/sdk/unity/reference/adjustthirdpartysharing +--- + +Use this class to communicate a user's third party sharing preferences. Send this information to Adjust's servers using the [`trackThirdPartySharing` method](#ios-trackthirdpartysharing-invocation). + + + +Creates a third party sharing object initialized with a **nullable boolean** value. + + + +import InitTrue from "@unity-fragments/AdjustThirdPartySharing/_initTrue.mdx"; + + + + + + + +`isEnabled` (bool) +: Whether third party sharing is enabled. + + + + + + + +Adds additional key-value pairs of information to share with third parties. You can add multiple parameters by calling this method multiple times. + + + +import AddGranularOption from "@unity-fragments/AdjustThirdPartySharing/_addGranularOption.mdx"; + + + +You can use this method to toggle Facebook data processing options. + +import Facebook from "@unity-fragments/AdjustThirdPartySharing/_addGranularOptionFacebook.mdx"; + + + + + +- - Parameter + - Description +- - `partner_name` + - Use `facebook` to toggle LDU. +- - `data_processing_options_country` + - The user is located in. + - `0`: Request that Facebook use geolocation. + - `1`: United States of America. +- - `data_processing_options_state` + - Notifies Facebook which state the user is located in. + - `0`: Request that Facebook use geolocation. + - `1000`: California. + +
+ +
+ + + +`partnerName` (string) +: The name of the partner you want to share information with. + +`key` (string) +: The data key. + +`value` (string) +: The data value. + + + +
+ + + +Adds additional key-value pairs of settings to share with third parties. You can add multiple settings by calling this method multiple times. + + + +import AddPartnerSharingSetting from "@unity-fragments/AdjustThirdPartySharing/_addPartnerSharingSetting.mdx"; + + + + + + + +`partnerName` (string) +: The name of the partner whose settings you want to update. See the table of available partners below. +`key` (string) +: The setting you want to update. +`value` (bool) +: Whether the setting is enabled. + + + +| Partner name | String value | +| ----------------------- | --------------------------- | +| AppleAds | `apple_ads` | +| Facebook | `facebook` | +| GoogleAds | `adwords` | +| GoogleMarketingPlatform | `google_marketing_platform` | +| Snapchat | `snapchat` | +| Tencent | `tencent` | +| TikTokSan | `tiktok_san` | +| Twitter | `twitter` | +| YahooGemini | `yahoo_gemini` | +| YahooJapanSearch | `yahoo_japan_search` | + +
+ +
+ +
diff --git a/src/content/docs/en/sdk/unity/reference/index.mdx b/src/content/docs/en/sdk/unity/reference/index.mdx new file mode 100644 index 000000000..4eef7bf5a --- /dev/null +++ b/src/content/docs/en/sdk/unity/reference/index.mdx @@ -0,0 +1,6 @@ +--- +title: SDK reference +description: SDK reference information for the Unity SDK +category-title: Reference +slug: en/sdk/unity/reference/index +--- diff --git a/tsconfig.json b/tsconfig.json index 09d084741..02e3f3f68 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,6 +15,9 @@ "@i18n/*": ["src/i18n/*"], "@ios-fragments/*": [ "src/content/docs/code-snippets/ios/*" + ], + "@unity-fragments/*": [ + "src/content/docs/code-snippets/unity/*" ] } }