From e9d16b83b3f54934ea3de448b4fcc70a4f3a48b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Fri, 20 Sep 2024 12:17:32 +0200 Subject: [PATCH 01/59] Add Cocos-2dx migration guide --- .../docs/sdk/migration/cocos2dx/index.mdx | 7 + .../docs/sdk/migration/cocos2dx/v4-to-v5.mdx | 730 ++++++++++++++++++ 2 files changed, 737 insertions(+) create mode 100644 src/content/docs/sdk/migration/cocos2dx/index.mdx create mode 100644 src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdx diff --git a/src/content/docs/sdk/migration/cocos2dx/index.mdx b/src/content/docs/sdk/migration/cocos2dx/index.mdx new file mode 100644 index 000000000..301861677 --- /dev/null +++ b/src/content/docs/sdk/migration/cocos2dx/index.mdx @@ -0,0 +1,7 @@ +--- +title: Cocos2d-x +description: Follow these guides to migrate between SDK versions +slug: en/sdk/migration/cocos2dx +sidebar-position: 6 +type: category +--- diff --git a/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdx b/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdx new file mode 100644 index 000000000..e36dfdeee --- /dev/null +++ b/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdx @@ -0,0 +1,730 @@ +--- +title: SDK v5 migration guide +description: Follow this guide to upgrade from SDK v4 to SDK v5 +slug: en/sdk/migration/cocos2dx/v4-to-v5 +sidebar-position: 1 +--- + +## Before you begin {#before-you-begin} + +Here's what you need to do before updating to SDK v5: + +1. SDK v5 supports [SDK signature verification](https://help.adjust.com/en/article/sdk-signature) natively. If you currently use the SDK signature library, you need to remove the signature library from your app first. +2. The minimum supported API versions for SDK v5 have been updated. If your app targets a lower version, you need to update it first. + + - iOS: **12.0** + - Android: **21** + +## Install the SDK {#install-the-sdk} + +To start using SDK v5, you need to add it as a dependency in your project. To do this: + +1. Download the SDK archive [from GitHub](https://github.com/adjust/cocos2dx_sdk/releases) +2. Copy the C++ files from the `dist` directory and add them to your Cocos2d-x project +3. (**Android only**): add the paths of the C++ files to the `LOCAL_SRC_FILES` section of your `Android.mk` file. + + + + ```text + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustConfig2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustAttribution2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustProxy2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustEvent2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/Adjust2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustEventFailure2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustEventSuccess2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustSessionFailure2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustSessionSuccess2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustAppStoreSubscription2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustPlayStoreSubscription2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustThirdPartySharing2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustAdRevenue2dx.cpp + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustAppStorePurchase2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustPlayStorePurchase2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustDeeplink2dx.cpp \ + ``` + + + +4. (**Android only**): add the Adjust Android SDK to your project using Maven. + + + + ```groovy + dependencies { + implementation 'com.adjust.sdk:adjust-android:5.0.0' + } + ``` + + + +## Update the initialization method {#update-the-init-method} + + + +In SDK v4, the initialization method is `Adjust2dx::start(adjustConfig)`. This has been changed to `Adjust2dx::initSdk(adjustConfig)`. + + + +```cpp +#include "Adjust/Adjust2dx.h" + +std::string appToken = "YourAppToken"; +std::string environment = AdjustEnvironmentSandbox2dx; + +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); +- Adjust2dx::start(adjustConfig); ++ Adjust2dx::initSdk(adjustConfig); +``` + + + +## Changed APIs {#changed-apis} + + + +The following APIs have been changed in SDK v5. + +### Disable and enable the SDK {#disable-enable-sdk} + +In SDK v4, you can enable and disable the SDK by calling `Adjust2dx::setEnabled` with a `boolean` value. + +```cpp +Adjust2dx::setEnabled(false); // disable SDK +Adjust2dx::setEnabled(true); // enable SDK +``` + +In SDK v5, this feature is split into separate commands for clarity. + +- Call `Adjust2dx::disable()` to disable the SDK. +- Call `Adjust2dx::enable()` to enable the SDK. + +```cpp +Adjust2dx::disable(); +Adjust2dx::enable(); +``` + +### Send information in background {#send-in-background} + +In SDK v4, you can set the `sendInBackground` property on your `adjustConfig` instance to `true` to enable the SDK to send information to Adjust while your app is running in the background. + +```cpp +adjustConfig.sendInBackground(true); +``` + +In SDK v5, you need to call the `enableSendingInBackground` method of your `adjustConfig` instance to enable the SDK to send information to Adjust while your app is running in the background. + +```cpp +adjustConfig.enableSendingInBackground(); +``` + +### Preinstalled app measurement {#preinstalled-app} + +In SDK v4, you can call the `setPreinstallTrackingEnabled` method of your `adjustConfig` instance with a `true` argument to enable measuring preinstalled apps. + +```cpp +adjustConfig.setPreinstallTrackingEnabled(true); +``` + +In SDK v5, you need to call the `enablePreinstallTracking` method of your `adjustConfig` instance to enable measuring preinstalled apps. + +```cpp +adjustConfig.enablePreinstallTracking(); +``` + +### Disable AdServices information reading {#disable-adservices} + +In SDK v4, you can call the `setAllowAdServicesInfoReading` method on your `adjustConfig` with the value `false` to prevent the Adjust SDK from reading AdServices information. + +```cpp +adjustConfig.setAllowAdServicesInfoReading(false); +``` + +In SDK v5, you need to call the `disableAdServices` method on your `adjustConfig` instance to prevent the Adjust SDK from reading AdServices information. The default state is `true`. + +```cpp +adjustConfig.disableAdServices(); +``` + +### Disable IDFA reading {#disable-idfa} + +In SDK v4, you can call the `setAllowIdfaReading` method on your `adjustConfig` with the value `false` to prevent the Adjust SDK from reading the device's IDFA. + +```cpp +adjustConfig.setAllowIdfaReading(false); +``` + +In SDK v5, you need to call the `disableIdfaReading` method on your `adjustConfig` instance to prevent the Adjust SDK from reading the device's IDFA. The default state is `true`. + +```cpp +adjustConfig.disableIdfaReading(); +``` + +### Enable cost data in attribution {#enable-cost-data} + +In SDK v4, you can call the `setNeedsCost` method on your `adjustConfig` instance with the value `true` to enable cost data in the device's attribution information. + +```cpp +adjustConfig.setNeedsCost(true); +``` + +In SDK v5, you need to call the `enableCostDataInAttribution` method on your `adjustConfig` instance to enable cost data in the device's attribution information. The default state is `false`. + +```cpp +adjustConfig.enableCostDataInAttribution(); +``` + +### Enable LinkMe {#enable-linkme} + +In SDK v4, you can call the `setLinkMeEnabled` method on your `adjustConfig` instance with the value `true` to enable [Adjust LinkMe](https://help.adjust.com/en/article/linkme). + +```cpp +adjustConfig.setLinkMeEnabled(true); +``` + +In SDK v5, you need to call the `enableLinkMe` method on your `adjustConfig` instance to enable [Adjust LinkMe](https://help.adjust.com/en/article/linkme). The default state is `false`. + +```cpp +adjustConfig.enableLinkMe(); +``` + +### Only read device IDs once {#read-device-id-once} + +In SDK v4, you can call the `setReadDeviceInfoOnceEnabled` method on your `adjustConfig` with the value `true` to instruct the SDK to only read device IDs once. + +```cpp +adjustConfig.setReadDeviceInfoOnceEnabled(true); +``` + +In SDK v5, you need to call the `enableDeviceIdsReadingOnce` method on your `adjustConfig` to instruct the SDK to only read device IDs once. The default state is `false`. + +```cpp +adjustConfig.enableDeviceIdsReadingOnce(); +``` + +### Offline mode {#offline-mode} + +In SDK v4, you can enable and disable offline mode the SDK by calling `Adjust2dx::setOfflineMode` with a `boolean` argument. + +```cpp +Adjust2dx::setOfflineMode(true); +Adjust2dx::setOfflineMode(false); +``` + +In SDK v5, this feature is split into separate commands for clarity. + +- Call `Adjust2dx::switchToOfflineMode` to set the SDK to offline mode. +- Call `Adjust2dx::switchBackToOnlineMode` to set the SDK back to online mode. + +```cpp +Adjust2dx::switchToOfflineMode(); // Put the SDK in offline mode +Adjust2dx::switchBackToOnlineMode(); // Put the SDK back in online mode +``` + +### Session callback parameters {#callback-params} + +In SDK v4, you can add session callback parameters by passing a key-value pair to the `Adjust2dx::addSessionCallbackParameter` method and remove individual parameters using the `Adjust2dx::removeSessionCallbackParameter` method. + +```cpp +Adjust2dx::addSessionCallbackParameter("key", "value"); +Adjust2dx::removeSessionCallbackParameter("key"); +Adjust2dx::resetSessionCallbackParameters(); +``` + +In SDK v5, session callback parameters are renamed to global parameters. + +```cpp +Adjust2dx::addGlobalCallbackParameter("key", "value"); +Adjust2dx::removeGlobalCallbackParameter("key"); +Adjust2dx::removeGlobalCallbackParameters(); +``` + +### Session partner parameters {#partner-params} + +In SDK v4, you can add session partner parameters by passing a key-value pair to the `Adjust2dx::addSessionPartnerParameter` method and remove individual parameters using the `Adjust2dx::removeSessionPartnerParameter` method. + +```cpp +Adjust2dx::addSessionPartnerParameter("key", "value"); +Adjust2dx::removeSessionPartnerParameter("key"); +Adjust2dx::resetSessionPartnerParameters(); +``` + +In SDK v5, session partner parameters are renamed to global partner parameters. + +```cpp +Adjust2dx::addGlobalPartnerParameter("key", "value"); +Adjust2dx::removeGlobalPartnerParameter("key"); +Adjust2dx::removeGlobalPartnerParameters(); +``` + +### Event deduplication {#event-deduplication} + +In SDK v4, event deduplication is coupled with the event `transaction ID` and is limited to a maximum of 10 unique IDs. + +```cpp +adjustEvent.setTransactionId("transaction-id"); +``` + +In SDK v5, the feature is decoupled from `transaction ID`. A new ID field called `deduplicationId` has been added for event deduplication. + +```cpp +adjustEvent.setDeduplicationId("deduplication-id"); +``` + +### App Store Subscriptions {#app-store-subscriptions} + +In SDK v4, you can set a new subscription by configuring an `AdjustAppStoreSubscription2dx` object. This object is initialized with four arguments: `price`, `currency`, `transactionId`, and `receipt`. + +```cpp +AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx(price, currency, transactionId, receipt) +``` + +In SDK v5, you don't need to pass the `receipt` argument as it's no longer needed for purchase verification. + +```cpp +AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx(price, currency, transactionId) +``` + +### Reattribution using deep links {#reattribution-using-deep-links} + +In SDK v4, you can pass your deep link information to the `Adjust2dx::appWillOpenUrl` method. + +```cpp +Adjust2dx::appWillOpenUrl("url"); +``` + +In SDK v5, this has been renamed to `Adjust2dx::processDeeplink` for clarity. A new `AdjustDeeplink2dx` class has been added for constructing deep links. To process a deep link, instantiate an `AdjustDeeplink2dx` object with your deep link URL and pass it to the `Adjust2dx::processDeeplink` method. + +```cpp +AdjustDeeplink2dx deeplink = AdjustDeeplink2dx("url"); +Adjust2dx::processDeeplink(deeplink); +``` + +### Deep link resolution {#deeplink-resolution} + +In SDK v4, you can resolve a shortened deep link by passing the `url` to the `Adjust2dx::processDeeplink` method. + +```cpp +Adjust2dx::processDeeplink("url", [](std::string resolvedLink) { + std::cout << "Resolved link: " << resolvedLink; +}); +``` + +In SDK v5, you need to send an `AdjustDeeplink2dx` object initialized with the deep link `url`. This returns the original unshortened deep link. + +```cpp +AdjustDeeplink2dx deeplink = AdjustDeeplink2dx("url"); +Adjust2dx::processDeeplink(deeplink, [](std::string resolvedLink) { + std::cout << "Resolved link: " << resolvedLink; +}); +``` + +### COPPA compliance {#coppa-compliance} + +In SDK v4, you can call the `coppaCompliantEnabled` method on your `adjustConfig` instance with the value `true` to enable COPPA compliance. + +```cpp +adjustConfig.setCoppaCompliantEnabled(true); +``` + +In SDK v5, you need to call the `enableCoppaCompliance` method on your `adjustConfig` instance to enable COPPA compliance. The default state is `false`. + +```cpp +adjustConfig.enableCoppaCompliance(); +``` + +### Play Store Kids Apps {#play-store-kids} + +In SDK v4, you can mark an app as a [Play Store Kids app](/en/sdk/react-native/features/privacy#play-store-kids-apps-android-only) by calling the `setPlayStoreKidsAppEnabled` method on your `adjustConfig` instance with the value `true`. This is read during SDK initialization, which means that the value can't be updated once the SDK is initialized. + +```cpp +adjustConfig.setPlayStoreKidsAppEnabled(true); +``` + +In SDK v5, you need to call the `enablePlayStoreKidsCompliance` method of your `adjustConfig` instance to enable compliance. The default state is `false`. + +```cpp +adjustConfig.enablePlayStoreKidsCompliance(); +``` + +### Set data residency and URL strategy {#url-strategy} + +In SDK v4, URL strategy and data residency domains are defined as constants in the `AdjustConfig` class. + +```cpp +adjustConfig.setUrlStrategy(AdjustDataResidencyEU); +``` + +In SDK v5, you need to pass your chosen domain or domains as an array. You need to also set the following: + +- `useSubdomains` (`boolean`): Whether the domain should be treated as an Adjust domain. If `true`, the SDK will prefix the domains with Adjust-specific subdomains. If `false`, the SDK will use the provided domain as-is, without adding any prefixes. +- `isDataResidency` (`boolean`): Whether the domain should be used for data residency. + +```cpp +adjustConfig.setUrlStrategy(["eu.adjust.com"], true, true); +``` + +Check the table below to see how to configure your URL strategy in SDK v5. + + + +| v4 | v5 - main and fallback domain | v5 - use sub domains | v5 - is Data Residency | +| ------------------------- | --------------------------------- | -------------------- | ---------------------- | +| `AdjustDataResidencyEU` | `"eu.adjust.com"` | `true` | `true` | +| `AdjustDataResidencyTR` | `"tr.adjust.com"` | `true` | `true` | +| `AdjustDataResidencyUS` | `"us.adjust.com"` | `true` | `true` | +| `AdjustUrlStrategyChina` | `"adjust.world"`, `"adjust.com"` | `true` | `false` | +| `AdjustUrlStrategyCn` | `"adjust.cn"`, `"adjust.com"` | `true` | `false` | +| `AdjustUrlStrategyCnOnly` | `"adjust.cn"` | `true` | `false` | +| `AdjustUrlStrategyIndia` | `"adjust.net.in"`, `"adjust.com"` | `true` | `false` | + +
+ +#### Examples {#examples} + + + +```cpp +adjustConfig.setUrlStrategy(['adjust.net.in', 'adjust.com'], true, false); +``` + + + + + +```cpp +adjustConfig.setUrlStrategy(['adjust.world', 'adjust.com'], true, false); +``` + + + + + +```cpp +adjustConfig.setUrlStrategy(['adjust.cn'], true, false); +``` + + + + + +```cpp +adjustConfig.setUrlStrategy(['eu.adjust.com'], true, true); +``` + + + + + +```cpp +adjustConfig.setUrlStrategy(['tr.adjust.com'], true, true); +``` + + + + + +```cpp +adjustConfig.setUrlStrategy(['us.adjust.com'], true, true); +``` + + + +### Record ad revenue {#record-ad-revenue} + +In SDK v4, you can record ad revenue by instantiating an `AdjustAdRevenue2dx` object with an ad revenue source constant. + +```cpp +AdjustAdRevenue2dx adRevenue = AdjustAdRevenue2dx(AdjustAdRevenueSourceAppLovinMAX); +``` + +In SDK v5, you need to instantiate an `AdjustAdRevenue` object with a string `source`. + +```cpp +AdjustAdRevenue2dx adRevenue = AdjustAdRevenue2dx("applovin_max_sdk") +``` + + + +| v4 | v5 | +| --------------------------------------- | ------------------------- | +| `AdjustAdRevenueAppLovinMAX` | `'applovin_max_sdk'` | +| `AdjustAdRevenueSourceAdMob` | `'admob_sdk'` | +| `AdjustAdRevenueSourceIronSource` | `'ironsource_sdk'` | +| `AdjustAdRevenueSourceAdMost` | `'admost_sdk'` | +| `AdjustAdRevenueSourceUnity` | `'unity_sdk'` | +| `AdjustAdRevenueSourceHeliumChartboost` | `'helium_chartboost_sdk'` | +| `adjustConfig.AdRevenueSourceADX` | `'adx_sdk'` | +| `AdjustAdRevenueSourcePublisher` | `'publisher_sdk'` | +| `AdjustAdRevenueSourceTradplus` | `'tradplus_sdk'` | +| `AdjustAdRevenueSourceTopOn` | `'topon_sdk'` | +| `AdjustAdRevenueSourceMopub` | No longer supported | + +
+ +### Disable SKAdNetwork communication {#disable-skan} + +In SDK v4, you can prevent the SDK from communicating with SKAdNetwork by calling the `adjustConfig.deactivateSKAdNetworkHandling` method. + +```cpp +adjustConfig.deactivateSKAdNetworkHandling(); +``` + +In SDK v5, you need to call the `disableSkanAttribution` method on your `adjustConfig` instance to disable SKAdNetwork communication. The default state is `true`. + +```cpp +adjustConfig.disableSkanAttribution(); +``` + +### Listen for conversion value updates {#listen-for-cv-updates} + +In SDK v4, you can call the `setPostbackConversionValueUpdatedCallback` method on your `adjustConfig` to listen for conversion value updates. Before SKAN4, you could use the `setConversionValueUpdatedCallback` method. + +```cpp +// pre-SKAN4 callback +adjustConfig.setConversionValueUpdatedCallback([](int conversionValue) { + std::cout << "\nConversion value: " << conversionValue; +}); +// SKAN4 callback +adjustConfig.setPostbackConversionValueUpdatedCallback([]( + int conversionValue, + std::string coarseValue, + bool lockWindow) { + std::cout << "\nConversion value: " << conversionValue; + std::cout << "\nCoarse value: " << coarseValue; + std::cout << "\nLock window: " << lockWindow; +}); +``` + +In SDK v5, you need to assign a callback function to the `setSkanUpdatedCallback` method of your `adjustConfig` object. + +```cpp +adjustConfig.setSkanUpdatedCallback([]( + std::map skanData) { + std::cout << "\nConversion value: " << skanData["conversionValue"]; + std::cout << "\nCoarse value: " << skanData["coarseValue"]; + std::cout << "\nLock window: " << skanData["lockWindow"]; + std::cout << "\nError: " << skanData["error"]; +}); +``` + +### Update conversion values {#update-cvs} + +In SDK v4, you can use one of these methods to send updated conversion values to Adjust: + +```cpp +// pass just the conversion value (deprecated method) +Adjust2dx::updateConversionValue(6); + +// pass the conversion value and a callback to receive a message about potential error +Adjust2dx::updatePostbackConversionValue(6, [](std::string error) { + std::cout << "Error while updating conversion value: " << error; +}); + +// SKAN 4.0 +// pass the conversion value, coarse value and a callback to receive a message about potential error +Adjust2dx::updatePostbackConversionValue(6, "low", [](std::string error) { + std::cout << "Error while updating conversion value: " << error; +}); + +// SKAN 4.0 +// pass the conversion value, coarse value, lock window and a callback to receive a message about potential error +Adjust2dx::updatePostbackConversionValue(6, "low", false, [](std::string error) { + std::cout << "Error while updating conversion value: " << error; +}); +``` + +To update conversion values in SDK v5, use the `updateSkanConversionValue` method with the following arguments: + +- `conversionValue` (`Number`): The updated conversion value +- `coarseValue` (`string`): The updated [coarse conversion value](https://developer.apple.com/documentation/storekit/skadnetwork/coarseconversionvalue) +- `lockWindow` (`boolean`): Whether to send the postback before the conversion window ends + +```cpp +Adjust2dx::updateSkanConversionValue(6, "low", true, [](std::string error) { + std::cout << "Error while updating conversion value: " << error; +}); +``` + +### App Tracking Transparency authorization wrapper {#att-wrapper} + +In SDK v4, you can handle changes to a user's ATT authorization status using the `Adjust2dx::requestTrackingAuthorizationWithCompletionHandler` method. + +```cpp +static void authorizationStatusCallback(int status) { + switch (status) { + case 0: + // ATTrackingManagerAuthorizationStatusNotDetermined case + break; + case 1: + // ATTrackingManagerAuthorizationStatusRestricted case + break; + case 2: + // ATTrackingManagerAuthorizationStatusDenied case + break; + case 3: + // ATTrackingManagerAuthorizationStatusAuthorized case + break; + } +} + +Adjust2dx::requestTrackingAuthorizationWithCompletionHandler(authorizationStatusCallback); +``` + +This has been renamed to `Adjust2dx::requestAppTrackingAuthorization` in SDK v5 for clarity. + +```cpp +static void authorizationStatusCallback(int status) { + switch (status) { + case 0: + // ATTrackingManagerAuthorizationStatusNotDetermined case + break; + case 1: + // ATTrackingManagerAuthorizationStatusRestricted case + break; + case 2: + // ATTrackingManagerAuthorizationStatusDenied case + break; + case 3: + // ATTrackingManagerAuthorizationStatusAuthorized case + break; + } +} + +Adjust2dx::requestAppTrackingAuthorization(authorizationStatusCallback); +``` + +### Get device information {#device-info} + +In SDK v4, all device information getter methods run synchronously. In SDK v5, these methods have been changed to run asynchronously. You can add a callback function to handle the information when the asynchronous process completes + + + +```cpp +Adjust2dx::getIdfa([](std::string idfa) { + std::cout << "\nIDFA = " << idfa; +}); +``` + + + + + +```cpp +Adjust2dx::getIdfv([](std::string idfv) { + std::cout << "\nIDFV = " << idfa; +}); +``` + + + + + +```cpp +Adjust2dx::getAdid([](std::string adid) { + std::cout << "\nAdjust ID = " << adid; +}); +``` + + + + + +```cpp +Adjust2dx::getAttribution([](AdjustAttribution2dx attribution) { + // process attribution +}); +``` + + + + + +```cpp +Adjust2dx::isEnabled([](bool isEnabled) { + // process isEnabled +}); +``` + + + + + +```cpp +Adjust2dx::getSdkVersion([](std::string sdkVersion) { + std::cout << "\nSDK version = " << sdkVersion; +}); +``` + + + + + +```cpp +Adjust2dx::getLastDeeplink([](std::string lastDeeplink) { + std::cout << "\nLast deeplink = " << lastDeeplink; +}); +``` + + + +## Removed APIs {#removed-apis} + + + +The following APIs have been removed in SDK v5. + +### Event buffering {#event-buffering} + +SDK v4 supports event buffering. This feature stores requests event, ad revenue, push tokens, and other information on a local buffer to send at a later date. + +```cpp +adjustConfig.setEventBufferingEnabled(true); +``` + +This setting has been removed in SDK v5. + +### Custom user agent string {#custom-user-agent} + +SDK v4 supports setting a custom User Agent by calling `adjustConfig.setUserAgent()` with a user agent string. + +```cpp +adjustConfig.setUserAgent("custom-user-agent"); +``` + +This setting has been removed in SDK v5. + +### Set whether a device is known {#set-device-known} + +In SDK v4, you can call the `adjustConfig.setDeviceKnown()` method to manually inform the SDK whether a device is known. + +```cpp +adjustConfig.setDeviceKnown(true); +``` + +This setting has been removed in SDK v5. + +### Delay SDK start {#delay-sdk-start} + +SDK v4 supports delaying the start of the SDK by calling `adjustConfig.setDelayStart()` with up to **10 seconds** of delay. + +```cpp +adjustConfig.setDelayStart(10); +``` + +This method has been removed in SDK v5. The `Adjust2dx::sendFirstPackages()` method that interrupts this delay has also been removed. + +### Disable third party sharing globally {#disable-sharing-globally} + +In SDK v4, you can call the `Adjust2dx::disableThirdPartySharing()` method to globally disable sharing information with third parties globally. + +```cpp +Adjust2dx::disableThirdPartySharing() +``` + +This feature has been removed from SDK v5. In SDK v5, use the `Adjust2dx::trackThirdPartySharing()` method to enable or disable third party sharing. + +```cpp +AdjustThirdPartySharing2dx thirdPartySharing = AdjustThirdPartySharing2dx(false); +Adjust2dx::trackThirdPartySharing(thirdPartySharing); +``` From 43a760aecffcab4a86834e535bce2f048cd0d6b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Mon, 23 Sep 2024 17:33:05 +0200 Subject: [PATCH 02/59] Remove table tags --- src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdx b/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdx index e36dfdeee..9b211798e 100644 --- a/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdx +++ b/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdx @@ -366,8 +366,6 @@ adjustConfig.setUrlStrategy(["eu.adjust.com"], true, true); Check the table below to see how to configure your URL strategy in SDK v5. - - | v4 | v5 - main and fallback domain | v5 - use sub domains | v5 - is Data Residency | | ------------------------- | --------------------------------- | -------------------- | ---------------------- | | `AdjustDataResidencyEU` | `"eu.adjust.com"` | `true` | `true` | @@ -378,8 +376,6 @@ Check the table below to see how to configure your URL strategy in SDK v5. | `AdjustUrlStrategyCnOnly` | `"adjust.cn"` | `true` | `false` | | `AdjustUrlStrategyIndia` | `"adjust.net.in"`, `"adjust.com"` | `true` | `false` | -
- #### Examples {#examples} From ba2132c0e4282065acd10562d50b8ab49732dbe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Mon, 23 Sep 2024 19:51:29 +0200 Subject: [PATCH 03/59] Remove table tag --- src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdx b/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdx index 9b211798e..880414a6b 100644 --- a/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdx +++ b/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdx @@ -440,8 +440,6 @@ In SDK v5, you need to instantiate an `AdjustAdRevenue` object with a string `so AdjustAdRevenue2dx adRevenue = AdjustAdRevenue2dx("applovin_max_sdk") ``` - - | v4 | v5 | | --------------------------------------- | ------------------------- | | `AdjustAdRevenueAppLovinMAX` | `'applovin_max_sdk'` | @@ -456,8 +454,6 @@ AdjustAdRevenue2dx adRevenue = AdjustAdRevenue2dx("applovin_max_sdk") | `AdjustAdRevenueSourceTopOn` | `'topon_sdk'` | | `AdjustAdRevenueSourceMopub` | No longer supported | -
- ### Disable SKAdNetwork communication {#disable-skan} In SDK v4, you can prevent the SDK from communicating with SKAdNetwork by calling the `adjustConfig.deactivateSKAdNetworkHandling` method. From 3a535f6ecf91d2abe5dd1a799ead1132e36bfa9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Mon, 23 Sep 2024 21:25:44 +0200 Subject: [PATCH 04/59] Migrate to markdoc --- .../cocos2dx/{index.mdx => index.mdoc} | 0 .../cocos2dx/{v4-to-v5.mdx => v4-to-v5.mdoc} | 140 +++++++++--------- 2 files changed, 70 insertions(+), 70 deletions(-) rename src/content/docs/sdk/migration/cocos2dx/{index.mdx => index.mdoc} (100%) rename src/content/docs/sdk/migration/cocos2dx/{v4-to-v5.mdx => v4-to-v5.mdoc} (88%) diff --git a/src/content/docs/sdk/migration/cocos2dx/index.mdx b/src/content/docs/sdk/migration/cocos2dx/index.mdoc similarity index 100% rename from src/content/docs/sdk/migration/cocos2dx/index.mdx rename to src/content/docs/sdk/migration/cocos2dx/index.mdoc diff --git a/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdx b/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc similarity index 88% rename from src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdx rename to src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc index 880414a6b..42c6e620e 100644 --- a/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdx +++ b/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc @@ -5,7 +5,7 @@ slug: en/sdk/migration/cocos2dx/v4-to-v5 sidebar-position: 1 --- -## Before you begin {#before-you-begin} +## Before you begin {% #before-you-begin %} Here's what you need to do before updating to SDK v5: @@ -15,7 +15,7 @@ Here's what you need to do before updating to SDK v5: - iOS: **12.0** - Android: **21** -## Install the SDK {#install-the-sdk} +## Install the SDK {% #install-the-sdk %} To start using SDK v5, you need to add it as a dependency in your project. To do this: @@ -23,7 +23,7 @@ To start using SDK v5, you need to add it as a dependency in your project. To do 2. Copy the C++ files from the `dist` directory and add them to your Cocos2d-x project 3. (**Android only**): add the paths of the C++ files to the `LOCAL_SRC_FILES` section of your `Android.mk` file. - + {% codeblock title="Android.mk" %} ```text $(LOCAL_PATH)/../../../Classes/Adjust/AdjustConfig2dx.cpp \ @@ -44,11 +44,11 @@ To start using SDK v5, you need to add it as a dependency in your project. To do $(LOCAL_PATH)/../../../Classes/Adjust/AdjustDeeplink2dx.cpp \ ``` - + {% /codeblock %} 4. (**Android only**): add the Adjust Android SDK to your project using Maven. - + {% codeblock title="build.gradle" %} ```groovy dependencies { @@ -56,15 +56,15 @@ To start using SDK v5, you need to add it as a dependency in your project. To do } ``` - + {% /codeblock %} -## Update the initialization method {#update-the-init-method} +## Update the initialization method {% #update-the-init-method %} - +{% minorversion changed="v5" size="large" /%} In SDK v4, the initialization method is `Adjust2dx::start(adjustConfig)`. This has been changed to `Adjust2dx::initSdk(adjustConfig)`. - +{% codeblock useDiffSyntax=true %} ```cpp #include "Adjust/Adjust2dx.h" @@ -77,15 +77,15 @@ AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); + Adjust2dx::initSdk(adjustConfig); ``` - +{% /codeblock %} -## Changed APIs {#changed-apis} +## Changed APIs {% #changed-apis %} - +{% minorversion changed="v5" size="large" /%} The following APIs have been changed in SDK v5. -### Disable and enable the SDK {#disable-enable-sdk} +### Disable and enable the SDK {% #disable-enable-sdk %} In SDK v4, you can enable and disable the SDK by calling `Adjust2dx::setEnabled` with a `boolean` value. @@ -104,7 +104,7 @@ Adjust2dx::disable(); Adjust2dx::enable(); ``` -### Send information in background {#send-in-background} +### Send information in background {% #send-in-background %} In SDK v4, you can set the `sendInBackground` property on your `adjustConfig` instance to `true` to enable the SDK to send information to Adjust while your app is running in the background. @@ -118,7 +118,7 @@ In SDK v5, you need to call the `enableSendingInBackground` method of your `adju adjustConfig.enableSendingInBackground(); ``` -### Preinstalled app measurement {#preinstalled-app} +### Preinstalled app measurement {% #preinstalled-app %} In SDK v4, you can call the `setPreinstallTrackingEnabled` method of your `adjustConfig` instance with a `true` argument to enable measuring preinstalled apps. @@ -132,7 +132,7 @@ In SDK v5, you need to call the `enablePreinstallTracking` method of your `adjus adjustConfig.enablePreinstallTracking(); ``` -### Disable AdServices information reading {#disable-adservices} +### Disable AdServices information reading {% #disable-adservices %} In SDK v4, you can call the `setAllowAdServicesInfoReading` method on your `adjustConfig` with the value `false` to prevent the Adjust SDK from reading AdServices information. @@ -146,7 +146,7 @@ In SDK v5, you need to call the `disableAdServices` method on your `adjustConfig adjustConfig.disableAdServices(); ``` -### Disable IDFA reading {#disable-idfa} +### Disable IDFA reading {% #disable-idfa %} In SDK v4, you can call the `setAllowIdfaReading` method on your `adjustConfig` with the value `false` to prevent the Adjust SDK from reading the device's IDFA. @@ -160,7 +160,7 @@ In SDK v5, you need to call the `disableIdfaReading` method on your `adjustConfi adjustConfig.disableIdfaReading(); ``` -### Enable cost data in attribution {#enable-cost-data} +### Enable cost data in attribution {% #enable-cost-data %} In SDK v4, you can call the `setNeedsCost` method on your `adjustConfig` instance with the value `true` to enable cost data in the device's attribution information. @@ -174,7 +174,7 @@ In SDK v5, you need to call the `enableCostDataInAttribution` method on your `ad adjustConfig.enableCostDataInAttribution(); ``` -### Enable LinkMe {#enable-linkme} +### Enable LinkMe {% #enable-linkme %} In SDK v4, you can call the `setLinkMeEnabled` method on your `adjustConfig` instance with the value `true` to enable [Adjust LinkMe](https://help.adjust.com/en/article/linkme). @@ -188,7 +188,7 @@ In SDK v5, you need to call the `enableLinkMe` method on your `adjustConfig` ins adjustConfig.enableLinkMe(); ``` -### Only read device IDs once {#read-device-id-once} +### Only read device IDs once {% #read-device-id-once %} In SDK v4, you can call the `setReadDeviceInfoOnceEnabled` method on your `adjustConfig` with the value `true` to instruct the SDK to only read device IDs once. @@ -202,7 +202,7 @@ In SDK v5, you need to call the `enableDeviceIdsReadingOnce` method on your `adj adjustConfig.enableDeviceIdsReadingOnce(); ``` -### Offline mode {#offline-mode} +### Offline mode {% #offline-mode %} In SDK v4, you can enable and disable offline mode the SDK by calling `Adjust2dx::setOfflineMode` with a `boolean` argument. @@ -221,7 +221,7 @@ Adjust2dx::switchToOfflineMode(); // Put the SDK in offline mode Adjust2dx::switchBackToOnlineMode(); // Put the SDK back in online mode ``` -### Session callback parameters {#callback-params} +### Session callback parameters {% #callback-params %} In SDK v4, you can add session callback parameters by passing a key-value pair to the `Adjust2dx::addSessionCallbackParameter` method and remove individual parameters using the `Adjust2dx::removeSessionCallbackParameter` method. @@ -239,7 +239,7 @@ Adjust2dx::removeGlobalCallbackParameter("key"); Adjust2dx::removeGlobalCallbackParameters(); ``` -### Session partner parameters {#partner-params} +### Session partner parameters {% #partner-params %} In SDK v4, you can add session partner parameters by passing a key-value pair to the `Adjust2dx::addSessionPartnerParameter` method and remove individual parameters using the `Adjust2dx::removeSessionPartnerParameter` method. @@ -257,7 +257,7 @@ Adjust2dx::removeGlobalPartnerParameter("key"); Adjust2dx::removeGlobalPartnerParameters(); ``` -### Event deduplication {#event-deduplication} +### Event deduplication {% #event-deduplication %} In SDK v4, event deduplication is coupled with the event `transaction ID` and is limited to a maximum of 10 unique IDs. @@ -271,7 +271,7 @@ In SDK v5, the feature is decoupled from `transaction ID`. A new ID field called adjustEvent.setDeduplicationId("deduplication-id"); ``` -### App Store Subscriptions {#app-store-subscriptions} +### App Store Subscriptions {% #app-store-subscriptions %} In SDK v4, you can set a new subscription by configuring an `AdjustAppStoreSubscription2dx` object. This object is initialized with four arguments: `price`, `currency`, `transactionId`, and `receipt`. @@ -285,7 +285,7 @@ In SDK v5, you don't need to pass the `receipt` argument as it's no longer neede AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx(price, currency, transactionId) ``` -### Reattribution using deep links {#reattribution-using-deep-links} +### Reattribution using deep links {% #reattribution-using-deep-links %} In SDK v4, you can pass your deep link information to the `Adjust2dx::appWillOpenUrl` method. @@ -300,7 +300,7 @@ AdjustDeeplink2dx deeplink = AdjustDeeplink2dx("url"); Adjust2dx::processDeeplink(deeplink); ``` -### Deep link resolution {#deeplink-resolution} +### Deep link resolution {% #deeplink-resolution %} In SDK v4, you can resolve a shortened deep link by passing the `url` to the `Adjust2dx::processDeeplink` method. @@ -319,7 +319,7 @@ Adjust2dx::processDeeplink(deeplink, [](std::string resolvedLink) { }); ``` -### COPPA compliance {#coppa-compliance} +### COPPA compliance {% #coppa-compliance %} In SDK v4, you can call the `coppaCompliantEnabled` method on your `adjustConfig` instance with the value `true` to enable COPPA compliance. @@ -333,7 +333,7 @@ In SDK v5, you need to call the `enableCoppaCompliance` method on your `adjustCo adjustConfig.enableCoppaCompliance(); ``` -### Play Store Kids Apps {#play-store-kids} +### Play Store Kids Apps {% #play-store-kids %} In SDK v4, you can mark an app as a [Play Store Kids app](/en/sdk/react-native/features/privacy#play-store-kids-apps-android-only) by calling the `setPlayStoreKidsAppEnabled` method on your `adjustConfig` instance with the value `true`. This is read during SDK initialization, which means that the value can't be updated once the SDK is initialized. @@ -347,7 +347,7 @@ In SDK v5, you need to call the `enablePlayStoreKidsCompliance` method of your ` adjustConfig.enablePlayStoreKidsCompliance(); ``` -### Set data residency and URL strategy {#url-strategy} +### Set data residency and URL strategy {% #url-strategy %} In SDK v4, URL strategy and data residency domains are defined as constants in the `AdjustConfig` class. @@ -376,57 +376,57 @@ Check the table below to see how to configure your URL strategy in SDK v5. | `AdjustUrlStrategyCnOnly` | `"adjust.cn"` | `true` | `false` | | `AdjustUrlStrategyIndia` | `"adjust.net.in"`, `"adjust.com"` | `true` | `false` | -#### Examples {#examples} +#### Examples {% #examples %} - +{% codeblock title="India URL strategy" %} ```cpp adjustConfig.setUrlStrategy(['adjust.net.in', 'adjust.com'], true, false); ``` - +{% /codeblock %} - +{% codeblock title="China URL strategy" %} ```cpp adjustConfig.setUrlStrategy(['adjust.world', 'adjust.com'], true, false); ``` - +{% /codeblock %} - +{% codeblock title="China only URL strategy" %} ```cpp adjustConfig.setUrlStrategy(['adjust.cn'], true, false); ``` - +{% /codeblock %} - +{% codeblock title="EU URL strategy" %} ```cpp adjustConfig.setUrlStrategy(['eu.adjust.com'], true, true); ``` - +{% /codeblock %} - +{% codeblock title="Turkey URL strategy" %} ```cpp adjustConfig.setUrlStrategy(['tr.adjust.com'], true, true); ``` - +{% /codeblock %} - +{% codeblock title="US URL strategy" %} ```cpp adjustConfig.setUrlStrategy(['us.adjust.com'], true, true); ``` - +{% /codeblock %} -### Record ad revenue {#record-ad-revenue} +### Record ad revenue {% #record-ad-revenue %} In SDK v4, you can record ad revenue by instantiating an `AdjustAdRevenue2dx` object with an ad revenue source constant. @@ -454,7 +454,7 @@ AdjustAdRevenue2dx adRevenue = AdjustAdRevenue2dx("applovin_max_sdk") | `AdjustAdRevenueSourceTopOn` | `'topon_sdk'` | | `AdjustAdRevenueSourceMopub` | No longer supported | -### Disable SKAdNetwork communication {#disable-skan} +### Disable SKAdNetwork communication {% #disable-skan %} In SDK v4, you can prevent the SDK from communicating with SKAdNetwork by calling the `adjustConfig.deactivateSKAdNetworkHandling` method. @@ -468,7 +468,7 @@ In SDK v5, you need to call the `disableSkanAttribution` method on your `adjustC adjustConfig.disableSkanAttribution(); ``` -### Listen for conversion value updates {#listen-for-cv-updates} +### Listen for conversion value updates {% #listen-for-cv-updates %} In SDK v4, you can call the `setPostbackConversionValueUpdatedCallback` method on your `adjustConfig` to listen for conversion value updates. Before SKAN4, you could use the `setConversionValueUpdatedCallback` method. @@ -500,7 +500,7 @@ adjustConfig.setSkanUpdatedCallback([]( }); ``` -### Update conversion values {#update-cvs} +### Update conversion values {% #update-cvs %} In SDK v4, you can use one of these methods to send updated conversion values to Adjust: @@ -538,7 +538,7 @@ Adjust2dx::updateSkanConversionValue(6, "low", true, [](std::string error) { }); ``` -### App Tracking Transparency authorization wrapper {#att-wrapper} +### App Tracking Transparency authorization wrapper {% #att-wrapper %} In SDK v4, you can handle changes to a user's ATT authorization status using the `Adjust2dx::requestTrackingAuthorizationWithCompletionHandler` method. @@ -586,11 +586,11 @@ static void authorizationStatusCallback(int status) { Adjust2dx::requestAppTrackingAuthorization(authorizationStatusCallback); ``` -### Get device information {#device-info} +### Get device information {% #device-info %} In SDK v4, all device information getter methods run synchronously. In SDK v5, these methods have been changed to run asynchronously. You can add a callback function to handle the information when the asynchronous process completes - +{% codeblock title="IDFA getter" %} ```cpp Adjust2dx::getIdfa([](std::string idfa) { @@ -598,9 +598,9 @@ Adjust2dx::getIdfa([](std::string idfa) { }); ``` - +{% /codeblock %} - +{% codeblock title="IDFV getter" %} ```cpp Adjust2dx::getIdfv([](std::string idfv) { @@ -608,9 +608,9 @@ Adjust2dx::getIdfv([](std::string idfv) { }); ``` - +{% /codeblock %} - +{% codeblock title="ADID getter" %} ```cpp Adjust2dx::getAdid([](std::string adid) { @@ -618,9 +618,9 @@ Adjust2dx::getAdid([](std::string adid) { }); ``` - +{% /codeblock %} - +{% codeblock title="Attribution getter" %} ```cpp Adjust2dx::getAttribution([](AdjustAttribution2dx attribution) { @@ -628,9 +628,9 @@ Adjust2dx::getAttribution([](AdjustAttribution2dx attribution) { }); ``` - +{% /codeblock %} - +{% codeblock title="Enabled status getter" %} ```cpp Adjust2dx::isEnabled([](bool isEnabled) { @@ -638,9 +638,9 @@ Adjust2dx::isEnabled([](bool isEnabled) { }); ``` - +{% /codeblock %} - +{% codeblock title="SDK version getter" %} ```cpp Adjust2dx::getSdkVersion([](std::string sdkVersion) { @@ -648,9 +648,9 @@ Adjust2dx::getSdkVersion([](std::string sdkVersion) { }); ``` - +{% /codeblock %} - +{% codeblock title="Last deep link getter" %} ```cpp Adjust2dx::getLastDeeplink([](std::string lastDeeplink) { @@ -658,15 +658,15 @@ Adjust2dx::getLastDeeplink([](std::string lastDeeplink) { }); ``` - +{% /codeblock %} -## Removed APIs {#removed-apis} +## Removed APIs {% #removed-apis %} - +{% minorversion removed="v5" size="large" /%} The following APIs have been removed in SDK v5. -### Event buffering {#event-buffering} +### Event buffering {% #event-buffering %} SDK v4 supports event buffering. This feature stores requests event, ad revenue, push tokens, and other information on a local buffer to send at a later date. @@ -676,7 +676,7 @@ adjustConfig.setEventBufferingEnabled(true); This setting has been removed in SDK v5. -### Custom user agent string {#custom-user-agent} +### Custom user agent string {% #custom-user-agent %} SDK v4 supports setting a custom User Agent by calling `adjustConfig.setUserAgent()` with a user agent string. @@ -686,7 +686,7 @@ adjustConfig.setUserAgent("custom-user-agent"); This setting has been removed in SDK v5. -### Set whether a device is known {#set-device-known} +### Set whether a device is known {% #set-device-known %} In SDK v4, you can call the `adjustConfig.setDeviceKnown()` method to manually inform the SDK whether a device is known. @@ -696,7 +696,7 @@ adjustConfig.setDeviceKnown(true); This setting has been removed in SDK v5. -### Delay SDK start {#delay-sdk-start} +### Delay SDK start {% #delay-sdk-start %} SDK v4 supports delaying the start of the SDK by calling `adjustConfig.setDelayStart()` with up to **10 seconds** of delay. @@ -706,7 +706,7 @@ adjustConfig.setDelayStart(10); This method has been removed in SDK v5. The `Adjust2dx::sendFirstPackages()` method that interrupts this delay has also been removed. -### Disable third party sharing globally {#disable-sharing-globally} +### Disable third party sharing globally {% #disable-sharing-globally %} In SDK v4, you can call the `Adjust2dx::disableThirdPartySharing()` method to globally disable sharing information with third parties globally. From 54e708259d9e109e744db71ff47cdc3e802f70e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Mon, 23 Sep 2024 22:46:43 +0200 Subject: [PATCH 05/59] Remove unused code blocks --- .../docs/sdk/migration/cocos2dx/v4-to-v5.mdoc | 172 ++++++------------ 1 file changed, 52 insertions(+), 120 deletions(-) diff --git a/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc b/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc index 42c6e620e..d49e5e734 100644 --- a/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc +++ b/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc @@ -10,20 +10,21 @@ sidebar-position: 1 Here's what you need to do before updating to SDK v5: 1. SDK v5 supports [SDK signature verification](https://help.adjust.com/en/article/sdk-signature) natively. If you currently use the SDK signature library, you need to remove the signature library from your app first. -2. The minimum supported API versions for SDK v5 have been updated. If your app targets a lower version, you need to update it first. - - iOS: **12.0** - - Android: **21** +1. The minimum supported API versions for SDK v5 have been updated. If your app targets a lower version, you need to update it first. + + - iOS: **12.0** + - Android: **21** ## Install the SDK {% #install-the-sdk %} To start using SDK v5, you need to add it as a dependency in your project. To do this: 1. Download the SDK archive [from GitHub](https://github.com/adjust/cocos2dx_sdk/releases) -2. Copy the C++ files from the `dist` directory and add them to your Cocos2d-x project -3. (**Android only**): add the paths of the C++ files to the `LOCAL_SRC_FILES` section of your `Android.mk` file. - {% codeblock title="Android.mk" %} +1. Copy the C++ files from the `dist` directory and add them to your Cocos2d-x project + +1. (**Android only**): add the paths of the C++ files to the `LOCAL_SRC_FILES` section of your `Android.mk` file. ```text $(LOCAL_PATH)/../../../Classes/Adjust/AdjustConfig2dx.cpp \ @@ -44,11 +45,7 @@ To start using SDK v5, you need to add it as a dependency in your project. To do $(LOCAL_PATH)/../../../Classes/Adjust/AdjustDeeplink2dx.cpp \ ``` - {% /codeblock %} - -4. (**Android only**): add the Adjust Android SDK to your project using Maven. - - {% codeblock title="build.gradle" %} +1. (**Android only**): add the Adjust Android SDK to your project using Maven. ```groovy dependencies { @@ -56,8 +53,6 @@ To start using SDK v5, you need to add it as a dependency in your project. To do } ``` - {% /codeblock %} - ## Update the initialization method {% #update-the-init-method %} {% minorversion changed="v5" size="large" /%} @@ -65,7 +60,6 @@ To start using SDK v5, you need to add it as a dependency in your project. To do In SDK v4, the initialization method is `Adjust2dx::start(adjustConfig)`. This has been changed to `Adjust2dx::initSdk(adjustConfig)`. {% codeblock useDiffSyntax=true %} - ```cpp #include "Adjust/Adjust2dx.h" @@ -76,7 +70,6 @@ AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); - Adjust2dx::start(adjustConfig); + Adjust2dx::initSdk(adjustConfig); ``` - {% /codeblock %} ## Changed APIs {% #changed-apis %} @@ -96,8 +89,8 @@ Adjust2dx::setEnabled(true); // enable SDK In SDK v5, this feature is split into separate commands for clarity. -- Call `Adjust2dx::disable()` to disable the SDK. -- Call `Adjust2dx::enable()` to enable the SDK. +- Call `Adjust2dx::disable()` to disable the SDK. +- Call `Adjust2dx::enable()` to enable the SDK. ```cpp Adjust2dx::disable(); @@ -213,8 +206,8 @@ Adjust2dx::setOfflineMode(false); In SDK v5, this feature is split into separate commands for clarity. -- Call `Adjust2dx::switchToOfflineMode` to set the SDK to offline mode. -- Call `Adjust2dx::switchBackToOnlineMode` to set the SDK back to online mode. +- Call `Adjust2dx::switchToOfflineMode` to set the SDK to offline mode. +- Call `Adjust2dx::switchBackToOnlineMode` to set the SDK back to online mode. ```cpp Adjust2dx::switchToOfflineMode(); // Put the SDK in offline mode @@ -357,8 +350,8 @@ adjustConfig.setUrlStrategy(AdjustDataResidencyEU); In SDK v5, you need to pass your chosen domain or domains as an array. You need to also set the following: -- `useSubdomains` (`boolean`): Whether the domain should be treated as an Adjust domain. If `true`, the SDK will prefix the domains with Adjust-specific subdomains. If `false`, the SDK will use the provided domain as-is, without adding any prefixes. -- `isDataResidency` (`boolean`): Whether the domain should be used for data residency. +- `useSubdomains` (`boolean`): Whether the domain should be treated as an Adjust domain. If `true`, the SDK will prefix the domains with Adjust-specific subdomains. If `false`, the SDK will use the provided domain as-is, without adding any prefixes. +- `isDataResidency` (`boolean`): Whether the domain should be used for data residency. ```cpp adjustConfig.setUrlStrategy(["eu.adjust.com"], true, true); @@ -366,66 +359,38 @@ adjustConfig.setUrlStrategy(["eu.adjust.com"], true, true); Check the table below to see how to configure your URL strategy in SDK v5. -| v4 | v5 - main and fallback domain | v5 - use sub domains | v5 - is Data Residency | -| ------------------------- | --------------------------------- | -------------------- | ---------------------- | -| `AdjustDataResidencyEU` | `"eu.adjust.com"` | `true` | `true` | -| `AdjustDataResidencyTR` | `"tr.adjust.com"` | `true` | `true` | -| `AdjustDataResidencyUS` | `"us.adjust.com"` | `true` | `true` | -| `AdjustUrlStrategyChina` | `"adjust.world"`, `"adjust.com"` | `true` | `false` | -| `AdjustUrlStrategyCn` | `"adjust.cn"`, `"adjust.com"` | `true` | `false` | -| `AdjustUrlStrategyCnOnly` | `"adjust.cn"` | `true` | `false` | -| `AdjustUrlStrategyIndia` | `"adjust.net.in"`, `"adjust.com"` | `true` | `false` | +| v4 | v5 - main and fallback domain | v5 - use sub domains | v5 - is Data Residency | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `AdjustDataResidencyEU` | `"eu.adjust.com"` | `true` | `true` | +| `AdjustDataResidencyTR` | `"tr.adjust.com"` | `true` | `true` | +| `AdjustDataResidencyUS` | `"us.adjust.com"` | `true` | `true` | +| `AdjustUrlStrategyChina` | `"adjust.world"`, `"adjust.com"` | `true` | `false` | +| `AdjustUrlStrategyCn` | `"adjust.cn"`, `"adjust.com"` | `true` | `false` | +| `AdjustUrlStrategyCnOnly` | `"adjust.cn"` | `true` | `false` | +| `AdjustUrlStrategyIndia` | `"adjust.net.in"`, `"adjust.com"` | `true` | `false` | #### Examples {% #examples %} -{% codeblock title="India URL strategy" %} - ```cpp +// India URL strategy adjustConfig.setUrlStrategy(['adjust.net.in', 'adjust.com'], true, false); -``` -{% /codeblock %} - -{% codeblock title="China URL strategy" %} - -```cpp +// China URL strategy adjustConfig.setUrlStrategy(['adjust.world', 'adjust.com'], true, false); -``` - -{% /codeblock %} - -{% codeblock title="China only URL strategy" %} -```cpp +// China only URL strategy adjustConfig.setUrlStrategy(['adjust.cn'], true, false); -``` - -{% /codeblock %} - -{% codeblock title="EU URL strategy" %} -```cpp +// EU URL strategy adjustConfig.setUrlStrategy(['eu.adjust.com'], true, true); -``` - -{% /codeblock %} -{% codeblock title="Turkey URL strategy" %} - -```cpp +// Turkey URL strategy adjustConfig.setUrlStrategy(['tr.adjust.com'], true, true); -``` - -{% /codeblock %} - -{% codeblock title="US URL strategy" %} -```cpp +// US URL strategy adjustConfig.setUrlStrategy(['us.adjust.com'], true, true); ``` -{% /codeblock %} - ### Record ad revenue {% #record-ad-revenue %} In SDK v4, you can record ad revenue by instantiating an `AdjustAdRevenue2dx` object with an ad revenue source constant. @@ -440,19 +405,19 @@ In SDK v5, you need to instantiate an `AdjustAdRevenue` object with a string `so AdjustAdRevenue2dx adRevenue = AdjustAdRevenue2dx("applovin_max_sdk") ``` -| v4 | v5 | -| --------------------------------------- | ------------------------- | -| `AdjustAdRevenueAppLovinMAX` | `'applovin_max_sdk'` | -| `AdjustAdRevenueSourceAdMob` | `'admob_sdk'` | -| `AdjustAdRevenueSourceIronSource` | `'ironsource_sdk'` | -| `AdjustAdRevenueSourceAdMost` | `'admost_sdk'` | -| `AdjustAdRevenueSourceUnity` | `'unity_sdk'` | -| `AdjustAdRevenueSourceHeliumChartboost` | `'helium_chartboost_sdk'` | -| `adjustConfig.AdRevenueSourceADX` | `'adx_sdk'` | -| `AdjustAdRevenueSourcePublisher` | `'publisher_sdk'` | -| `AdjustAdRevenueSourceTradplus` | `'tradplus_sdk'` | -| `AdjustAdRevenueSourceTopOn` | `'topon_sdk'` | -| `AdjustAdRevenueSourceMopub` | No longer supported | +| v4 | v5 | +| --------------------------------------- | --------------------------------------- | +| `AdjustAdRevenueAppLovinMAX` | `'applovin_max_sdk'` | +| `AdjustAdRevenueSourceAdMob` | `'admob_sdk'` | +| `AdjustAdRevenueSourceIronSource` | `'ironsource_sdk'` | +| `AdjustAdRevenueSourceAdMost` | `'admost_sdk'` | +| `AdjustAdRevenueSourceUnity` | `'unity_sdk'` | +| `AdjustAdRevenueSourceHeliumChartboost` | `'helium_chartboost_sdk'` | +| `adjustConfig.AdRevenueSourceADX` | `'adx_sdk'` | +| `AdjustAdRevenueSourcePublisher` | `'publisher_sdk'` | +| `AdjustAdRevenueSourceTradplus` | `'tradplus_sdk'` | +| `AdjustAdRevenueSourceTopOn` | `'topon_sdk'` | +| `AdjustAdRevenueSourceMopub` | No longer supported | ### Disable SKAdNetwork communication {% #disable-skan %} @@ -528,9 +493,9 @@ Adjust2dx::updatePostbackConversionValue(6, "low", false, [](std::string error) To update conversion values in SDK v5, use the `updateSkanConversionValue` method with the following arguments: -- `conversionValue` (`Number`): The updated conversion value -- `coarseValue` (`string`): The updated [coarse conversion value](https://developer.apple.com/documentation/storekit/skadnetwork/coarseconversionvalue) -- `lockWindow` (`boolean`): Whether to send the postback before the conversion window ends +- `conversionValue` (`Number`): The updated conversion value +- `coarseValue` (`string`): The updated [coarse conversion value](https://developer.apple.com/documentation/storekit/skadnetwork/coarseconversionvalue) +- `lockWindow` (`boolean`): Whether to send the postback before the conversion window ends ```cpp Adjust2dx::updateSkanConversionValue(6, "low", true, [](std::string error) { @@ -590,76 +555,43 @@ Adjust2dx::requestAppTrackingAuthorization(authorizationStatusCallback); In SDK v4, all device information getter methods run synchronously. In SDK v5, these methods have been changed to run asynchronously. You can add a callback function to handle the information when the asynchronous process completes -{% codeblock title="IDFA getter" %} - ```cpp +// IDFA getter Adjust2dx::getIdfa([](std::string idfa) { std::cout << "\nIDFA = " << idfa; }); -``` - -{% /codeblock %} -{% codeblock title="IDFV getter" %} - -```cpp +// IDFV getter Adjust2dx::getIdfv([](std::string idfv) { std::cout << "\nIDFV = " << idfa; }); -``` -{% /codeblock %} - -{% codeblock title="ADID getter" %} - -```cpp +// ADID getter Adjust2dx::getAdid([](std::string adid) { std::cout << "\nAdjust ID = " << adid; }); -``` -{% /codeblock %} - -{% codeblock title="Attribution getter" %} - -```cpp +// Attribution getter Adjust2dx::getAttribution([](AdjustAttribution2dx attribution) { // process attribution }); -``` - -{% /codeblock %} -{% codeblock title="Enabled status getter" %} - -```cpp +// Enabled status getter Adjust2dx::isEnabled([](bool isEnabled) { // process isEnabled }); -``` - -{% /codeblock %} - -{% codeblock title="SDK version getter" %} -```cpp +// SDK version getter Adjust2dx::getSdkVersion([](std::string sdkVersion) { std::cout << "\nSDK version = " << sdkVersion; }); -``` - -{% /codeblock %} -{% codeblock title="Last deep link getter" %} - -```cpp +// Last deep link getter Adjust2dx::getLastDeeplink([](std::string lastDeeplink) { std::cout << "\nLast deeplink = " << lastDeeplink; }); ``` -{% /codeblock %} - ## Removed APIs {% #removed-apis %} {% minorversion removed="v5" size="large" /%} From 12d54185f059d3711ba55ed2c6e7761cffc07e76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Tue, 24 Sep 2024 14:42:26 +0200 Subject: [PATCH 06/59] Move v4 content to new folder --- .../docs/sdk/cocos2dx/{ => v4}/configuration-ja.mdx | 8 ++++++++ .../docs/sdk/cocos2dx/{ => v4}/configuration-ko.mdx | 8 ++++++++ .../docs/sdk/cocos2dx/{ => v4}/configuration-zh.mdx | 8 ++++++++ .../docs/sdk/cocos2dx/{ => v4}/configuration.mdx | 8 ++++++++ .../sdk/cocos2dx/{ => v4}/features/ad-revenue-ja.mdx | 10 +++++++++- .../sdk/cocos2dx/{ => v4}/features/ad-revenue-ko.mdx | 10 +++++++++- .../sdk/cocos2dx/{ => v4}/features/ad-revenue-zh.mdx | 10 +++++++++- .../docs/sdk/cocos2dx/{ => v4}/features/ad-revenue.mdx | 10 +++++++++- .../docs/sdk/cocos2dx/{ => v4}/features/att-ja.mdx | 10 +++++++++- .../docs/sdk/cocos2dx/{ => v4}/features/att-ko.mdx | 10 +++++++++- .../docs/sdk/cocos2dx/{ => v4}/features/att-zh.mdx | 10 +++++++++- .../docs/sdk/cocos2dx/{ => v4}/features/att.mdx | 10 +++++++++- .../sdk/cocos2dx/{ => v4}/features/attribution-ja.mdx | 10 +++++++++- .../sdk/cocos2dx/{ => v4}/features/attribution-ko.mdx | 10 +++++++++- .../sdk/cocos2dx/{ => v4}/features/attribution-zh.mdx | 10 +++++++++- .../sdk/cocos2dx/{ => v4}/features/attribution.mdx | 10 +++++++++- .../sdk/cocos2dx/{ => v4}/features/callbacks-ja.mdx | 10 +++++++++- .../sdk/cocos2dx/{ => v4}/features/callbacks-ko.mdx | 10 +++++++++- .../sdk/cocos2dx/{ => v4}/features/callbacks-zh.mdx | 10 +++++++++- .../docs/sdk/cocos2dx/{ => v4}/features/callbacks.mdx | 10 +++++++++- .../sdk/cocos2dx/{ => v4}/features/deep-links-ja.mdx | 10 +++++++++- .../sdk/cocos2dx/{ => v4}/features/deep-links-ko.mdx | 10 +++++++++- .../sdk/cocos2dx/{ => v4}/features/deep-links-zh.mdx | 10 +++++++++- .../docs/sdk/cocos2dx/{ => v4}/features/deep-links.mdx | 10 +++++++++- .../sdk/cocos2dx/{ => v4}/features/device-info-ja.mdx | 10 +++++++++- .../sdk/cocos2dx/{ => v4}/features/device-info-ko.mdx | 10 +++++++++- .../sdk/cocos2dx/{ => v4}/features/device-info-zh.mdx | 10 +++++++++- .../sdk/cocos2dx/{ => v4}/features/device-info.mdx | 10 +++++++++- .../docs/sdk/cocos2dx/{ => v4}/features/events-ja.mdx | 10 +++++++++- .../docs/sdk/cocos2dx/{ => v4}/features/events-ko.mdx | 10 +++++++++- .../docs/sdk/cocos2dx/{ => v4}/features/events-zh.mdx | 8 ++++++++ .../docs/sdk/cocos2dx/{ => v4}/features/events.mdx | 8 ++++++++ .../docs/sdk/cocos2dx/{ => v4}/features/index-ja.mdx | 10 +++++++++- .../docs/sdk/cocos2dx/{ => v4}/features/index-ko.mdx | 10 +++++++++- .../docs/sdk/cocos2dx/{ => v4}/features/index-zh.mdx | 10 +++++++++- .../docs/sdk/cocos2dx/{ => v4}/features/index.mdx | 10 +++++++++- .../docs/sdk/cocos2dx/{ => v4}/features/privacy-ja.mdx | 10 +++++++++- .../docs/sdk/cocos2dx/{ => v4}/features/privacy-ko.mdx | 10 +++++++++- .../docs/sdk/cocos2dx/{ => v4}/features/privacy-zh.mdx | 10 +++++++++- .../docs/sdk/cocos2dx/{ => v4}/features/privacy.mdx | 10 +++++++++- .../{ => v4}/features/session-parameters-ja.mdx | 8 ++++++++ .../{ => v4}/features/session-parameters-ko.mdx | 10 +++++++++- .../{ => v4}/features/session-parameters-zh.mdx | 10 +++++++++- .../cocos2dx/{ => v4}/features/session-parameters.mdx | 10 +++++++++- .../sdk/cocos2dx/{ => v4}/features/short-links-ja.mdx | 10 +++++++++- .../sdk/cocos2dx/{ => v4}/features/short-links-ko.mdx | 10 +++++++++- .../sdk/cocos2dx/{ => v4}/features/short-links-zh.mdx | 10 +++++++++- .../sdk/cocos2dx/{ => v4}/features/short-links.mdx | 10 +++++++++- .../docs/sdk/cocos2dx/{ => v4}/features/skad-ja.mdx | 10 +++++++++- .../docs/sdk/cocos2dx/{ => v4}/features/skad-ko.mdx | 10 +++++++++- .../docs/sdk/cocos2dx/{ => v4}/features/skad-zh.mdx | 10 +++++++++- .../docs/sdk/cocos2dx/{ => v4}/features/skad.mdx | 10 +++++++++- .../cocos2dx/{ => v4}/features/subscriptions-ja.mdx | 10 +++++++++- .../cocos2dx/{ => v4}/features/subscriptions-ko.mdx | 10 +++++++++- .../cocos2dx/{ => v4}/features/subscriptions-zh.mdx | 10 +++++++++- .../sdk/cocos2dx/{ => v4}/features/subscriptions.mdx | 10 +++++++++- src/content/docs/sdk/cocos2dx/{ => v4}/index-ja.mdx | 8 ++++++++ src/content/docs/sdk/cocos2dx/{ => v4}/index-ko.mdx | 8 ++++++++ src/content/docs/sdk/cocos2dx/{ => v4}/index-zh.mdx | 8 ++++++++ src/content/docs/sdk/cocos2dx/{ => v4}/index.mdx | 10 +++++++++- 60 files changed, 530 insertions(+), 50 deletions(-) rename src/content/docs/sdk/cocos2dx/{ => v4}/configuration-ja.mdx (99%) rename src/content/docs/sdk/cocos2dx/{ => v4}/configuration-ko.mdx (99%) rename src/content/docs/sdk/cocos2dx/{ => v4}/configuration-zh.mdx (98%) rename src/content/docs/sdk/cocos2dx/{ => v4}/configuration.mdx (98%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/ad-revenue-ja.mdx (98%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/ad-revenue-ko.mdx (98%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/ad-revenue-zh.mdx (98%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/ad-revenue.mdx (98%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/att-ja.mdx (97%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/att-ko.mdx (96%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/att-zh.mdx (96%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/att.mdx (96%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/attribution-ja.mdx (96%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/attribution-ko.mdx (95%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/attribution-zh.mdx (95%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/attribution.mdx (95%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/callbacks-ja.mdx (98%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/callbacks-ko.mdx (98%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/callbacks-zh.mdx (97%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/callbacks.mdx (98%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/deep-links-ja.mdx (95%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/deep-links-ko.mdx (94%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/deep-links-zh.mdx (93%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/deep-links.mdx (93%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/device-info-ja.mdx (92%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/device-info-ko.mdx (92%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/device-info-zh.mdx (91%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/device-info.mdx (91%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/events-ja.mdx (99%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/events-ko.mdx (99%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/events-zh.mdx (99%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/events.mdx (99%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/index-ja.mdx (62%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/index-ko.mdx (60%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/index-zh.mdx (57%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/index.mdx (58%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/privacy-ja.mdx (99%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/privacy-ko.mdx (99%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/privacy-zh.mdx (98%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/privacy.mdx (99%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/session-parameters-ja.mdx (97%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/session-parameters-ko.mdx (96%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/session-parameters-zh.mdx (95%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/session-parameters.mdx (95%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/short-links-ja.mdx (91%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/short-links-ko.mdx (90%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/short-links-zh.mdx (89%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/short-links.mdx (90%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/skad-ja.mdx (96%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/skad-ko.mdx (96%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/skad-zh.mdx (95%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/skad.mdx (96%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/subscriptions-ja.mdx (98%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/subscriptions-ko.mdx (98%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/subscriptions-zh.mdx (98%) rename src/content/docs/sdk/cocos2dx/{ => v4}/features/subscriptions.mdx (98%) rename src/content/docs/sdk/cocos2dx/{ => v4}/index-ja.mdx (99%) rename src/content/docs/sdk/cocos2dx/{ => v4}/index-ko.mdx (99%) rename src/content/docs/sdk/cocos2dx/{ => v4}/index-zh.mdx (98%) rename src/content/docs/sdk/cocos2dx/{ => v4}/index.mdx (98%) diff --git a/src/content/docs/sdk/cocos2dx/configuration-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/configuration-ja.mdx similarity index 99% rename from src/content/docs/sdk/cocos2dx/configuration-ja.mdx rename to src/content/docs/sdk/cocos2dx/v4/configuration-ja.mdx index 1dc2631c6..fa2e269b7 100644 --- a/src/content/docs/sdk/cocos2dx/configuration-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/configuration-ja.mdx @@ -4,6 +4,14 @@ description: "Adjust SDKを設定するには、このセクションのガイ category-title: "設定" slug: "ja/sdk/cocos2dx/configuration" sidebar-position: 1 +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ja/sdk/cocos2dx/configuration --- Adjust SDKの動作を設定するには、このドキュメントに記載されたメソッドを使用してください。 diff --git a/src/content/docs/sdk/cocos2dx/configuration-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/configuration-ko.mdx similarity index 99% rename from src/content/docs/sdk/cocos2dx/configuration-ko.mdx rename to src/content/docs/sdk/cocos2dx/v4/configuration-ko.mdx index 616265e51..3eec0bd6a 100644 --- a/src/content/docs/sdk/cocos2dx/configuration-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/configuration-ko.mdx @@ -4,6 +4,14 @@ description: "이 섹션의 가이드를 참조하여 Adjust SDK를 설정합니 category-title: "구성" slug: "ko/sdk/cocos2dx/configuration" sidebar-position: 1 +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ko/sdk/cocos2dx/configuration --- Adjust SDK의 동작을 설정하는 방법에 관한 본 문서의 메서드를 참조하시기 바랍니다. diff --git a/src/content/docs/sdk/cocos2dx/configuration-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/configuration-zh.mdx similarity index 98% rename from src/content/docs/sdk/cocos2dx/configuration-zh.mdx rename to src/content/docs/sdk/cocos2dx/v4/configuration-zh.mdx index b003ae3e5..e2aa7e51d 100644 --- a/src/content/docs/sdk/cocos2dx/configuration-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/configuration-zh.mdx @@ -4,6 +4,14 @@ description: "请按照本节中的说明配置 Adjust SDK。" category-title: "配置" slug: "zh/sdk/cocos2dx/configuration" sidebar-position: 1 +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /zh/sdk/cocos2dx/configuration --- 请使用该文档中的方法配置 Adjust SDK 行为。 diff --git a/src/content/docs/sdk/cocos2dx/configuration.mdx b/src/content/docs/sdk/cocos2dx/v4/configuration.mdx similarity index 98% rename from src/content/docs/sdk/cocos2dx/configuration.mdx rename to src/content/docs/sdk/cocos2dx/v4/configuration.mdx index 47fd62f66..197b6dcd8 100644 --- a/src/content/docs/sdk/cocos2dx/configuration.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/configuration.mdx @@ -4,6 +4,14 @@ description: Follow the guides in this section to configure the Adjust SDK. category-title: Configuration slug: en/sdk/cocos2dx/configuration sidebar-position: 1 +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /en/sdk/cocos2dx/configuration --- Use the methods in this document to configure the behavior of the Adjust SDK. diff --git a/src/content/docs/sdk/cocos2dx/features/ad-revenue-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/features/ad-revenue-ja.mdx similarity index 98% rename from src/content/docs/sdk/cocos2dx/features/ad-revenue-ja.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/ad-revenue-ja.mdx index 47ee6d2fc..79e702cdb 100644 --- a/src/content/docs/sdk/cocos2dx/features/ad-revenue-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/ad-revenue-ja.mdx @@ -1,7 +1,15 @@ --- title: "広告収益情報を送信する" description: "Adjust SDKを使用して、サポートされているネットワークパートナーの広告収益情報を送信します。" -slug: "ja/sdk/cocos2dx/features/ad-revenue" +slug: "ja/sdk/cocos2dx/v4/features/ad-revenue" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ja/sdk/cocos2dx/features/ad-revenue --- Adjust SDKを使用して、[サポートされているネットワークパートナー](https://help.adjust.com/ja/article/ad-revenue)の広告収益を記録することができます。 diff --git a/src/content/docs/sdk/cocos2dx/features/ad-revenue-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/features/ad-revenue-ko.mdx similarity index 98% rename from src/content/docs/sdk/cocos2dx/features/ad-revenue-ko.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/ad-revenue-ko.mdx index e0cab98b2..b3d0e8701 100644 --- a/src/content/docs/sdk/cocos2dx/features/ad-revenue-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/ad-revenue-ko.mdx @@ -1,7 +1,15 @@ --- title: "광고 매출 정보 전송" description: "Adjust SDK를 사용하여 지원되는 네트워크 파트너의 광고 매출 정보를 전송합니다." -slug: "ko/sdk/cocos2dx/features/ad-revenue" +slug: "ko/sdk/cocos2dx/v4/features/ad-revenue" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ko/sdk/cocos2dx/features/ad-revenue --- Adjust SDK를 사용하여 [지원되는 네트워크 파트너](https://help.adjust.com/ko/article/ad-revenue)의 광고 매출을 기록할 수 있습니다. diff --git a/src/content/docs/sdk/cocos2dx/features/ad-revenue-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/features/ad-revenue-zh.mdx similarity index 98% rename from src/content/docs/sdk/cocos2dx/features/ad-revenue-zh.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/ad-revenue-zh.mdx index 547d57505..871312bda 100644 --- a/src/content/docs/sdk/cocos2dx/features/ad-revenue-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/ad-revenue-zh.mdx @@ -1,7 +1,15 @@ --- title: "发送广告收入信息" description: "使用 Adjust SDK 发送受支持渠道合作伙伴的广告收入信息。" -slug: "zh/sdk/cocos2dx/features/ad-revenue" +slug: "zh/sdk/cocos2dx/v4/features/ad-revenue" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /zh/sdk/cocos2dx/features/ad-revenue --- 您可以使用 Adjust SDK 记录[受支持渠道合作伙伴](https://help.adjust.com/zh/article/ad-revenue)的广告收入。 diff --git a/src/content/docs/sdk/cocos2dx/features/ad-revenue.mdx b/src/content/docs/sdk/cocos2dx/v4/features/ad-revenue.mdx similarity index 98% rename from src/content/docs/sdk/cocos2dx/features/ad-revenue.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/ad-revenue.mdx index 4eccc16d9..0d8f5872f 100644 --- a/src/content/docs/sdk/cocos2dx/features/ad-revenue.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/ad-revenue.mdx @@ -1,7 +1,15 @@ --- title: Send ad revenue information description: Send ad revenue information for supported network partners using the Adjust SDK. -slug: en/sdk/cocos2dx/features/ad-revenue +slug: en/sdk/cocos2dx/v4/features/ad-revenue +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /en/sdk/cocos2dx/features/ad-revenue --- You can record ad revenue for [supported network partners](https://help.adjust.com/en/article/ad-revenue) using the Adjust SDK. diff --git a/src/content/docs/sdk/cocos2dx/features/att-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/features/att-ja.mdx similarity index 97% rename from src/content/docs/sdk/cocos2dx/features/att-ja.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/att-ja.mdx index 9ca0adadf..fc9f081e7 100644 --- a/src/content/docs/sdk/cocos2dx/features/att-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/att-ja.mdx @@ -1,7 +1,15 @@ --- title: "App Tracking Transparencyの設定" description: "AppleのApp Tracking Transparencyフレームワークを使用するようにアプリを設定する" -slug: "ja/sdk/cocos2dx/features/att" +slug: "ja/sdk/cocos2dx/v4/features/att" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ja/sdk/cocos2dx/features/att --- 広告識別子(IDFA)を記録したい場合は、ユーザーの許諾を得るためのプロンプトを表示する必要があります。これを行うには、アプリにAppleのApp Tracking Transparency(ATT)frameworkを組み込む必要があります。Adjust SDKはユーザーの許諾状況を保存し、リクエストごとにAdjustサーバーに送信します。 diff --git a/src/content/docs/sdk/cocos2dx/features/att-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/features/att-ko.mdx similarity index 96% rename from src/content/docs/sdk/cocos2dx/features/att-ko.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/att-ko.mdx index 589b975c1..bf8315467 100644 --- a/src/content/docs/sdk/cocos2dx/features/att-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/att-ko.mdx @@ -1,7 +1,15 @@ --- title: "ATT 설정" description: "Apple의 ATT(App Tracking Transparency) 프레임워크를 사용하도록 앱 설정" -slug: "ko/sdk/cocos2dx/features/att" +slug: "ko/sdk/cocos2dx/v4/features/att" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ko/sdk/cocos2dx/features/att --- IDFA\(ID for Advertisers\)를 기록하려면 사용자의 허가를 받기 위한 메시지를 표시해야 합니다. 이렇게 하려면 앱에 Apple의 ATT\(App Tracking Transparency\) 프레임워크를 포함해야 합니다. Adjust SDK는 사용자의 허가 여부를 저장하고 각 요청과 함께 Adjust 서버로 전송합니다. diff --git a/src/content/docs/sdk/cocos2dx/features/att-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/features/att-zh.mdx similarity index 96% rename from src/content/docs/sdk/cocos2dx/features/att-zh.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/att-zh.mdx index 58f6ec1aa..d587eb37b 100644 --- a/src/content/docs/sdk/cocos2dx/features/att-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/att-zh.mdx @@ -1,7 +1,15 @@ --- title: "设置 App Tracking Transparency" description: "配置应用以使用 Apple 的 App Tracking Transparency 框架" -slug: "zh/sdk/cocos2dx/features/att" +slug: "zh/sdk/cocos2dx/v4/features/att" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /zh/sdk/cocos2dx/features/att --- 如果您要记录设备的广告主 ID \(即 IDFA\),需要先展示弹窗获得用户的授权。要达到这个目的,你需要在应用中添加 Apple 的 App Tracking Transparency \(ATT\) 框架。Adjust SDK 会存储用户的授权状态并在每次请求中将该信息发送至 Adjust 服务器。 diff --git a/src/content/docs/sdk/cocos2dx/features/att.mdx b/src/content/docs/sdk/cocos2dx/v4/features/att.mdx similarity index 96% rename from src/content/docs/sdk/cocos2dx/features/att.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/att.mdx index e21153b0d..c7b6728d1 100644 --- a/src/content/docs/sdk/cocos2dx/features/att.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/att.mdx @@ -1,7 +1,15 @@ --- title: Set up App Tracking Transparency description: Configure your app to use Apple's App Tracking Transparency framework -slug: en/sdk/cocos2dx/features/att +slug: en/sdk/cocos2dx/v4/features/att +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /en/sdk/cocos2dx/features/att --- If you want to record the device's ID for Advertisers (IDFA), you must display a prompt to get your user's authorization. To do this, you need to include Apple's App Tracking Transparency (ATT) framework in your app. The Adjust SDK stores the user's authorization status and sends it to Adjust's servers with each request. diff --git a/src/content/docs/sdk/cocos2dx/features/attribution-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/features/attribution-ja.mdx similarity index 96% rename from src/content/docs/sdk/cocos2dx/features/attribution-ja.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/attribution-ja.mdx index 4e0f97fec..6cf576518 100644 --- a/src/content/docs/sdk/cocos2dx/features/attribution-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/attribution-ja.mdx @@ -1,7 +1,15 @@ --- title: "アトリビューション情報の取得" description: "Adjust SDKを使ってアトリビューションの変更を受信する" -slug: "ja/sdk/cocos2dx/features/attribution" +slug: "ja/sdk/cocos2dx/v4/features/attribution" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ja/sdk/cocos2dx/features/attribution --- ユーザーがAdjustリンクをクリックすると、そのアトリビューション情報が更新されます。これは、ユーザーが[ディープリンク](https://help.adjust.com/ja/article/deep-links)をクリックした場合に発生します。ユーザーのアトリビューションについての情報は、`AdjustAttribution2dx`クラスに表示されます。 diff --git a/src/content/docs/sdk/cocos2dx/features/attribution-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/features/attribution-ko.mdx similarity index 95% rename from src/content/docs/sdk/cocos2dx/features/attribution-ko.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/attribution-ko.mdx index faf9c6a1b..13764c3b2 100644 --- a/src/content/docs/sdk/cocos2dx/features/attribution-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/attribution-ko.mdx @@ -1,7 +1,15 @@ --- title: "어트리뷰션 정보 확인" description: "Adjust SDK를 사용하여 어트리뷰션 변경 사항 수신" -slug: "ko/sdk/cocos2dx/features/attribution" +slug: "ko/sdk/cocos2dx/v4/features/attribution" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ko/sdk/cocos2dx/features/attribution --- 사용자가 Adjust 링크와 상호작용하면 어트리뷰션 정보가 업데이트됩니다. 이는 사용자가 [딥링크](https://help.adjust.com/ko/article/deep-links)와 상호작용하는 경우에 발생할 수 있습니다. 사용자의 어트리뷰션 관련 정보는 `AdjustAttribution2dx` 클래스에 나타납니다. diff --git a/src/content/docs/sdk/cocos2dx/features/attribution-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/features/attribution-zh.mdx similarity index 95% rename from src/content/docs/sdk/cocos2dx/features/attribution-zh.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/attribution-zh.mdx index dd022a941..84cb13d9a 100644 --- a/src/content/docs/sdk/cocos2dx/features/attribution-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/attribution-zh.mdx @@ -1,7 +1,15 @@ --- title: "获取归因信息" description: "使用 Adjust SDK 监听归因变化" -slug: "zh/sdk/cocos2dx/features/attribution" +slug: "zh/sdk/cocos2dx/v4/features/attribution" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /zh/sdk/cocos2dx/features/attribution --- 用户与 Adjust 链接交互时,其归因信息会发生更新。用户与[深度链接](https://help.adjust.com/zh/article/deep-links)交互时可能会发生这种情况。用户归因相关信息会在 `AdjustAttribution2dx` 类中展现。 diff --git a/src/content/docs/sdk/cocos2dx/features/attribution.mdx b/src/content/docs/sdk/cocos2dx/v4/features/attribution.mdx similarity index 95% rename from src/content/docs/sdk/cocos2dx/features/attribution.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/attribution.mdx index 49362687a..f7f55c10c 100644 --- a/src/content/docs/sdk/cocos2dx/features/attribution.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/attribution.mdx @@ -1,7 +1,15 @@ --- title: Get attribution information description: Listen for attribution changes using the Adjust SDK -slug: en/sdk/cocos2dx/features/attribution +slug: en/sdk/cocos2dx/v4/features/attribution +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /en/sdk/cocos2dx/features/attribution --- When a user interacts with an Adjust link, their attribution information updates. This can happen if the user interacts with a [deep link](https://help.adjust.com/en/article/deep-links). Information about a user's attribution is represented in the `AdjustAttribution2dx` class. diff --git a/src/content/docs/sdk/cocos2dx/features/callbacks-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/features/callbacks-ja.mdx similarity index 98% rename from src/content/docs/sdk/cocos2dx/features/callbacks-ja.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/callbacks-ja.mdx index f0ed03fe5..76d620920 100644 --- a/src/content/docs/sdk/cocos2dx/features/callbacks-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/callbacks-ja.mdx @@ -1,7 +1,15 @@ --- title: "コールバック情報を送信する" description: "Adjustにコールバック情報を送信するには、これらのメソッドを使用してください。" -slug: "ja/sdk/cocos2dx/features/callbacks" +slug: "ja/sdk/cocos2dx/v4/features/callbacks" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ja/sdk/cocos2dx/features/callbacks --- SDKがAdjustに情報を送信する時に関数をトリガーするコールバックを設定します。コールバックは **セッション** と **イベント** に対して設定できます。 diff --git a/src/content/docs/sdk/cocos2dx/features/callbacks-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/features/callbacks-ko.mdx similarity index 98% rename from src/content/docs/sdk/cocos2dx/features/callbacks-ko.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/callbacks-ko.mdx index 3cdcc5d4d..d6aced8fa 100644 --- a/src/content/docs/sdk/cocos2dx/features/callbacks-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/callbacks-ko.mdx @@ -1,7 +1,15 @@ --- title: "콜백 정보 전송" description: "이 메서드를 사용하여 콜백 정보를 Adjust로 전송합니다." -slug: "ko/sdk/cocos2dx/features/callbacks" +slug: "ko/sdk/cocos2dx/v4/features/callbacks" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ko/sdk/cocos2dx/features/callbacks --- SDK가 Adjust에 정보를 보낼 때 함수를 트리거하는 콜백을 설정합니다. 콜백은 **세션** 및 **이벤트** 에 대해 설정할 수 있습니다. diff --git a/src/content/docs/sdk/cocos2dx/features/callbacks-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/features/callbacks-zh.mdx similarity index 97% rename from src/content/docs/sdk/cocos2dx/features/callbacks-zh.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/callbacks-zh.mdx index f7e91c3ed..b8d8d681d 100644 --- a/src/content/docs/sdk/cocos2dx/features/callbacks-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/callbacks-zh.mdx @@ -1,7 +1,15 @@ --- title: "发送回传信息" description: "使用这些方法向 Adjust 发送回传信息。" -slug: "zh/sdk/cocos2dx/features/callbacks" +slug: "zh/sdk/cocos2dx/v4/features/callbacks" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /zh/sdk/cocos2dx/features/callbacks --- 设置回传来在 SDK 向 Adjust 发送信息时触发函数。您可以针对 **会话** 和 **事件** 设置回传。 diff --git a/src/content/docs/sdk/cocos2dx/features/callbacks.mdx b/src/content/docs/sdk/cocos2dx/v4/features/callbacks.mdx similarity index 98% rename from src/content/docs/sdk/cocos2dx/features/callbacks.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/callbacks.mdx index fe7424c04..000db2a03 100644 --- a/src/content/docs/sdk/cocos2dx/features/callbacks.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/callbacks.mdx @@ -1,7 +1,15 @@ --- title: Send callback information description: Use these methods to send callback information to Adjust. -slug: en/sdk/cocos2dx/features/callbacks +slug: en/sdk/cocos2dx/v4/features/callbacks +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /en/sdk/cocos2dx/features/callbacks --- Set up callbacks to trigger functions when the SDK sends information to Adjust. You can set up callbacks for **sessions** and **events**. diff --git a/src/content/docs/sdk/cocos2dx/features/deep-links-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/features/deep-links-ja.mdx similarity index 95% rename from src/content/docs/sdk/cocos2dx/features/deep-links-ja.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/deep-links-ja.mdx index 21905375e..875c8000c 100644 --- a/src/content/docs/sdk/cocos2dx/features/deep-links-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/deep-links-ja.mdx @@ -2,7 +2,15 @@ title: "ディープリンク" description: "ディープリンクを設定するには、このセクションのガイドに従ってください。" category-title: "ディープリンク" -slug: "ja/sdk/cocos2dx/features/deep-links" +slug: "ja/sdk/cocos2dx/v4/features/deep-links" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ja/sdk/cocos2dx/features/deep-links --- ディープリンクを作成して、ユーザーをアプリ内の特定の場所に誘導します。Adjust SDKは、ユーザーがデバイスにアプリをインストール済みかどうかによって、異なるロジックを使用します。 diff --git a/src/content/docs/sdk/cocos2dx/features/deep-links-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/features/deep-links-ko.mdx similarity index 94% rename from src/content/docs/sdk/cocos2dx/features/deep-links-ko.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/deep-links-ko.mdx index a3a3aa6c2..160a2a2be 100644 --- a/src/content/docs/sdk/cocos2dx/features/deep-links-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/deep-links-ko.mdx @@ -2,7 +2,15 @@ title: "딥링킹" description: "이 섹션의 가이드를 참조하여 딥링킹을 설정합니다." category-title: "딥링킹" -slug: "ko/sdk/cocos2dx/features/deep-links" +slug: "ko/sdk/cocos2dx/v4/features/deep-links" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ko/sdk/cocos2dx/features/dee-links --- 사용자를 앱의 특정 페이지로 이동시키기 위해 딥링크를 생성할 수 있습니다. Adjust SDK는 사용자 기기에 앱이 이미 설치되어 있는지 여부에 따라 다른 로직을 적용합니다. diff --git a/src/content/docs/sdk/cocos2dx/features/deep-links-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/features/deep-links-zh.mdx similarity index 93% rename from src/content/docs/sdk/cocos2dx/features/deep-links-zh.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/deep-links-zh.mdx index c89b218e7..1efeb601d 100644 --- a/src/content/docs/sdk/cocos2dx/features/deep-links-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/deep-links-zh.mdx @@ -2,7 +2,15 @@ title: "深度链接" description: "按照本节中的说明操作,设置深度链接。" category-title: "深度链接" -slug: "zh/sdk/cocos2dx/features/deep-links" +slug: "zh/sdk/cocos2dx/v4/features/deep-links" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /zh/sdk/cocos2dx/features/deep-links --- 您可以创建深度链接来将用户转到应用中的特定页面。针对用户是否已在设备上安装您的应用,Adjust SDK 会使用不同的逻辑: diff --git a/src/content/docs/sdk/cocos2dx/features/deep-links.mdx b/src/content/docs/sdk/cocos2dx/v4/features/deep-links.mdx similarity index 93% rename from src/content/docs/sdk/cocos2dx/features/deep-links.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/deep-links.mdx index b63a384e4..3aae77deb 100644 --- a/src/content/docs/sdk/cocos2dx/features/deep-links.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/deep-links.mdx @@ -2,7 +2,15 @@ title: Deep linking description: Follow the guides in this section to set up deep linking. category-title: Deep linking -slug: en/sdk/cocos2dx/features/deep-links +slug: en/sdk/cocos2dx/v4/features/deep-links +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /en/sdk/cocos2dx/features/deep-links --- You can create deep links to take users to specific pages in your app. The Adjust SDK uses different logic depending on if the user already has your app installed on their device: diff --git a/src/content/docs/sdk/cocos2dx/features/device-info-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/features/device-info-ja.mdx similarity index 92% rename from src/content/docs/sdk/cocos2dx/features/device-info-ja.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/device-info-ja.mdx index 6e16ccdea..b13cf810a 100644 --- a/src/content/docs/sdk/cocos2dx/features/device-info-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/device-info-ja.mdx @@ -1,7 +1,15 @@ --- title: "デバイス情報を取得" description: "これらのメソッドを使用することでコールバックに詳細を追加し、レポートを改善させましょう。" -slug: "ja/sdk/cocos2dx/features/device-info" +slug: "ja/sdk/cocos2dx/v4/features/device-info" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ja/sdk/cocos2dx/features/device-info --- Adjust SDKには、デバイス情報を返すヘルパーメソッドが含まれています。これらのメソッドを使用することでコールバックに詳細を追加し、レポートを改善させましょう。 diff --git a/src/content/docs/sdk/cocos2dx/features/device-info-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/features/device-info-ko.mdx similarity index 92% rename from src/content/docs/sdk/cocos2dx/features/device-info-ko.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/device-info-ko.mdx index de4d3f892..f0a9d1a7c 100644 --- a/src/content/docs/sdk/cocos2dx/features/device-info-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/device-info-ko.mdx @@ -1,7 +1,15 @@ --- title: "디바이스 정보 확인" description: "해당 메서드를 사용하여 콜백에 세부 정보를 추가하고 리포트를 보완하시기 바랍니다." -slug: "ko/sdk/cocos2dx/features/device-info" +slug: "ko/sdk/cocos2dx/v4/features/device-info" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ko/sdk/cocos2dx/features/device-info --- Adjust SDK는 디바이스 정보를 반환하는 헬프 메서드가 포함되어 있습니다. 해당 메서드를 사용하여 콜백에 세부 정보를 추가하고 리포트를 보완하시기 바랍니다. diff --git a/src/content/docs/sdk/cocos2dx/features/device-info-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/features/device-info-zh.mdx similarity index 91% rename from src/content/docs/sdk/cocos2dx/features/device-info-zh.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/device-info-zh.mdx index 83978d394..6b2a6313f 100644 --- a/src/content/docs/sdk/cocos2dx/features/device-info-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/device-info-zh.mdx @@ -1,7 +1,15 @@ --- title: "获取设备信息" description: "用这些方法来向回传添加细节信息,优化报告。" -slug: "zh/sdk/cocos2dx/features/device-info" +slug: "zh/sdk/cocos2dx/v4/features/device-info" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /zh/sdk/cocos2dx/features/device-info --- Adjust SDK 包含能够返回设备信息的辅助方法。用这些方法来向回传添加细节信息,优化报告。 diff --git a/src/content/docs/sdk/cocos2dx/features/device-info.mdx b/src/content/docs/sdk/cocos2dx/v4/features/device-info.mdx similarity index 91% rename from src/content/docs/sdk/cocos2dx/features/device-info.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/device-info.mdx index 158529649..060312e66 100644 --- a/src/content/docs/sdk/cocos2dx/features/device-info.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/device-info.mdx @@ -1,7 +1,15 @@ --- title: Get device information description: Use these methods to add details to your callbacks and improve your reporting. -slug: en/sdk/cocos2dx/features/device-info +slug: en/sdk/cocos2dx/v4/features/device-info +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /en/sdk/cocos2dx/features/device-info --- The Adjust SDK contains helper methods that return device information. Use these methods to add details to your callbacks and improve your reporting. diff --git a/src/content/docs/sdk/cocos2dx/features/events-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/features/events-ja.mdx similarity index 99% rename from src/content/docs/sdk/cocos2dx/features/events-ja.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/events-ja.mdx index 74900e2fa..f07987228 100644 --- a/src/content/docs/sdk/cocos2dx/features/events-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/events-ja.mdx @@ -1,7 +1,15 @@ --- title: "イベント情報を送信する" description: "Adjustにイベント情報を送信するには、これらのメソッドを使用してください。" -slug: "ja/sdk/cocos2dx/features/events" +slug: "ja/sdk/cocos2dx/v4/features/events" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ja/sdk/cocos2dx/features/events --- Adjust SDKは`AdjustEvent2dx`オブジェクトを提供しており、アプリのイベント情報を構造化してAdjustのサーバーに送信することができます。 diff --git a/src/content/docs/sdk/cocos2dx/features/events-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/features/events-ko.mdx similarity index 99% rename from src/content/docs/sdk/cocos2dx/features/events-ko.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/events-ko.mdx index a58e410d4..30bb01ab4 100644 --- a/src/content/docs/sdk/cocos2dx/features/events-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/events-ko.mdx @@ -1,7 +1,15 @@ --- title: "이벤트 정보 전송" description: "이 메서드를 사용하여 이벤트 정보를 Adjust로 전송합니다." -slug: "ko/sdk/cocos2dx/features/events" +slug: "ko/sdk/cocos2dx/v4/features/events" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ko/sdk/cocos2dx/features/events --- Adjust SDK가 제공하는 `AdjustEvent2dx` 객체는 이벤트 정보를 구성하고 이러한 정보를 앱에서 Adjust 서버로 전송하는 데 사용할 수 있습니다. diff --git a/src/content/docs/sdk/cocos2dx/features/events-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/features/events-zh.mdx similarity index 99% rename from src/content/docs/sdk/cocos2dx/features/events-zh.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/events-zh.mdx index cf57ce2db..aa84383b6 100644 --- a/src/content/docs/sdk/cocos2dx/features/events-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/events-zh.mdx @@ -2,6 +2,14 @@ title: "发送事件信息" description: "使用这些方法向 Adjust 发送事件信息。" slug: "zh/sdk/cocos2dx/features/events" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /zh/sdk/cocos2dx/features/events --- Adjust SDK 提供一个 `AdjustEvent2dx` 对象,用于架构并向 Adjust 服务器发送来自您应用的事件信息。 diff --git a/src/content/docs/sdk/cocos2dx/features/events.mdx b/src/content/docs/sdk/cocos2dx/v4/features/events.mdx similarity index 99% rename from src/content/docs/sdk/cocos2dx/features/events.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/events.mdx index 0ce17235b..8813c3653 100644 --- a/src/content/docs/sdk/cocos2dx/features/events.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/events.mdx @@ -2,6 +2,14 @@ title: Send event information description: Use these methods to send event information to Adjust. slug: en/sdk/cocos2dx/features/events +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /en/sdk/cocos2dx/features/events --- The Adjust SDK provides an `AdjustEvent2dx` object which can be used to structure and send event information from your app to Adjust's servers. diff --git a/src/content/docs/sdk/cocos2dx/features/index-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/features/index-ja.mdx similarity index 62% rename from src/content/docs/sdk/cocos2dx/features/index-ja.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/index-ja.mdx index 8862b34d1..e4211fa84 100644 --- a/src/content/docs/sdk/cocos2dx/features/index-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/index-ja.mdx @@ -2,9 +2,17 @@ title: "機能" description: "Adjust SDKを使用して、アプリ内情報をAdjustのサーバーに送信します。" category-title: "機能" -slug: "ja/sdk/cocos2dx/features" +slug: "ja/sdk/cocos2dx/v4/features" type: "category" sidebar-position: 3 +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ja/sdk/cocos2dx/features --- Adjust SDKを使用して、アプリ内情報をAdjustのサーバーに送信します。 diff --git a/src/content/docs/sdk/cocos2dx/features/index-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/features/index-ko.mdx similarity index 60% rename from src/content/docs/sdk/cocos2dx/features/index-ko.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/index-ko.mdx index e4e1ce3a6..f13346202 100644 --- a/src/content/docs/sdk/cocos2dx/features/index-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/index-ko.mdx @@ -2,9 +2,17 @@ title: "기능" description: "Adjust SDK를 사용하여 Adjust 서버로 인앱 정보를 전송합니다." category-title: "기능" -slug: "ko/sdk/cocos2dx/features" +slug: "ko/sdk/cocos2dx/v4/features" type: "category" sidebar-position: 3 +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ko/sdk/cocos2dx/features --- Adjust SDK를 사용하여 Adjust 서버로 인앱 정보를 전송합니다. diff --git a/src/content/docs/sdk/cocos2dx/features/index-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/features/index-zh.mdx similarity index 57% rename from src/content/docs/sdk/cocos2dx/features/index-zh.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/index-zh.mdx index fe4513d2a..f06e3a4fb 100644 --- a/src/content/docs/sdk/cocos2dx/features/index-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/index-zh.mdx @@ -2,9 +2,17 @@ title: "功能" description: "使用 Adjust SDK,向 Adjust 服务器发送应用内信息。" category-title: "功能" -slug: "zh/sdk/cocos2dx/features" +slug: "zh/sdk/cocos2dx/v4/features" type: "category" sidebar-position: 3 +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /zh/sdk/cocos2dx/features --- 使用 Adjust SDK,向 Adjust 服务器发送应用内信息。 diff --git a/src/content/docs/sdk/cocos2dx/features/index.mdx b/src/content/docs/sdk/cocos2dx/v4/features/index.mdx similarity index 58% rename from src/content/docs/sdk/cocos2dx/features/index.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/index.mdx index 8426be3e0..52b717fcd 100644 --- a/src/content/docs/sdk/cocos2dx/features/index.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/index.mdx @@ -2,9 +2,17 @@ title: Features description: Use the Adjust SDK to send in-app information to Adjust's servers. category-title: Features -slug: en/sdk/cocos2dx/features +slug: en/sdk/cocos2dx/v4/features type: category sidebar-position: 3 +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /en/sdk/cocos2dx/features --- Use the Adjust SDK to send in-app information to Adjust's servers. diff --git a/src/content/docs/sdk/cocos2dx/features/privacy-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/features/privacy-ja.mdx similarity index 99% rename from src/content/docs/sdk/cocos2dx/features/privacy-ja.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/privacy-ja.mdx index 301518d3b..092af3e3a 100644 --- a/src/content/docs/sdk/cocos2dx/features/privacy-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/privacy-ja.mdx @@ -1,7 +1,15 @@ --- title: "プライバシー機能の設定" description: "アプリ内でユーザーのプライバシーを処理するために使用できる機能を設定します。" -slug: "ja/sdk/cocos2dx/features/privacy" +slug: "ja/sdk/cocos2dx/v4/features/privacy" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ja/sdk/cocos2dx/features/privacy --- Adjust SDKには、アプリ内でのユーザープライバシーの処理に使用できる機能が含まれています。 diff --git a/src/content/docs/sdk/cocos2dx/features/privacy-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/features/privacy-ko.mdx similarity index 99% rename from src/content/docs/sdk/cocos2dx/features/privacy-ko.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/privacy-ko.mdx index 87f2acdd1..d05888316 100644 --- a/src/content/docs/sdk/cocos2dx/features/privacy-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/privacy-ko.mdx @@ -1,7 +1,15 @@ --- title: "프라이버시 기능 설정" description: "앱에서 사용자 프라이버시를 관리할 수 있는 기능을 구성합니다." -slug: "ko/sdk/cocos2dx/features/privacy" +slug: "ko/sdk/cocos2dx/v4/features/privacy" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ko/sdk/cocos2dx/features/privacy --- Adjust SDK에는 앱에서 사용자 프라이버시를 관리할 수 있는 기능이 포함되어 있습니다. diff --git a/src/content/docs/sdk/cocos2dx/features/privacy-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/features/privacy-zh.mdx similarity index 98% rename from src/content/docs/sdk/cocos2dx/features/privacy-zh.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/privacy-zh.mdx index 454709641..c576d81cc 100644 --- a/src/content/docs/sdk/cocos2dx/features/privacy-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/privacy-zh.mdx @@ -1,7 +1,15 @@ --- title: "设置隐私功能" description: "配置处理应用用户隐私的功能。" -slug: "zh/sdk/cocos2dx/features/privacy" +slug: "zh/sdk/cocos2dx/v4/features/privacy" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /zh/sdk/cocos2dx/features/deep-links --- Adjust SDK 包含处理应用用户隐私的功能。 diff --git a/src/content/docs/sdk/cocos2dx/features/privacy.mdx b/src/content/docs/sdk/cocos2dx/v4/features/privacy.mdx similarity index 99% rename from src/content/docs/sdk/cocos2dx/features/privacy.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/privacy.mdx index 8bb9d0ca9..4fb86f435 100644 --- a/src/content/docs/sdk/cocos2dx/features/privacy.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/privacy.mdx @@ -1,7 +1,15 @@ --- title: Set up privacy features description: Configure features that you can use to handle user privacy in your app. -slug: en/sdk/cocos2dx/features/privacy +slug: en/sdk/cocos2dx/v4/features/privacy +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /en/sdk/cocos2dx/features/privacy --- The Adjust SDK contains features that you can use to handle user privacy in your app. diff --git a/src/content/docs/sdk/cocos2dx/features/session-parameters-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/features/session-parameters-ja.mdx similarity index 97% rename from src/content/docs/sdk/cocos2dx/features/session-parameters-ja.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/session-parameters-ja.mdx index 4fc0ddde2..a671f37e5 100644 --- a/src/content/docs/sdk/cocos2dx/features/session-parameters-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/session-parameters-ja.mdx @@ -2,6 +2,14 @@ title: "セッションパラメーターを設定する" description: "セッションごとにコールバックURLに情報を送信します。" slug: "ja/sdk/cocos2dx/features/session-parameters" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ja/sdk/cocos2dx/features/session-parameters --- Adjustダッシュボードで[コールバックURLを登録](https://help.adjust.com/ja/article/recommended-placeholders-callbacks)した場合、SDKがセッションを計測するとAdjustはコールバックURLにGETリクエストを送信します。 diff --git a/src/content/docs/sdk/cocos2dx/features/session-parameters-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/features/session-parameters-ko.mdx similarity index 96% rename from src/content/docs/sdk/cocos2dx/features/session-parameters-ko.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/session-parameters-ko.mdx index ee2bc4e17..10571a9cf 100644 --- a/src/content/docs/sdk/cocos2dx/features/session-parameters-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/session-parameters-ko.mdx @@ -1,7 +1,15 @@ --- title: "세션 파라미터 설정" description: "각 세션의 콜백 URL에 정보를 전송합니다." -slug: "ko/sdk/cocos2dx/features/session-parameters" +slug: "ko/sdk/cocos2dx/v4/features/session-parameters" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ko/sdk/cocos2dx/features/session-parameters --- Adjust 대시보드에 [콜백 URL을 등록](https://help.adjust.com/ko/article/recommended-placeholders-callbacks)하면 SDK가 세션을 측정할 때 Adjust가 GET 요청을 콜백 URL로 보냅니다. diff --git a/src/content/docs/sdk/cocos2dx/features/session-parameters-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/features/session-parameters-zh.mdx similarity index 95% rename from src/content/docs/sdk/cocos2dx/features/session-parameters-zh.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/session-parameters-zh.mdx index 33a6e44b3..c5fe93f73 100644 --- a/src/content/docs/sdk/cocos2dx/features/session-parameters-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/session-parameters-zh.mdx @@ -1,7 +1,15 @@ --- title: "配置会话参数" description: "将每次会话信息发送至回传 URL。" -slug: "zh/sdk/cocos2dx/features/session-parameters" +slug: "zh/sdk/cocos2dx/v4/features/session-parameters" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /zh/sdk/cocos2dx/features/session-parameters --- 您在 Adjust 控制面板中[注册回传 URL](https://help.adjust.com/zh/article/recommended-placeholders-callbacks),SDK 监测到会话后,Adjust 会向您的回传 URL 发送一个 GET 请求。 diff --git a/src/content/docs/sdk/cocos2dx/features/session-parameters.mdx b/src/content/docs/sdk/cocos2dx/v4/features/session-parameters.mdx similarity index 95% rename from src/content/docs/sdk/cocos2dx/features/session-parameters.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/session-parameters.mdx index 43bac742d..1c0d8e78b 100644 --- a/src/content/docs/sdk/cocos2dx/features/session-parameters.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/session-parameters.mdx @@ -1,7 +1,15 @@ --- title: Configure session parameters description: Send information to your callback URL with each session. -slug: en/sdk/cocos2dx/features/session-parameters +slug: en/sdk/cocos2dx/v4/features/session-parameters +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /en/sdk/cocos2dx/features/session-parameters --- 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. diff --git a/src/content/docs/sdk/cocos2dx/features/short-links-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/features/short-links-ja.mdx similarity index 91% rename from src/content/docs/sdk/cocos2dx/features/short-links-ja.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/short-links-ja.mdx index 795ce11ff..59813fd09 100644 --- a/src/content/docs/sdk/cocos2dx/features/short-links-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/short-links-ja.mdx @@ -1,7 +1,15 @@ --- title: "ショートブランドリンクを解析" description: "Campaign Labで作成された短縮リンクを解析します。" -slug: "ja/sdk/cocos2dx/features/short-links" +slug: "ja/sdk/cocos2dx/v4/features/short-links" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ja/sdk/cocos2dx/features/short-links --- Adjustの[リンク短縮ソリューション](https://help.adjust.com/ja/article/short-branded-links)は、複雑で長いリンクをより簡潔で短いリンクに変換します。短縮リンクはディープリンクとキャンペーン情報を保持し、アプリがインストールされていない場合は、ユーザーをApp Storeに誘導します。 diff --git a/src/content/docs/sdk/cocos2dx/features/short-links-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/features/short-links-ko.mdx similarity index 90% rename from src/content/docs/sdk/cocos2dx/features/short-links-ko.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/short-links-ko.mdx index 7354d0a48..47d9caca9 100644 --- a/src/content/docs/sdk/cocos2dx/features/short-links-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/short-links-ko.mdx @@ -1,7 +1,15 @@ --- title: "숏 브랜드 링크 해결" description: "Campaign Lab에서 생성된 숏 링크를 해석합니다." -slug: "ko/sdk/cocos2dx/features/short-links" +slug: "ko/sdk/cocos2dx/v4/features/short-links" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ko/sdk/cocos2dx/features/short-links --- Adjust의 [링크 단축 솔루션](https://help.adjust.com/ko/article/short-branded-links)은 복잡하고 긴 링크를 간결하고 간결한 링크로 만들어줍니다. 숏 링크는 딥링크와 캠페인 정보를 유지하며, 사용자가 아직 앱을 설치하지 않은 경우 앱 스토어로 라우팅합니다. diff --git a/src/content/docs/sdk/cocos2dx/features/short-links-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/features/short-links-zh.mdx similarity index 89% rename from src/content/docs/sdk/cocos2dx/features/short-links-zh.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/short-links-zh.mdx index ef2046868..ed0c2da1b 100644 --- a/src/content/docs/sdk/cocos2dx/features/short-links-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/short-links-zh.mdx @@ -1,7 +1,15 @@ --- title: "解析品牌化短链接" description: "解析在 Campaign Lab 中创建的短链接。" -slug: "zh/sdk/cocos2dx/features/short-links" +slug: "zh/sdk/cocos2dx/v4/features/short-links" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /zh/sdk/cocos2dx/features/short-links --- Adjust 的[短链接解决方案](https://help.adjust.com/zh/article/short-branded-links)能将复杂的长链接变成简洁的短链接。短链接会保留深度链接和推广活动信息,如果用户尚未安装您的应用,则会将用户转到应用商店。 diff --git a/src/content/docs/sdk/cocos2dx/features/short-links.mdx b/src/content/docs/sdk/cocos2dx/v4/features/short-links.mdx similarity index 90% rename from src/content/docs/sdk/cocos2dx/features/short-links.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/short-links.mdx index 720a1fac7..324a53be9 100644 --- a/src/content/docs/sdk/cocos2dx/features/short-links.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/short-links.mdx @@ -1,7 +1,15 @@ --- title: Resolve short branded links description: Resolve short links that were created in Campaign Lab. -slug: en/sdk/cocos2dx/features/short-links +slug: en/sdk/cocos2dx/v4/features/short-links +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /en/sdk/cocos2dx/features/short-links --- Adjust's [link shortener solution](https://help.adjust.com/en/article/short-branded-links) converts your complex and long links into cleaner and shorter links. The shortened links retain deep link and campaign information, and route users to the app store, if they don't have your app installed. diff --git a/src/content/docs/sdk/cocos2dx/features/skad-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/features/skad-ja.mdx similarity index 96% rename from src/content/docs/sdk/cocos2dx/features/skad-ja.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/skad-ja.mdx index e6361d427..b02e95fe4 100644 --- a/src/content/docs/sdk/cocos2dx/features/skad-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/skad-ja.mdx @@ -1,7 +1,15 @@ --- title: "SKAdNetworkとconversion valueの設定" description: "iOSアプリのSKAdNetwork機能を設定します。" -slug: "ja/sdk/cocos2dx/features/skad" +slug: "ja/sdk/cocos2dx/v4/features/skad" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ja/sdk/cocos2dx/features/skad --- diff --git a/src/content/docs/sdk/cocos2dx/features/skad-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/features/skad-ko.mdx similarity index 96% rename from src/content/docs/sdk/cocos2dx/features/skad-ko.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/skad-ko.mdx index d4bb94206..3bac7d60f 100644 --- a/src/content/docs/sdk/cocos2dx/features/skad-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/skad-ko.mdx @@ -1,7 +1,15 @@ --- title: "SKAdNetwork 및 전환값 설정" description: "iOS 앱의 SKAdNetwork 기능을 구성합니다." -slug: "ko/sdk/cocos2dx/features/skad" +slug: "ko/sdk/cocos2dx/v4/features/skad" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ko/sdk/cocos2dx/features/skad --- diff --git a/src/content/docs/sdk/cocos2dx/features/skad-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/features/skad-zh.mdx similarity index 95% rename from src/content/docs/sdk/cocos2dx/features/skad-zh.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/skad-zh.mdx index aa3588f88..04fb0be26 100644 --- a/src/content/docs/sdk/cocos2dx/features/skad-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/skad-zh.mdx @@ -1,7 +1,15 @@ --- title: "设置 SKAdNetwork 和转化值" description: "为 iOS 应用配置 SKAdNetwork 功能。" -slug: "zh/sdk/cocos2dx/features/skad" +slug: "zh/sdk/cocos2dx/v4/features/skad" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /zh/sdk/cocos2dx/features/skad --- diff --git a/src/content/docs/sdk/cocos2dx/features/skad.mdx b/src/content/docs/sdk/cocos2dx/v4/features/skad.mdx similarity index 96% rename from src/content/docs/sdk/cocos2dx/features/skad.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/skad.mdx index 8be6c7fc2..1ac7d8415 100644 --- a/src/content/docs/sdk/cocos2dx/features/skad.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/skad.mdx @@ -1,7 +1,15 @@ --- title: Set up SKAdNetwork and conversion values description: Configure SKAdNetwork features for your iOS apps. -slug: en/sdk/cocos2dx/features/skad +slug: en/sdk/cocos2dx/v4/features/skad +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /en/sdk/cocos2dx/features/skad --- diff --git a/src/content/docs/sdk/cocos2dx/features/subscriptions-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/features/subscriptions-ja.mdx similarity index 98% rename from src/content/docs/sdk/cocos2dx/features/subscriptions-ja.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/subscriptions-ja.mdx index 5fd6f9c93..7677a248d 100644 --- a/src/content/docs/sdk/cocos2dx/features/subscriptions-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/subscriptions-ja.mdx @@ -1,7 +1,15 @@ --- title: "サブスクリプション情報の送信" description: "Adjustにサブスクリプション情報を送信するには、これらのメソッドを使用してください。" -slug: "ja/sdk/cocos2dx/features/subscriptions" +slug: "ja/sdk/cocos2dx/v4/features/subscriptions" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ja/sdk/cocos2dx/features/subscriptions --- diff --git a/src/content/docs/sdk/cocos2dx/features/subscriptions-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/features/subscriptions-ko.mdx similarity index 98% rename from src/content/docs/sdk/cocos2dx/features/subscriptions-ko.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/subscriptions-ko.mdx index 3f6224b56..aa13772e2 100644 --- a/src/content/docs/sdk/cocos2dx/features/subscriptions-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/subscriptions-ko.mdx @@ -1,7 +1,15 @@ --- title: "구독 정보 전송" description: "이 메서드를 사용하여 구독 정보를 Adjust로 전송합니다." -slug: "ko/sdk/cocos2dx/features/subscriptions" +slug: "ko/sdk/cocos2dx/v4/features/subscriptions" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ko/sdk/cocos2dx/features/subscriptions --- diff --git a/src/content/docs/sdk/cocos2dx/features/subscriptions-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/features/subscriptions-zh.mdx similarity index 98% rename from src/content/docs/sdk/cocos2dx/features/subscriptions-zh.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/subscriptions-zh.mdx index 0d4d70791..46de1752b 100644 --- a/src/content/docs/sdk/cocos2dx/features/subscriptions-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/subscriptions-zh.mdx @@ -1,7 +1,15 @@ --- title: "发送订阅信息" description: "使用这些方法向 Adjust 发送订阅信息。" -slug: "zh/sdk/cocos2dx/features/subscriptions" +slug: "zh/sdk/cocos2dx/v4/features/subscriptions" +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /zh/sdk/cocos2dx/features/subscriptions --- diff --git a/src/content/docs/sdk/cocos2dx/features/subscriptions.mdx b/src/content/docs/sdk/cocos2dx/v4/features/subscriptions.mdx similarity index 98% rename from src/content/docs/sdk/cocos2dx/features/subscriptions.mdx rename to src/content/docs/sdk/cocos2dx/v4/features/subscriptions.mdx index de937a105..91ea40c54 100644 --- a/src/content/docs/sdk/cocos2dx/features/subscriptions.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/subscriptions.mdx @@ -1,7 +1,15 @@ --- title: Send subscription information description: Use these methods send subscription information to Adjust. -slug: en/sdk/cocos2dx/features/subscriptions +slug: en/sdk/cocos2dx/v4/features/subscriptions +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /en/sdk/cocos2dx/features/subscriptions --- diff --git a/src/content/docs/sdk/cocos2dx/index-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/index-ja.mdx similarity index 99% rename from src/content/docs/sdk/cocos2dx/index-ja.mdx rename to src/content/docs/sdk/cocos2dx/v4/index-ja.mdx index 430a9e819..0d742c441 100644 --- a/src/content/docs/sdk/cocos2dx/index-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/index-ja.mdx @@ -4,6 +4,14 @@ description: "Cocos2d-xアプリでAdjustの機能にアクセスするには、 category-title: "Cocos2d-x SDK" slug: "ja/sdk/cocos2dx" sidebar-position: 7 +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ja/sdk/cocos2dx --- AdjustのAndroid SDKを実装することで、アトリビューション、イベント、さらにその他のさまざまなデータをCocos2d\-xアプリで記録できます。Adjust SDKをアプリに実装するには、以下の手順に従ってください。 diff --git a/src/content/docs/sdk/cocos2dx/index-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/index-ko.mdx similarity index 99% rename from src/content/docs/sdk/cocos2dx/index-ko.mdx rename to src/content/docs/sdk/cocos2dx/v4/index-ko.mdx index 3ff29e01a..b78fb812e 100644 --- a/src/content/docs/sdk/cocos2dx/index-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/index-ko.mdx @@ -4,6 +4,14 @@ description: "웹 SDK를 사용해 Cocos2d-x 앱의 Adjust 기능에 액세스 category-title: "Cocos2d-x SDK" slug: "ko/sdk/cocos2dx" sidebar-position: 7 +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /ko/sdk/cocos2dx --- Adjust Android SDK를 사용하면 Cocos2d\-x 앱에서의 어트리뷰션, 이벤트 등을 기록할 수 있습니다. 본 가이드의 단계를 수행하여 Adjust SDK와 연동되도록 앱을 설정하시기 바랍니다. diff --git a/src/content/docs/sdk/cocos2dx/index-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/index-zh.mdx similarity index 98% rename from src/content/docs/sdk/cocos2dx/index-zh.mdx rename to src/content/docs/sdk/cocos2dx/v4/index-zh.mdx index 02fa02fcc..e9b62010b 100644 --- a/src/content/docs/sdk/cocos2dx/index-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/index-zh.mdx @@ -4,6 +4,14 @@ description: "使用 Web SDK 在您的 Cocos2d-x 应用中使用 Adjust 功能" category-title: "Cocos2d-x SDK" slug: "zh/sdk/cocos2dx" sidebar-position: 7 +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /zh/sdk/cocos2dx --- 通过 Adjust 安卓 SDK,您可以在 Cocos2d\-x 应用中记录归因、事件及更多数据。请按照本指南中说明的步骤对应用进行设置,以便使用 Adjust SDK。 diff --git a/src/content/docs/sdk/cocos2dx/index.mdx b/src/content/docs/sdk/cocos2dx/v4/index.mdx similarity index 98% rename from src/content/docs/sdk/cocos2dx/index.mdx rename to src/content/docs/sdk/cocos2dx/v4/index.mdx index 658fe9ab2..e0bd3df6b 100644 --- a/src/content/docs/sdk/cocos2dx/index.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/index.mdx @@ -2,8 +2,16 @@ title: Cocos2d-x SDK integration guide description: Use the Web SDK to access Adjust's features in your Cocos2d-x apps category-title: Cocos2d-x SDK -slug: en/sdk/cocos2dx +slug: en/sdk/cocos2dx/v4 sidebar-position: 7 +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /en/sdk/cocos2dx --- The Adjust Android SDK enables you to record attribution, events, and more in your Cocos2d-x app. Follow the steps in this guide to set up your app to work with the Adjust SDK. From cb9333bc6b6c8014c6c8e3faad44ea3ead3a1801 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Tue, 24 Sep 2024 16:50:48 +0200 Subject: [PATCH 07/59] Add support for checkbox lists --- .schema/List.markdoc.js | 51 +++++++++++++++++++++++++++++++++++++++++ markdoc.config.mjs | 2 ++ src/styles/index.css | 16 ++++++++----- 3 files changed, 63 insertions(+), 6 deletions(-) create mode 100644 .schema/List.markdoc.js diff --git a/.schema/List.markdoc.js b/.schema/List.markdoc.js new file mode 100644 index 000000000..a8d34d757 --- /dev/null +++ b/.schema/List.markdoc.js @@ -0,0 +1,51 @@ +import markdoc from "@markdoc/markdoc"; +const { Tag } = markdoc; + +/** + * A function to transform checkbox markers ([ ] and [x]) into checkboxes + * @param children The child elements of the list item + * @returns Updated children with checkboxes added if necessary + */ +function transformListItemChildren(children) { + return children.flatMap((child, index) => { + if (typeof child === 'string' && index === 0) { + if (child.startsWith("[ ]")) { + return [ + new Tag("input", { type: "checkbox" }, []), + child.slice(3).trim() + ]; + } else if (child.startsWith("[x]")) { + return [ + new Tag("input", { type: "checkbox", checked: "", }, []), + child.slice(3).trim() + ]; + } + } else if (child instanceof Tag) { + // Recursively call this function on nested lists + return new Tag(child.name, child.attributes, transformListItemChildren(child.children)); + } + + return child; + }); +} + +export const list = { + children: ['item'], + attributes: { + ordered: { type: Boolean, default: false }, + marker: { type: String } + }, + transform(node, config) { + const attributes = node.transformAttributes(config); + const children = node.transformChildren(config); + // If it's an ordered list, do nothing + if (attributes.ordered) return new Tag("ol", attributes, children.map(child => new Tag("li", {}, child.children))); + + // If the list is unordered, apply the transformation + return new Tag("ul", attributes, children.map(child => { + // Transform each list item + const listItemChildren = transformListItemChildren(child.children); + return new Tag("li", {}, listItemChildren); + })); + } +}; diff --git a/markdoc.config.mjs b/markdoc.config.mjs index 8aae611f2..2a2698194 100644 --- a/markdoc.config.mjs +++ b/markdoc.config.mjs @@ -2,6 +2,7 @@ import { defineMarkdocConfig, nodes, component } from '@astrojs/markdoc/config'; import { heading } from ".schema/Heading.markdoc"; import { link } from ".schema/Link.markdoc"; import { paragraph } from ".schema/Paragraph.markdoc"; +import { list } from ".schema/List.markdoc"; import versions from "src/versionMap.json"; export default defineMarkdocConfig({ @@ -11,6 +12,7 @@ export default defineMarkdocConfig({ nodes: { heading, link, + list, paragraph, fence: { attributes: { ...nodes.fence.attributes }, diff --git a/src/styles/index.css b/src/styles/index.css index 877bed20f..18a5930a8 100644 --- a/src/styles/index.css +++ b/src/styles/index.css @@ -190,12 +190,12 @@ blockquote { .article-content .badge { font-family: - BlinkMacSystemFont, - -apple-system, - "Segoe UI", - Roboto, - Arial, - sans-serif; + BlinkMacSystemFont, + -apple-system, + "Segoe UI", + Roboto, + Arial, + sans-serif; @apply inline-flex items-center justify-center align-middle rounded-3xl gap-x-2; } @@ -273,6 +273,10 @@ code { @apply w-full h-auto aspect-video; } +.article-content li > input { + @apply mr-2; +} + /* Links */ a > code { From 75ccb7374719584f26246b4548a7250384fe2bee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Tue, 24 Sep 2024 16:51:04 +0200 Subject: [PATCH 08/59] Add integration guide --- src/content/docs/sdk/cocos2dx/v5/index.mdoc | 191 ++++++++++++++++++++ 1 file changed, 191 insertions(+) create mode 100644 src/content/docs/sdk/cocos2dx/v5/index.mdoc diff --git a/src/content/docs/sdk/cocos2dx/v5/index.mdoc b/src/content/docs/sdk/cocos2dx/v5/index.mdoc new file mode 100644 index 000000000..0afee4c7c --- /dev/null +++ b/src/content/docs/sdk/cocos2dx/v5/index.mdoc @@ -0,0 +1,191 @@ +--- +title: Cocos2d-x SDK integration guide +description: Use the Web SDK to access Adjust's features in your Cocos2d-x apps +category-title: Cocos2d-x SDK +slug: en/sdk/cocos2dx +sidebar-position: 7 +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v4: /en/sdk/cocos2dx/v4 +--- + +The Adjust Android SDK enables you to record attribution, events, and more in your Cocos2d-x app. Follow the steps in this guide to set up your app to work with the Adjust SDK. + +## 1. Get the Adjust SDK {% #get-the-adjust-sdk %} + +To use the Adjust SDK in your Cocos2d-x app, you need to add it to your project. You can download the latest version from the [GitHub releases page](https://github.com/adjust/cocos2dx_sdk/releases/latest). Extract the archive to a directory. + +## 2. Add the SDK to your project {% #add-the-sdk %} + +Once you've extracted the release archive, follow these steps to add the Adjust SDK to your project: + +1. Navigate to the folder into which you extracted the archive. + +1. Copy all C++ files from the `dist` directory and add them to your Cocos2d-x project. + +1. (**Android only**): add the paths of the C++ files to the `LOCAL_SRC_FILES` section of your `Android.mk` file. + + ```make + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustConfig2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustAttribution2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustProxy2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustEvent2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/Adjust2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustEventFailure2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustEventSuccess2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustSessionFailure2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustSessionSuccess2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustAppStoreSubscription2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustPlayStoreSubscription2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustThirdPartySharing2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustAdRevenue2dx.cpp + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustAppStorePurchase2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustPlayStorePurchase2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustDeeplink2dx.cpp \ + ``` + +## 3. Configure Android settings {% #android-settings %} + +To support Android devices, you need to add the Adjust Android SDK to your project dependencies. To do this, add the following to your `build.gradle` file: + +```groovy +dependencies { + implementation 'com.adjust.sdk:adjust-android:{% $versions.android.v5 %}' +} +``` + +If you don't use Maven to manage dependencies, you can download the Adjust Android SDK as an `AAR` from [the GitHub releases page](https://github.com/adjust/cocos2dx_sdk/releases). + +### Permissions {% #android-permissions %} + +The Adjust Android SDK comes with required permissions preconfigured. This includes the `com.google.android.gms.permission.AD_ID` permission. If your app needs to be compliant with the Children's Online Privacy Protection Act (COPPA), you MUST remove this permission by adding the following to your `AndroidManifest.xml` file: + +```xml + +``` + +To learn more about COPPA, read [Adjust's COPPA compliance article](https://help.adjust.com/en/article/coppa-compliance). + +### Add Google Play Services {% #add-google-play-services %} + +Apps that target the Google Play Store must use the [Google Advertising ID](https://support.google.com/googleplay/android-developer/answer/6048248?hl=en) (`gps_adid`) to identify devices. To do this, add the following dependency to the `dependencies` section of your `build.gradle` file. + +```groovy +dependencies: { + implementation 'com.google.android.gms:play-services-ads-identifier:18.1.0' +} +``` + +### Set up install referrer {% #set-up-install-referrer %} + +The install referrer is an attribution mechanism you can use to attribute an app install to a source. It consists of two parts: + +- [x] A set of APIs from these app stores that allow developers to retrieve referral content in their apps. +- [x] A `referrer` parameter that app stores, such as Google Play and Huawei App Gallery, accept in their app page URLs on their store websites. Here is how the referrer parameter is populated: + - When a user clicks on an Adjust link, the Adjust server passes a unique identifier called `reftag`. This identifier is assigned to the click and into the referrer parameter. To learn more about reftag, see the [Reftag article in the Help Center](https://help.adjust.com/en/article/reftag). + - When you run [Google Ads](https://support.google.com/google-ads/answer/6357635?hl=en) campaigns, Google passes a unique identifier called `gclid` into the referrer parameter. You MUST enable **Auto-tagging** in your Google Ads account. + +#### Google Play Referrer API + +To support the [Google Play Referrer API](https://developer.android.com/google/play/installreferrer), follow these steps: + +1. Add the Google Maven repository to your `build.gradle` file. + + ```groovy + allprojects { + repositories { + maven { + url "https://maven.google.com" + } + } + } + ``` + +1. Add the Install Referrer library to your `build.gradle` file. + + ```groovy + dependencies { + implementation 'com.android.installreferrer:installreferrer:2.2' + } + ``` + +## 4. Configure iOS settings {% #ios-settings %} + +To support iOS devices, you need to add the `Adjust.xcframework` framework to your project. To do this, specify which version you want to download in your `Podfile`: + +```rb +# Get pod from repository +pod 'Adjust', '~> {% $versions.ios.v5 %}' + +# Get source directly from GitHub +pod 'Adjust', :git => 'https://github.com/adjust/ios_sdk.git', :tag => '{% $versions.ios.v5 %}' +``` + +If you don't use Cocoapods, you can install the framework manually by fetching it from [the GitHub releases page](https://github.com/adjust/cocos2dx_sdk/releases). Once you've downloaded and extracted the archive, follow these steps to add the framework to your project: + +1. Open the project navigator. +1. Select your target. +1. Select the **Build Phases** tab. +1. Expand the **Link Binary with Libraries** group. +1. Select the **+** button. +1. Select the `Adjust.xcframework` + +| Framework | Purpose | Notes | +| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | +| `AdSupport.framework` | Required to enable the Adjust SDK to read the device IDFA. | You MUST NOT add this framework if your app targets the "Kids" category | +| `AdServices.framework` | Required for handling Apple Search Ads | | +| `StoreKit.framework` | Required to access the SKAdNetwork framework and for the Adjust SDK to handle communications with SKAdNetwork. | | +| `AppTrackingTransparency.framework` | Required in iOS 14 and later to enable the Adjust SDK to wrap the ATT consent dialog and access the user's consent response. | You SHOULD NOT add this framework if your app targets the "Kids" category | + +### Copy additional source files + +To complete iOS setup, you MUST copy all Objective-C++ (`.h` and `.mm`) files to your Xcode project alongside the Cocos2d-x C++ files. Ensure that all `.mm` files are listed in the **Build Phases —> Compile Sources** section. + +## 5. Set up SDK Signature {% #set-up-sdk-signature %} + +SDK v5 includes the [SDK signature library](https://help.adjust.com/en/article/sdk-signature). Follow the testing guide for [iOS](/en/sdk/ios/integrations/signature-library#test-your-app) and [Android](/en/sdk/android/integrations/signature-library#test-your-app) to ensure your integration works. + +Signature protection is inactive by default. To enable it, you need to: + +1. [Enforce signature validation](https://help.adjust.com/en/article/sdk-signature#enforce-signature-validation). +1. [Provide your app's SHA-1 fingerprints](https://help.adjust.com/en/article/sdk-signature#manage-your-certificate-fingerprints) prior to testing. + +## 6. Integrate the Adjust SDK {% #integrate-the-adjust-sdk %} + +Once you've updated your project settings, you can integrate the Adjust SDK into your app. To do this: + +1. Find your application delegate file in the **Project Navigator** and open it. +1. Include the `Adjust/Adjust2dx.h` class at the top of the file. +1. Instantiate an `AdjustConfig2dx` object inside the `applicationDidFinishLaunching` method with the following arguments: + - `appToken`: Your Adjust app token + - `environment`: `AdjustEnvironmentSandbox2dx` +1. Optionally adjust your [logging level](/en/sdk/cocos2dx/configuration#set-your-logging-level) to adjust the verbosity of your logging. +1. Call the `Adjust2dx::initSdk` method and pass your `AdjustConfig2dx` instance as an argument. + +{% callout type="important" %} +When running tests you should ensure that your environment is set to `AdjustEnvironmentSandbox2dx`. Change this to `AdjustEnvironmentProduction2dx` before you submit your application to app stores. +{% /callout %} + +```cpp +#include "Adjust/Adjust2dx.h" + +bool AppDelegate::applicationDidFinishLaunching() { + std::string appToken = "{YourAppToken}"; + std::string environment = AdjustEnvironmentSandbox2dx; + + AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); + adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose); + Adjust2dx::initSdl=k(adjustConfig); +} +``` + +## 7. Build your app + +Well done! You should now be able to build and run your Cocos2d-x app. Enable logging to check for any issues. Check your logs to see the `Install tracked` message. + +You are ready to start attributing your users with the Adjust SDK. From e387e2eb8b7ccb060887897e03d14558888b87fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Tue, 24 Sep 2024 17:08:12 +0200 Subject: [PATCH 09/59] Add configuration guide --- .../docs/sdk/cocos2dx/v4/configuration.mdx | 2 +- .../docs/sdk/cocos2dx/v5/configuration.mdoc | 188 ++++++++++++++++++ 2 files changed, 189 insertions(+), 1 deletion(-) create mode 100644 src/content/docs/sdk/cocos2dx/v5/configuration.mdoc diff --git a/src/content/docs/sdk/cocos2dx/v4/configuration.mdx b/src/content/docs/sdk/cocos2dx/v4/configuration.mdx index 197b6dcd8..906e85c4c 100644 --- a/src/content/docs/sdk/cocos2dx/v4/configuration.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/configuration.mdx @@ -2,7 +2,7 @@ title: Configuration description: Follow the guides in this section to configure the Adjust SDK. category-title: Configuration -slug: en/sdk/cocos2dx/configuration +slug: en/sdk/cocos2dx/v4/configuration sidebar-position: 1 versions: - label: v5 diff --git a/src/content/docs/sdk/cocos2dx/v5/configuration.mdoc b/src/content/docs/sdk/cocos2dx/v5/configuration.mdoc new file mode 100644 index 000000000..7ed8064c9 --- /dev/null +++ b/src/content/docs/sdk/cocos2dx/v5/configuration.mdoc @@ -0,0 +1,188 @@ +--- +title: Configuration +description: Follow the guides in this section to configure the Adjust SDK. +category-title: Configuration +slug: en/sdk/cocos2dx/configuration +sidebar-position: 1 +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v4: /en/sdk/cocos2dx/v4/configuration +--- + +Use the methods in this document to configure the behavior of the Adjust SDK. + +## Instantiate your config object {% #instantiate-your-config-object %} + +To configure the Adjust SDK, you need to instantiate an `AdjustConfig2dx` object. This object contains the **read-only** configuration options that you need to pass to the Adjust SDK. + +To instantiate your config object, create a new `AdjustConfig2dx` instance and pass the following parameters: + +- `appToken` (`String`): Your [Adjust app token](https://help.adjust.com/en/article/app-token-and-reporting-currency#view-your-app-details). +- `environment` (`String`): The environment you want to run the SDK in. Pass `AdjustEnvironmentSandbox2dx` to run the SDK in sandbox mode for testing. Pass `AdjustEnvironmentProduction2dx` to run the SDK in production mode for release. +- `allowSuppressLogLevel` (`Boolean`): Whether to suppress all logging. Set to `true` to suppress logging or `false` to enable logging. + +```cpp +#include "Adjust/Adjust2dx.h" +// ... +std::string appToken = "{YourAppToken}"; +std::string environment = AdjustEnvironmentSandbox2dx; + +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment, false); +Adjust2dx::initSdk(adjustConfig); +``` + +## Read-only configuration {% #read-only-configuration %} + +**Read-only** configuration options are set in your `AdjustConfig2dx` instance **before** the initialization of the SDK. They can't be changed while the SDK is running. You MUST configure any options you want to use before running `Adjust2dx::initSdk()`. + +### Set your logging level {% #set-your-logging-levelt %} + +The Adjust SDK provides configurable log levels to return different amounts of information. The following log levels are available: + +| Log level | Description | +| ------------------------------------------ | ------------------------------------------ | +| `AdjustLogLevel2dxVerbose` | Enable all logging | +| `AdjustLogLevel2dxDebug` | Enable debug logging | +| `AdjustLogLevel2dxInfo` | Only show info level logs (default option) | +| `AdjustLogLevel2dxWarn` | Disable info logging | +| `AdjustLogLevel2dxError` | Disable warning level logging and below | +| `AdjustLogLevel2dxAssert` | Disable error level logging and below | +| `AdjustLogLevel2dxSuppress` | Suppress all logging | + +You can set your log level by calling the `setLogLevel` method on your `AdjustConfig2dx` instance with the following parameter: + +- `logLevel` (`ADJLogLevel2dx`): The log level you want to use. + +```cpp +std::string appToken = "{YourAppToken}"; +std::string environment = AdjustEnvironmentSandbox2dx; + +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment, false); +adjustConfig.setLogLevel(AdjustLogLevel2dxSuppress); +Adjust2dx::initSdk(adjustConfig); +``` + +### Set external device identifier {% #set-external-device-id %} + +{% callout type="seealso" %} +See the [External device identifiers article](https://help.adjust.com/en/article/external-device-identifiers) in the Adjust help center for more information. +{% /callout %} + +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. You can set property calling the `setExternalDeviceId` method with the following parameter: + +- `externalDeviceId` (`String`): Your external device identifier. This value is **case sensitive**. If you have imported external device IDs, make sure the value you pass matches the imported value. + +```cpp +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); +adjustConfig.setExternalDeviceId("{Your-External-Device-Id}"); +Adjust2dx::initSdk(adjustConfig); +``` + +If you want to use the external device ID in your business analytics, you can pass it as a [session callback parameter](/en/sdk/cocos2dx/features/session-parameters). + +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. + +### Set default link token {% #set-default-link-token %} + +You can configure a default link token if your app is preinstalled on a device. When a user opens the preinstalled app for the first time, the install is attributed to the default link token. To set your default link token, call the `setDefaultTracker` method of your `AdjustConfig2dx` instance with the following argument: + +- `defaultTracker` (`String`): The [Adjust link token](https://help.adjust.com/en/article/links#adjust-link-token) you want to record preinstalled installs against. + +```cpp +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); +adjustConfig.setDefaultTracker("{TrackerToken}"); +Adjust2dx::initSdk(config); +``` + +### Receive ad spend data in attribution {% #receive-ad-spend-data %} + +By default, the Adjust SDK doesn't send ad spend data as part of a user's attribution. You can configure the SDK to send this data by enabling cost data sending. To enable ad spend data sending, call the `enableCostDataInAttribution()` method of your `AdjustConfig2dx` instance. + +Cost data is accessible in the user's [attribution information](/en/sdk/cocos2dx/features/attribution). + +```cpp +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); +adjustConfig.enableCostDataInAttribution(); +Adjust2dx::initSdk(config); +``` + +### Enable background recording {% #enable-background-recording %} + +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. To enable background recording, call the `setSendInBackground` method of your `AdjustConfig2dx` instance. + +```cpp +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); +adjustConfig.setSendInBackground(); +Adjust2dx::initSdk(adjustConfig); +``` + +## Dynamic configuration {% #dynamic-configuration %} + +**Dynamic** configuration options may be changed during the SDK's lifecycle in response to events or actions taken by the user. + +### Activate offline mode {% #activate-offline-mode %} + +{% callout type="important" %} +The offline mode setting isn't remembered between sessions. Offline mode is disabled at the start of each new session. +{% /callout %} + +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. + +You can toggle offline mode at any time by calling the `Adjust2dx::switchToOfflineMode()` method. + +```cpp +Adjust2dx::switchToOfflineMode(); +``` + +### Deactivate offline mode {% #deactivate-offline-mode %} + +You can re-enable the SDK by calling the `Adjust2dx::switchBackToOnlineMode()` method. This prompts the SDK to resume sending information. + +```cpp +Adjust2dx::switchBackToOnlineMode(); +``` + +### Set push tokens {% #set-push-tokens %} + +Push tokens are used for [Audiences](https://help.adjust.com/en/article/audiences) and client callbacks. They're also required for [Uninstall and reinstall measurement](https://help.adjust.com/en/article/uninstalls-reinstalls). + +You can update your push token at any time by calling the `Adjust2dx::setPushToken()` method with the following argument: + +- `pushtoken` (`String`): Your push token. + +```cpp +Adjust2dx::setPushToken("push-token"); +``` + +### Disable the SDK {% #disable-the-sdk %} + +The Adjust SDK runs by default when your app is open. You can disable the Adjust SDK to stop sending information to Adjust by calling the `Adjust2dx::disable()` method. When you disable the Adjust SDK, no data is sent to Adjust and no information is recorded by the SDK. This means that any Adjust method called when the SDK is disabled won't record anything. + +```cpp +Adjust2dx::disable(); +``` + +### Enable the SDK {% #enable-the-sdk %} + +If you've disable the SDK and want to re-enable it, call the `Adjust2dx::enable()` method. When the SDK is enabled, it will send information to Adjust's servers. + +```cpp +Adjust2dx::enable(); +``` + +#### Check enabled status {% #check-enabled-status %} + +You can check if the Adjust SDK is enabled at any time by calling the `Adjust2dx::isEnabled()` method and passing a callback function. The status is returned asynchronously and passed to your callback function as a `bool` value. + +```cpp +Adjust2dx::isEnabled([](bool isEnabled) { + // process isEnabled +}); +``` From 0cabc852297f6725422ae9853d05b9f25dfd866a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Tue, 24 Sep 2024 17:43:26 +0200 Subject: [PATCH 10/59] Add features index page --- .../docs/sdk/cocos2dx/v5/features/index.mdoc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/content/docs/sdk/cocos2dx/v5/features/index.mdoc diff --git a/src/content/docs/sdk/cocos2dx/v5/features/index.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/index.mdoc new file mode 100644 index 000000000..e96f3b137 --- /dev/null +++ b/src/content/docs/sdk/cocos2dx/v5/features/index.mdoc @@ -0,0 +1,18 @@ +--- +title: Features +description: Use the Adjust SDK to send in-app information to Adjust's servers. +category-title: Features +slug: en/sdk/cocos2dx/features +type: category +sidebar-position: 3 +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v4: /en/sdk/cocos2dx/v4/features +--- + +Use the Adjust SDK to send in-app information to Adjust's servers. From 3d04021b5d1e9a2625307274e9e452ce6395828d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Tue, 24 Sep 2024 17:43:31 +0200 Subject: [PATCH 11/59] Add ad revenue page --- .../sdk/cocos2dx/v5/features/ad-revenue.mdoc | 170 ++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 src/content/docs/sdk/cocos2dx/v5/features/ad-revenue.mdoc diff --git a/src/content/docs/sdk/cocos2dx/v5/features/ad-revenue.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/ad-revenue.mdoc new file mode 100644 index 000000000..b7073e318 --- /dev/null +++ b/src/content/docs/sdk/cocos2dx/v5/features/ad-revenue.mdoc @@ -0,0 +1,170 @@ +--- +title: Send ad revenue information +description: Send ad revenue information for supported network partners using the Adjust SDK. +slug: en/sdk/cocos2dx/features/ad-revenue +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v4: /en/sdk/cocos2dx/v4/features/ad-revenue +--- + +{% callout type="important" %} +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. +{% /callout %} + +You can use the Adjust SDK to send ad revenue information from [supported network partners](https://help.adjust.com/en/article/ad-revenue) to Adjust. + +## Instantiate an ad revenue object {% #instantiate-an-ad-revenue-object %} + +To send ad revenue information with the Adjust SDK, you need to instantiate an `AdjustAdRevenue2dx` object. This object contains variables that are sent to Adjust when ad revenue is recorded in your app. + +To instantiate an ad revenue object, instantiate an `AdjustAdRevenue2dx` objec with the following parameter: + +- `source` (`String`): The source of the ad revenue. See the table below for all available sources. + +| Parameter | Source | +| ------------------------- | ------------------------- | +| `"applovin_max_sdk"` | AppLovin MAX | +| `"admob_sdk"` | AdMob | +| `"ironsource_sdk"` | ironSource | +| `"admost_sdk"` | AdMost | +| `"unity_sdk"` | Unity | +| `"helium_chartboost_sdk"` | Helium Chartboost | +| `"adx_sdk"` | Ad(X) | +| `"tradplus_sdk"` | TradPlus | +| `"topon_sdk"` | TopOn | +| `"publisher_sdk"` | Generic source | + +Once you've instantiated your ad revenue object, set the ad revenue amount by calling the `setRevenue` method with the following arguments: + +- `amount` (`double`): The amount of ad revenue to be recorded. +- `currency` (`string`): The currency of the ad revenue. You MUST format this as a 3 character [ISO 4217 code](https://www.iban.com/currency-codes) + +```cpp +AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("applovin_max_sdk"); +adjustAdRevenue.setRevenue(1.00, "EUR"); +``` + +## Set additional properties {% #set-additional-properties %} + +To provide more information about ad revenue, you can set any of the following properties on your `AdjustAdRevenue2dx` instance. + +### Ad campaign details {% #ad-campaign-details %} + +You can provide additional details about the campaign associated with your `AdjustAdRevenue2dx` instance by populating various properties. This information is available in Datascape reports and raw data exports. + +#### Ad impressions + +To send the number of recorded ad impressions, call the `setAdImpressionsCount` method of your `AdjustAdRevenue2dx` instance with the following argument: + +- `setAdImpressionsCount` (`int`): The number of ad impressions. + +```cpp +AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("applovin_max_sdk"); +adjustAdRevenue.setAdImpressionsCount(10); +``` + +#### Ad revenue network + +To send the network associated with ad revenue, call the `setAdRevenueNetwork` method of your `AdjustAdRevenue2dx` instance with the following argument: + +- `adRevenueNetwork` (`string`): The name of the network associated with the ad revenue. + +```cpp +AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("applovin_max_sdk"); +adjustAdRevenue.adRevenueNetwork("network"); +``` + +#### Ad revenue unit + +To send the advertising unit that earned the revenue, call the `setAdRevenueUnit` method of your `AdjustAdRevenue2dx instance with the following argument: + +- `adRevenueUnit` (`string`): The name of the ad unit associated with the ad revenue. + +```cpp +AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("applovin_max_sdk"); +adjustAdRevenue.adRevenueUnit("unit1"); +``` + +#### Ad revenue placement + +To send the placement of the ad unit, call the `setAdRevenuePlacement` method with the following argument: + +- `adRevenuePlacement` (`string`): The placement of the ad unit. + +```cpp +AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("applovin_max_sdk"); +adjustAdRevenue.setAdRevenuePlacement("banner"); +``` + +### Callback parameters {% #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 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: + +{% codeblock highlight="key=value, foo=bar" %} +```http +https://www.mydomain.com/callback?key=value&foo=bar +``` +{% /codeblock %} + +{% callout type="note" %} +Adjust doesn't store your custom callback parameters. Custom parameters are only appended to your callback URL. +{% /callout %} + +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. + +{% callout type="seealso" %} +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). +{% /callout %} + +```cpp +AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("applovin_max_sdk"); +adjustAdRevenue.addCallbackParameter("key", "value"); +adjustAdRevenue.addCallbackParameter("foo", "bar"); +``` + +### Partner parameters {% #partner-parameters %} + +You can send extra information to your network partners by adding [partner parameters](https://help.adjust.com/en/article/data-sharing-ad-network#map-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. + +{% callout type="note" %} +Partner parameters don't appear in raw data by default. You can add the `{partner_parameters}` placeholder to receive them as a single string. +{% /callout %} + +Add partner parameters to your event by calling the `addPartnerParameter` method with `string` key-value arguments. You can add multiple parameters by calling this method multiple times. + +```cpp +AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("applovin_max_sdk"); +adjustAdRevenue.addPartnerParameter("key", "value"); +adjustAdRevenue.addPartnerParameter("foo", "bar"); +``` + +## Send ad revenue {% #send-ad-revenue %} + +Once you've populated your `AdjustAdRevenue2dx` instance, pass it as an argument to the `Adjust2dx::trackAdRevenue()` to send the ad revenue information to Adjust. + +```cpp +AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("applovin_max_sdk"); +adjustAdRevenue.setRevenue(1, "EUR"); +adjustAdRevenue.setAdImpressionsCount(10); +adjustAdRevenue.setAdRevenueNetwork("network1"); +adjustAdRevenue.setAdRevenueUnit("unit1"); +adjustAdRevenue.setAdRevenuePlacement("banner"); +adjustAdRevenue.addCallbackParameter("key1", "value1"); +adjustAdRevenue.addPartnerParameter("key2", "value2"); +Adjust2dx::trackAdRevenueNew(adjustAdRevenue); +``` From 9a8978f7207a98ad1772c89ec3edffe642c8d2aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Tue, 24 Sep 2024 20:08:54 +0200 Subject: [PATCH 12/59] Add ATT guide --- src/content/docs/sdk/cocos2dx/v5/{ => features}/att.mdoc | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/content/docs/sdk/cocos2dx/v5/{ => features}/att.mdoc (100%) diff --git a/src/content/docs/sdk/cocos2dx/v5/att.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/att.mdoc similarity index 100% rename from src/content/docs/sdk/cocos2dx/v5/att.mdoc rename to src/content/docs/sdk/cocos2dx/v5/features/att.mdoc From a31047969b9b8d643dcacd4c06ac8f0df6d2d278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Wed, 25 Sep 2024 10:31:58 +0200 Subject: [PATCH 13/59] Add attribution guide --- .../sdk/cocos2dx/v5/features/attribution.mdoc | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 src/content/docs/sdk/cocos2dx/v5/features/attribution.mdoc diff --git a/src/content/docs/sdk/cocos2dx/v5/features/attribution.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/attribution.mdoc new file mode 100644 index 000000000..30bf0f5ca --- /dev/null +++ b/src/content/docs/sdk/cocos2dx/v5/features/attribution.mdoc @@ -0,0 +1,61 @@ +--- +title: Get attribution information +description: Listen for attribution changes using the Adjust SDK +slug: en/sdk/cocos2dx/features/attribution +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v4: /en/sdk/cocos2dx/v4/features/attribution +--- + +When a user interacts with an Adjust link, their attribution information updates. This can happen if the user interacts with a [deep link](https://help.adjust.com/en/article/deep-links). Information about a user's attribution is represented in the `AdjustAttribution2dx` class. + +## AdjustAttribution2dx class properties {% #class-properties %} + +The `AdjustAttribution2dx` class contains details about the current attribution status of the device. Any values that aren't populated for the user are returned as a `null` value. + +{% callout type="note" %} +The following values can only be accessed if you have [called the `enableCostDataInAttribution` method on your `AdjustConfig2dx` instance](/en/sdk/cocos2dx/configuration#receive-ad-spend-data): + +- `costType` +- `costAmount` +- `costCurrency` +{% /callout %} + +| 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/). | + +## Configure an attribution callback function {% #configure-an-attribution-callback-function %} + +You can configure the Adjust SDK to call a function whenever a user's attribution information updates by passing the function to the `setAttributionCallback` method on your `AdjustConfig2dx` instance. The SDK calls this function with an `AdjustAttribution2dx` object as its argument. + +```cpp +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); +adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose); +adjustConfig.setAttributionCallback(attributionCallbackMethod); +Adjust2dx::initSdk(adjustConfig); +``` + +## Get current attribution information {% #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 as an `AdjustAttribution2dx` object, call the `Adjust2dx::getAttribution()` method. + +```cpp +AdjustAttribution2dx attribution = Adjust2dx::getAttribution(); +``` From 8ec0b8f843e236d368c944a1773568014f9de331 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Wed, 25 Sep 2024 11:02:50 +0200 Subject: [PATCH 14/59] Add callbacks guide --- .../sdk/cocos2dx/v5/features/callbacks.mdoc | 133 ++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 src/content/docs/sdk/cocos2dx/v5/features/callbacks.mdoc diff --git a/src/content/docs/sdk/cocos2dx/v5/features/callbacks.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/callbacks.mdoc new file mode 100644 index 000000000..70bbd662a --- /dev/null +++ b/src/content/docs/sdk/cocos2dx/v5/features/callbacks.mdoc @@ -0,0 +1,133 @@ +--- +title: Send callback information +description: Use these methods to send callback information to Adjust. +slug: en/sdk/cocos2dx/features/callbacks +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v4: /en/sdk/cocos2dx/v4/features/callbacks +--- + +Configure callbacks to call functions when the SDK sends information to Adjust. You can configure callbacks for **sessions** and **events**. + +## Session callbacks {% #session-callbacks %} + +Configure session callbacks to call functions when the SDK sends session information. You can configure **success** callbacks and **failure** callbacks. **Success** callbacks are called when the SDK sends information to Adjust's servers. **Failure** callbacks are called 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 | 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` | `string` | The JSON object with the response from the server. | +| `willRetry` | `bool` | Indicates whether there will be an attempt to resend a failed package. Available only on failure callbacks. | + +### Success callbacks {% #session-success-callbacks %} + +Configure a success callback to call a function when the SDK records a session. + +```cpp +#include "Adjust/Adjust2dx.h" + +static void sessionSuccessCallbackMethod(AdjustSessionSuccess2dx sessionSuccess) { + // Add your function +} + +bool AppDelegate::applicationDidFinishLaunching() { + std::string appToken = "{YourAppToken}"; + std::string environment = AdjustEnvironmentSandbox2dx; + + AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); + adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose); + adjustConfig.setSessionSuccessCallback(sessionSuccessCallbackMethod); + Adjust2dx::initSdk(adjustConfig); +} +``` + +### Failure callbacks {% #session-failure-callbacks %} + +Configure a failure callback to call a function when the SDK fails to record a session. + +```cpp +#include "Adjust/Adjust2dx.h" + +static void sessionFailureCallbackMethod(AdjustSessionFailure2dx sessionFailure) { + // Add your function +} + +bool AppDelegate::applicationDidFinishLaunching() { + std::string appToken = "{YourAppToken}"; + std::string environment = AdjustEnvironmentSandbox2dx; + + AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); + adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose); + adjustConfig.setSessionFailureCallback(sessionFailureCallbackMethod); + Adjust2dx::initSdk(adjustConfig); +} +``` + +## Event callbacks {% #event-callbacks %} + +Configure event callbacks to call a function when the SDK sends event information. You can configure **success** callbacks and **failure** callbacks. **Success** callbacks are called when the SDK sends information to Adjust's servers. **Failure** callbacks are called 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 | 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. | +| `eventToken` | `string` | The event token | +| `callbackId` | `string` | The custom callback ID set on the event object | +| `jsonResponse` | `string` | The JSON object with the response from the server. | +| `willRetry` | `bool` | Indicates whether there will be an attempt to resend a failed package. Only available on failure callbacks. | + +### Success callbacks {% #event-success-callbacks %} + +Configure a success callback to call a function when the SDK records an event. + +```cpp +#include "Adjust/Adjust2dx.h" + +static void eventSuccessCallbackMethod(AdjustEventSuccess2dx eventSuccess) { + // Add your function +} + +bool AppDelegate::applicationDidFinishLaunching() { + std::string appToken = "{YourAppToken}"; + std::string environment = AdjustEnvironmentSandbox2dx; + + AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); + adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose); + adjustConfig.setEventSuccessCallback(eventSuccessCallbackMethod); + Adjust2dx::initSdk(adjustConfig); +} +``` + +### Failure callbacks {% #event-failure-callbacks %} + +Configure a failure callback to call a function when the SDK fails to record an event. + +```cpp +#include "Adjust/Adjust2dx.h" + +static void eventFailureCallbackMethod(AdjustEventFailure2dx eventFailure) { + // Add your function +} + +bool AppDelegate::applicationDidFinishLaunching() { + std::string appToken = "{YourAppToken}"; + std::string environment = AdjustEnvironmentSandbox2dx; + + AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); + adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose); + adjustConfig.setEventFailureCallback(eventFailureCallbackMethod); + Adjust2dx::initSdk(adjustConfig); +} +``` From 235b710e80254412c0881937a300171b51893d49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Wed, 25 Sep 2024 11:14:02 +0200 Subject: [PATCH 15/59] Add deep links guide --- .../sdk/cocos2dx/v5/features/deep-links.mdoc | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 src/content/docs/sdk/cocos2dx/v5/features/deep-links.mdoc diff --git a/src/content/docs/sdk/cocos2dx/v5/features/deep-links.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/deep-links.mdoc new file mode 100644 index 000000000..10bae68dc --- /dev/null +++ b/src/content/docs/sdk/cocos2dx/v5/features/deep-links.mdoc @@ -0,0 +1,85 @@ +--- +title: Deep linking +description: Follow the guides in this section to set up deep linking. +category-title: Deep linking +slug: en/sdk/cocos2dx/features/deep-links +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v4: /en/sdk/cocos2dx/v4/features/deep-links +--- + +You can create deep links to take users to specific pages in your app. The Adjust SDK uses different logic depending on if 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. + +The SDK can read deep link data after a user opens your app from a link. + +## Direct deep linking {% #direct-deep-linking %} + +Direct deep linking MUST be set up at the platform level. It isn't possible to configure direct deep linking in your Cocos2d-x C++ code. + +Follow the instructions for setting up deep linking for your target platform: + +- [iOS](/en/sdk/ios/features/deep-links/direct) +- [Android](/en/sdk/android/features/deep-links) + +## Deferred deep link callbacks {% #deferred-deep-link-callbacks %} + +You can configure the Adjust SDK to call a callback function when it receives a deferred deep link. This callback function receives the deep link as a `string` argument. + +```cpp +#include "Adjust/Adjust2dx.h" + +static bool deferredDeeplinkCallbackMethod(std::string deeplink) { + // Add your code +} + +bool AppDelegate::applicationDidFinishLaunching() { + std::string appToken = "{YourAppToken}"; + std::string environment = AdjustEnvironmentSandbox2dx; + + AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); + adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose); + adjustConfig.setDeferredDeeplinkCallback(deferredDeeplinkCallbackMethod); + Adjust2dx::initSdk(adjustConfig); +} +``` + +## Reattribution via deep links {% #reattribution-via-deep-links %} + +Adjust enables you to run re-engagement campaigns using deep links. For more information, check out how to set up [Deep links in Campaign Lab](https://help.adjust.com/en/article/deep-links). + +To reattribute your user, you need to instantiatee an `AdjustDeeplink2dx` object with the deep link URL and pass it to the `Adjust2dx::processDeeplink` method. The Adjust SDK then looks for new attribution data within the deep link. If the SDK finds new information, it forwards the information to Adjust’s servers for reattribution. + +```cpp +AdjustDeeplink2dx adjustDeeplink = new AdjustDeeplink2dx("url"); +Adjust::processDeeplink(adjustDeeplink); +``` + +## Enable LinkMe {% #enable-linkme %} + +The Adjust SDK lets you copy deep link information from the device pasteboard. When combined with [Adjust’s LinkMe solution](https://help.adjust.com/en/article/linkme), this feature enables deferred deep linking on devices running iOS 15 and above. + +{% callout type="important" %} +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. +{% /callout %} + +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, call the `enableLinkMe` method on your `AdjustConfig2dx` instance. + +```cpp +std::string appToken = "{YourAppToken}"; +std::string environment = AdjustEnvironmentSandbox2dx; + +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); +adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose); +adjustConfig.enableLinkMe(); +Adjust2dx::initSdk(adjustConfig) +``` From 08f75745a1170d1cc7f3056e45c72935e5dcf277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Wed, 25 Sep 2024 11:26:18 +0200 Subject: [PATCH 16/59] Add device info getter guide --- .../sdk/cocos2dx/v5/features/deep-links.mdoc | 10 +++ .../sdk/cocos2dx/v5/features/device-info.mdoc | 79 +++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 src/content/docs/sdk/cocos2dx/v5/features/device-info.mdoc diff --git a/src/content/docs/sdk/cocos2dx/v5/features/deep-links.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/deep-links.mdoc index 10bae68dc..5b4befc78 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/deep-links.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/deep-links.mdoc @@ -83,3 +83,13 @@ adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose); adjustConfig.enableLinkMe(); Adjust2dx::initSdk(adjustConfig) ``` + +## Get the last resolved link {% #get-the-last-resolved-link %} + +You can return the last deep link URL resolved by the `Adjust2sx::processDeeplink()` or `Adjust2dx::processAndResolveDeepLink()` method by calling the `Adjust2dx::getLastDeeplink()` method. This method returns the last resolved deep link as a deep link object. + +```cpp +Adjust2dx::getLastDeeplink([](std::string lastDeeplink) { + std::cout << "\nLast deeplink = " << lastDeeplink; +}); +``` diff --git a/src/content/docs/sdk/cocos2dx/v5/features/device-info.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/device-info.mdoc new file mode 100644 index 000000000..f23c073e3 --- /dev/null +++ b/src/content/docs/sdk/cocos2dx/v5/features/device-info.mdoc @@ -0,0 +1,79 @@ +--- +title: Get device information +description: Use these methods to add details to your callbacks and improve your reporting. +slug: en/sdk/cocos2dx/features/device-info +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v4: /en/sdk/cocos2dx/v4/features/device-info +--- + +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 {% #adid %} + +Adjust generates a unique Adjust Device ID (ADID) for each device. Call the `getAdid` method to asynchronously return the ADID as a `string` to a delegate function. + +```cpp +Adjust2dx::getAdid([](std::string adId) { + std::cout << "\nAdjust ID = " << adid; +}); +``` + +## ID For Advertisers {% #idfa %} + +The ID for Advertisers (IDFA) is a device-specific identifier for Apple devices. Call the `getIdfa` method to asynchronously return the IDFA as a `string` to a delegate function. + +```cpp +Adjust2dx::getIdfa([](std::string idfa) { + std::cout << "\nIDFA = " << idfa; +}); +``` + +## ID For Vendor {% #idfv %} + +The ID for Vendor (IDFV) is a device-specific identifier for Apple devices. Call the `getIdfv` method to asynchronously return the IDFV as a `string` to a delegate function. + +```cpp +Adjust2dx::getIdfv([](std::string idfv) { + std::cout << "\nIDFV = " << idfa; +}); +``` + +## Google Play Services Advertising ID {% #google-adid %} + +The Google Play Services Advertising ID (GPS ADID) 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 in a background thread. Assign a delegate function to access the GPS ADID value. + +```cpp +Adjust2dx::getGoogleAdId([](std::string adId) { + std::cout << "\nGoogle Ad ID = " << adId; +}); +``` + +## Amazon Advertiser ID {% #amazon-adid %} + +The Amazon Advertising ID (Amazon Ad ID) is a device-specific identifier for Android devices. Call the `getAmazonAdId` method to asynchronously return the Amazon Ad ID as a `string` to a delegate function. + +```cpp +Adjust2dx::getAmazonAdId([](std::string adId) { + std::cout << "\nAmazon Ad ID = " << adId; +}); +``` + +## Adjust SDK version {% #sdk-version-getter %} + +To read the version of the Adjust SDK, pass a callback function to the `getSdkVersion` method. The SDK fetches the information asynchronously and passes it to your callback function. + +```cpp +Adjust2dx::getSdkVersion([](std::string sdkVersion) { + std::cout << "\nSDK version = " << sdkVersion; +}); +``` From 52f1381c9bde1e395ad10030fd3306f06abe1931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Wed, 25 Sep 2024 14:10:06 +0200 Subject: [PATCH 17/59] Add events guide --- markdoc.config.mjs | 4 +- .../docs/sdk/cocos2dx/v4/features/events.mdx | 2 +- .../docs/sdk/cocos2dx/v5/features/events.mdoc | 213 ++++++++++++++++++ src/integrations/fetchSdkVersions.ts | 4 + src/variables.json | 28 +++ 5 files changed, 249 insertions(+), 2 deletions(-) create mode 100644 src/content/docs/sdk/cocos2dx/v5/features/events.mdoc create mode 100644 src/variables.json diff --git a/markdoc.config.mjs b/markdoc.config.mjs index 2a2698194..fcae223c9 100644 --- a/markdoc.config.mjs +++ b/markdoc.config.mjs @@ -4,10 +4,12 @@ import { link } from ".schema/Link.markdoc"; import { paragraph } from ".schema/Paragraph.markdoc"; import { list } from ".schema/List.markdoc"; import versions from "src/versionMap.json"; +import variables from "src/variables.json"; export default defineMarkdocConfig({ variables: { - versions + versions, + variables }, nodes: { heading, diff --git a/src/content/docs/sdk/cocos2dx/v4/features/events.mdx b/src/content/docs/sdk/cocos2dx/v4/features/events.mdx index 8813c3653..1fdaf3b47 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/events.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/events.mdx @@ -1,7 +1,7 @@ --- title: Send event information description: Use these methods to send event information to Adjust. -slug: en/sdk/cocos2dx/features/events +slug: en/sdk/cocos2dx/v4/features/events versions: - label: v5 value: v5 diff --git a/src/content/docs/sdk/cocos2dx/v5/features/events.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/events.mdoc new file mode 100644 index 000000000..6aa76e23e --- /dev/null +++ b/src/content/docs/sdk/cocos2dx/v5/features/events.mdoc @@ -0,0 +1,213 @@ +--- +title: Send event information +description: Use these methods to send event information to Adjust. +slug: en/sdk/cocos2dx/features/events +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v4: /en/sdk/cocos2dx/v4/features/events +--- + +You can use the Adjust SDK to send event information to Adjust's servers in response to actions taken by your users. Adjust records these events and surfaces them in your [Datascape reports](https://help.adjust.com/en/article/datascape), [server callbacks](https://help.adjust.com/en/article/server-callbacks), and [cloud storage uploads](https://help.adjust.com/en/article/cloud-storage-uploads). + +For more information on configuring events in Adjust, see the [Add events guide](https://help.adjust.com/en/article/add-events) in the Help Center. + +## How it works {% #how-it-works %} + +Events are represented by `AdjustEvent2dx` instances. The `AdjustEvent2dx` class contains properties which you can populate with event information to send to Adjust. The `AdjustEvent2dx` class MUST be instantiated using an Adjust event token. You can find your event token in AppView by following the steps in the [Add events guide](https://help.adjust.com/en/article/add-events#copy-event-token). You can set each property to create a complete representation of your event. + +Once you've set all the properties you need to set, use the `Adjust2dx::trackEvent()` method to send the `AdjustEvent2dx` instance to Adjust. When Adjust receives this object, it records the event information for you to report on. + +## Reference {% #reference %} + +The `AdjustEvent2dx` class is used to hold information about an event. Each event is represented by a unique `AdjustEvent2dx` instance. + +### Constructor {% #constructor %} + +Instantiate an `AdjustEvent2dx` object by passing your event token as an argument. + +| Argument | Type | Description | +| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | +| `eventToken` | `string` | Your Adjust event token. See [Add events](https://help.adjust.com/en/article/add-events#manage-your-events) for more information. | + +```cpp +AdjustEvent2dx adjustEvent = new AdjustEvent2dx("{% $variables.event.token %}"); +``` + +### Set event revenue {% #set-event-revenue %} + +Set the revenue amount and currency code of any revenue associated with the event by calling the `setRevenue()` method. + +| Argument | Type | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `revenue` | `double` | The amount of revenue generated by the event. | +| `currency` | `string` | The [ISO 4217 code](https://www.iban.com/currency-codes) of the event currency. | + +```cpp +AdjustEvent2dx adjustEvent = new AdjustEvent2dx("{% $variables.event.token %}"); +adjustEvent.setRevenue({% $variables.event.revenue.amount %}, "{% $variables.event.revenue.currency %}"); +``` + +### Add callback parameters {% #add-callback-parameters %} + +Add callback parameters by passing `string` key-value pairs to the `addCallbackParameter()` method. When Adjust receives your `AdjustEvent2dx` instance, all callback parameters are sent to your callback URL. + +| Argument | Type | Description | +| -------------------------------- | -------------------------------- | -------------------------------- | +| `key` | `string` | The name (key) of the parameter. | +| `value` | `string` | The value of the parameter. | + +```cpp +AdjustEvent2dx adjustEvent = new AdjustEvent2dx("{% $variables.event.token %}"); +adjustEvent.addCallbackParameter({% $variables.event.callbackParams[0] %}); +adjustEvent.addCallbackParameter({% $variables.event.callbackParams[1] %}); +``` + +### Add partner parameters {% #add-partner-parameters %} + +Add callback parameters by passing `string` key-value pairs to the `addPartnerParameter()` method. When Adjust receives your `AdjustEvent2dx` instance, all partner parameters are sent to any external partners you've configured. + +| Argument | Type | Description | +| -------------------------------- | -------------------------------- | -------------------------------- | +| `key` | `string` | The name (key) of the parameter. | +| `value` | `string` | The value of the parameter. | + +```cpp +AdjustEvent2dx adjustEvent = new AdjustEvent2dx("{% $variables.event.token %}"); +adjustEvent.addPartnerParameter({% $variables.event.partnerParams[0] %}); +adjustEvent.addPartnerParameter({% $variables.event.partnerParams[1] %}); +``` + +### Set deduplication ID {% #set-deduplication-id %} + +Sets a unique identifier for the `AdjustEvent2dx` instance to deduplicate revenue events by calling the `setDeduplicationId()` method. The SDK stores the last ten identifiers and skips revenue events with duplicate transaction IDs. + +| Argument | Type | Description | +| ------------------------ | ------------------------ | ------------------------ | +| `deduplicationId` | `string` | A unique transaction ID. | + +```cpp +AdjustEvent2dx adjustEvent = new AdjustEvent2dx("{% $variables.event.token %}"); +adjustEvent.setDeduplicationId("{% $variables.event.deduplicationId %}"); +``` + +### Set a callback ID {% #set-callback-id %} + +Sets a unique identifier for Adjust's servers to report on in event callback by calling the `setCallbackId()` method. + +| Argument | Type | Description | +| --------------------- | --------------------- | --------------------- | +| `callbackId` | `string` | A unique callback ID. | + +```cpp +AdjustEvent2dx adjustEvent = new AdjustEvent2dx("{% $variables.event.token %}"); +adjustEvent.setCallbackId("{% $variables.event.callbackId %}"); +``` + +### Send an event {% #send-an-event %} + +Call the `Adjust2dx::trackEvent()` method with your `AdjustEvent2dx` instance as an argument to send your event to Adjust. + +| Argument | Type | Description | +| ------------------------------ | ------------------------------ | ------------------------------ | +| `adjustEvent` | `AdjustEvent2dx` | Your `AdjustEvent2dx` instance | + +```cpp +AdjustEvent2dx adjustEvent = new AdjustEvent2dx("{% $variables.event.token %}"); +Adjust2dx::trackEvent(adjustEvent); +``` + +## Tutorial {% #tutorial %} + +This tutorial demonstrates how to use the `AdjustEvent2dx` class to send event information to Adjust. You will learn: + +1. How to create create and populate an `AdjustEvent2dx` instance. +1. How to use the `AdjustEvent2dx` class in your app to send event information to Adjust. + +To send event information to Adjust, follow these steps: + +1. Instantiate and populate an `AdjustEvent2dx` object with your Adjust event token. In the example below, the following properties are set: + - The event revenue is set to _{% $variables.event.revenue.amount %}_ and the currency code is set to _{% $variables.event.revenue.currency %}_. + - The event deduplication ID is set to _{% $variables.event.deduplicationId %}_. + - The event token and revenue amount are added as callback parameters. + - The ID of the associated product and ID of the user who triggered the event are added as partner parameters. + - The callback ID is set to _{% $variables.event.callbackId %}_. +1. At the end of your function, send the information to Adjust by calling `Adjust2dx::trackEvent()` with your `AdjustEvent2dx` instance as an argument. +1. Call your function in response to an action in your app. In the example below, the function is called when the `Send Event` button is pressed. + +```cpp +#include "Adjust/Adjust2dx.h" + +std::string appToken = "{% $variables.config.token %}"; +std::string environment = AdjustEnvironmentSandbox2dx; + +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment, false); +Adjust2dx::initSdk(adjustConfig); + +AdjustEvent2dx adjustEvent = new AdjustEvent2dx("{% $variables.event.token %}"); +adjustEvent.setRevenue({% $variables.event.revenue.amount %}, "{% $variables.event.revenue.currency %}"); +adjustEvent.setDeduplicationId("{% $variables.event.deduplicationId %}"); +adjustEvent.addCallbackParameter({% $variables.event.callbackParams[0] %}); +adjustEvent.addCallbackParameter({% $variables.event.callbackParams[1] %}); +adjustEvent.addPartnerParameter({% $variables.event.partnerParams[0] %}); +adjustEvent.addPartnerParameter({% $variables.event.partnerParams[1] %}); +adjustEvent.setCallbackId("{% $variables.event.callbackId %}"); +Adjust2dx::trackEvent(adjustEvent); +``` + +You will see a log output containing the details of your `AdjustEvent2dx` instance when the event is sent to Adjust. + +```txt +Path: /event +ClientSdk: cocos2dx{% $versions.cocos2dx.v5%} +Parameters: + android_uuid {% $variables.ids.android_uuid %} + api_level 34 + app_token {% $variables.config.token %} + app_version 1.0 + attribution_deeplink 1 + callback_id {% $variables.event.callbackId %} + callback_params {{% $variables.event.callbackParamsJson[0] %}, {% $variables.event.callbackParamsJson[1] %}} + connectivity_type 1 + country US + cpu_type arm64-v8a + created_at 2024-01-25T14:13:16.151Z+0100 + currency {% $variables.event.revenue.currency %} + device_manufacturer Google + device_name sdk_gphone64_arm64 + device_type phone + display_height 2205 + display_width 1080 + environment sandbox + event_buffering_enabled 0 + event_count 3 + event_token {% $variables.event.token %} + gps_adid {% $variables.ids.gps_adid %} + gps_adid_attempt 2 + gps_adid_src service + hardware_name UE1A.230829.036 + language en + mcc 310 + mnc 260 + needs_response_details 1 + os_build UE1A.230829.036 + os_name android + os_version 14 + package_name com.adjust.examples + partner_params {{% $variables.event.partnerParamsJson[0] %}, {% $variables.event.partnerParamsJson[1] %}} + revenue {% $variables.event.revenue.amount %} + screen_density high + screen_format long + screen_size normal + session_count 2 + session_length 23 + subsession_count 1 + time_spent 23 + tracking_enabled 1 + deduplication_id {% $variables.event.deduplicationId %} + ui_mode 1 +``` diff --git a/src/integrations/fetchSdkVersions.ts b/src/integrations/fetchSdkVersions.ts index 50c3308fb..fd9e50319 100644 --- a/src/integrations/fetchSdkVersions.ts +++ b/src/integrations/fetchSdkVersions.ts @@ -27,6 +27,10 @@ let versionReplacements: VersionMap = { v4: "vx.x.x", v5: "vx.x.x", }, + cocos2dx: { + v4: "vx.x.x", + v5: "vx.x.x", + }, web: "vx.x.x", windows: "vx.x.x", }; diff --git a/src/variables.json b/src/variables.json new file mode 100644 index 000000000..b86c1147e --- /dev/null +++ b/src/variables.json @@ -0,0 +1,28 @@ +{ + "config": { + "token": "2fm9gkqubvpc" + }, + "ids": { + "gps_adid": "5962dfc1-3a53-4692-850b-22c4bf4311a5", + "android_uuid": "781f17d5-5048-4fae-a4e5-77b58bab62b9" + }, + "event": { + "token": "g3mfiw", + "revenue": { + "amount": "0.25", + "currency": "EUR" + }, + "deduplicationId": "5e85484b-1ebc-4141-aab7-25b869e54c49", + "callbackId": "f2e728d8-271b-49ab-80ea-27830a215147", + "callbackParams": [ + "\"event_token\", \"g3mfiw\"", + "\"revenue_amount\", \"0.25\"" + ], + "partnerParams": ["\"product_id\", \"29\"", "\"user_id\", \"835\""], + "callbackParamsJson": [ + "\"event_token\": \"g3mfiw\"", + "\"revenue_amount\": \"0.25\"" + ], + "partnerParamsJson": ["\"product_id\": \"29\"", "\"user_id\": \"835\""] + } +} From 6646d3ecd9d8a8ec62657cb893f2cca9c672c530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Wed, 25 Sep 2024 16:03:53 +0200 Subject: [PATCH 18/59] Add privacy guide --- .../sdk/cocos2dx/v5/features/privacy.mdoc | 324 ++++++++++++++++++ 1 file changed, 324 insertions(+) create mode 100644 src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc diff --git a/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc new file mode 100644 index 000000000..72b209115 --- /dev/null +++ b/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc @@ -0,0 +1,324 @@ +--- +title: Set up privacy features +description: Configure features that you can use to handle user privacy in your app. +slug: en/sdk/cocos2dx/features/privacy +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v4: /en/sdk/cocos2dx/v4/features/privacy +--- + +The Adjust SDK contains features that you can use to handle user privacy in your app. + +## Send right to be forgotten request {% #send-rtbf-request %} + +The EU’s General Data Protection Regulation (GDPR) and similar privacy laws worldwide (CCPA, LGPD, etc.) grant data subjects comprehensive rights when it comes to the processing of their personal data. These rights include, among others, the right to erasure (see [Art. 17 GDPR](https://gdpr.eu/article-17-right-to-be-forgotten/))([1](https://help.adjust.com/en/article/gdpr#ref-1)). As a data processor, Adjust is obliged to support you (the data controller) in the processing of such requests from your (app) users. + +You can send the user's erasure request to Adjust by calling the `Adjust2dx::gdprForgetMe()` method. Once Adjust has been notified: + +- Adjust will permanently delete all of the user’s historical personal data from its internal systems and database. +- Adjust will no longer receive data from this user/device via the Adjust SDK.([2](https://help.adjust.com/en/article/gdpr#ref-2)) + +```cpp +Adjust2dx::gdprForgetMe(); +``` + +## Set up apps for children {% #set-up-apps-for-children %} + +If your app targets the "Kids" category, you MUST prevent your app from collecting device identifiers. To do this: + +1. (Android only): Remove the `com.google.android.gms.permission.AD_ID` permission by adding the following to your `AndroidManifest.xml` file: + + ```xml + + ``` + +1. (iOS only): Ensure that you unlink the `AdSupport.framework` and `AppTrackingTransparency.framework` frameworks from your project. + +### Configure COPPA compliance {% #configure-coppa-compliance %} + +{% callout type="important" %} +See [COPPA compliance](https://help.adjust.com/en/article/coppa-compliance) in the Help Center to see if your app needs to be COPPA compliant. +{% /callout %} + +If your app falls under a category that needs to be compliant with the Children's Online Privacy Protection Act (COPPA), you MUST call the `enableCoppaCompliance` method on your `AdjustConfig2dx` instance. Calling this method does the following: + +1. Disables third-party sharing **before** the user launches their first `session`. +1. Prevents the SDK from reading device and advertising IDs (for example: `gps_adid` and `android_id`). + +```cpp +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); +adjustConfig.enableCoppaCompliance(); +Adjust2dx::initSdk(adjustConfig); +``` + +### Configure Play Store Kids Apps compliance (Android only) {% #configure-play-store-kids-compliance %} + +If your app targets users under the age of 13, and the install region **isn't** the USA, you need to mark it as a Kids App. This prevents the SDK from reading device and advertising IDs (for example: `gps_adid` and `android_id`). + +To mark your app as a Kids App, call the `enablePlayStoreKidsCompliance` method on your `AdjustConfig2dx` instance. + +```cpp +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); +adjustConfig.enablePlayStoreKidsCompliance(); +Adjust2dx::initSdk(adjustConfig); +``` + +## Configure third-party sharing options {% #configure-third-party-sharing-options %} + +You can use the Adjust SDK to record when a user changes their third-party sharing settings. Third party sharing settings are configured using the `AdjustThirdPartySharing2dx` class. + +To enable or disable third party sharing with the Adjust SDK, you need to instantiate an `AdjustThirdPartySharing2dx` object. This object contains variables that control how third party sharing is handled by Adjust. + +To instantiate a third party sharing object, create a new `AdjustThirdPartySharing2dx` instance and pass the following parameters: + +- `isEnabled` (`bool`): Whether third party sharing is enabled. Pass `true` to enable third party sharing or `false` to disable third party sharing. + +```cpp +AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true); +``` + +Once you've instantiated your `AdjustThirdPartySharing2dx` object, you can send the information to Adjust by calling the `Adjust2dx::trackThirdPartySharing` method with your `AdjustThirdPartySharing2dx` instance as an argument. + +```cpp +AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true); +Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); +``` + +### Disable third party sharing globally {% #disable-third-party-sharing-globally %} + +If you want to disable sharing information with all partners, including the initial install session, you MUST: + +1. Instantiate your `AdjustThirdPartySharing2dx` instance with a `false` argument. +1. Call `Adjust2dx::trackThirdPartySharing` BEFORE you call `Adjust2dx::initSdk`. + +The Adjust SDK caches the third party sharing update call and sends it before the install session information. + +```cpp +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); +AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(false); +Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); +Adjust2dx::initSdk(adjustConfig); +``` + +### Configure per-partner sharing settings {% #configure-per-partner-sharing-settings %} + +If you instantiate your `AdjustAttribution2dx` object with a `true` argument, the Adjust SDK defaults to sending all information to every partner you have set up for your app. To control this, you must customize what data you share on a per-partner basis by calling the `addPartnerSharingSetting` method on your `AdjustAttribution2dx` instance with the following arguments: + +| Argument | Type | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `partnerName` | `string` | The ID of the partner. [Download the full list of available partners](https://assets.ctfassets.net/5s247im0esyq/2QQROOadVqJzrME7yXKObe/7aca25e53d38befb2d469809e62b6fcc/3rd-party-sharing-partners.xlsx) | +| `key` | `string` | The metric to share with the partner | +| `value` | `bool` | The user's decision | + +To enable specific features, you MUST disable `all` metrics, then enable only the metrics you want to share. + +```cpp +AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true); +adjustThirdPartySharing.addPartnerSharingSetting("PartnerA", "all", false); +adjustThirdPartySharing.addPartnerSharingSetting("PartnerA", "install", true); +Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); +``` + +The following metrics can be controlled using this method: + +{% listcolumns %} +- `ad_revenue` +- `all` +- `attribution` +- `update` +- `att_update` +- `cost_update` +- `event` +- `install` +- `reattribution` + +--- + +- `reattribution_reinstall` +- `reinstall` +- `rejected_install` +- `rejected_reattribution` +- `sdk_click` +- `sdk_info` +- `session` +- `subscription` +- `uninstall` +{% /listcolumns %} + +When you set a `false` value against a metric for a partner, Adjust stops sharing the metric with the partner. + +### Examples + +If you want to stop sharing all metrics with a specific partner, pass the `all` key with a `false` value. + +```cpp +AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true); +adjustThirdPartySharing.addPartnerSharingSetting("PartnerA", "all", false); +Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); +``` + +To re-enable sharing, pass the `all` key with a `true` value. + +```cpp +AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true); +adjustThirdPartySharing.addPartnerSharingSetting("PartnerA", "all", true); +Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); +``` + +You can stop or start sharing specific metrics by calling the `addPartnerSharingSetting` method multiple times with different keys. For example, if you only want to share event information with a partner, you can pass: + +- `all` with a `false` value to disable sharing all information. +- `event` with a `true` value to enable event sharing + +{% callout type="note" %} +Specific keys always take priority over `all`. If you pass `all` with other keys, the individual key values override the `all` setting. +{% /callout %} + +```cpp +AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true); +adjustThirdPartySharing.addPartnerSharingSetting("PartnerA", "all", false); +adjustThirdPartySharing.addPartnerSharingSetting("PartnerA", "event", true); +Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); +``` + +### Add per-partner granular information {% #add-per-partner-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 on your `AdjustThirdPartySharing2dx` instance with the following parameters: + +| Argument | Type | Description | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `partnerName` | `string` | The ID of the partner. [Download the full list of available partners](https://assets.ctfassets.net/5s247im0esyq/2QQROOadVqJzrME7yXKObe/7aca25e53d38befb2d469809e62b6fcc/3rd-party-sharing-partners.xlsx) | +| `key` | `string` | The key of the granular information. | +| `value` | `string` | The value of the granular information. | + +```cpp +AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true); +adjustThirdPartySharing.addGranularOption("PartnerA", "foo", "bar"); +Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); +``` + +#### Manage Facebook Limited Data Use {% #manage-facebook-ldu %} + +{% callout type="important" %} +The Adjust SDK sends information to Facebook as soon as the app is installed. You MUST set this **before** initializing the SDK. +{% /callout %} + +Facebook provides a feature called Limited Data Use (LDU) to comply with the California Consumer Privacy Act (CCPA). 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 using the following keys + +{% table %} +- Key +- Description +- Values +--- +- `data_processing_options_country` +- The country in which the user is located. +- - `0`: Request that Facebook use geolocation. + - `1`: United States of America. +--- +- `data_processing_options_state` +- Notifies Facebook in which state the user is located. +- - `0`: Request that Facebook use geolocation. + - `1000`: California. + - `1001`: Colorado. + - `1002`: Connecticut. +{% /table %} + +{% callout type="note" %} +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`. +{% /callout %} + +```cpp +AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true); +adjustThirdPartySharing.addGranularOption("facebook", "data_processing_options_country", "1"); +adjustThirdPartySharing.addGranularOption("facebook", "data_processing_options_state", "1000"); +Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); +``` + +#### Provide consent data to Google (Digital Markets Act compliance) {% #dma-compliance %} + +To comply with the EU's Digital Markets Act (DMA), Google Ads and the Google Marketing Platform require explicit consent to receive Adjust’s attribution requests to their APIs. To communicate this consent, you MUST the following granular options to your third party sharing instance for the partner `google_dma` if: + +- You have users in the European Economic Area (EEA). This includes EU member states, Switzerland, Norway, Iceland and Slovenia. +- You use Google Ads or Google Marketing Platform + +{% table %} +- Key +- Value +- Description +--- +- `eea` +- `1` or `0` +- Informs Adjust whether users installing the app are within the European Economic Area (`1`) or not (`0`). +--- +- `ad_personalization` +- `1` or `0` +- Informs Adjust whether users consented with being served personalized ads via Google Ads and/or Google Marketing Platform (`1`) or not (`0`). + + This parameter also informs the `npa` parameter reserved for Google Marketing Platform. +--- +- `ad_user_data` +- `1` or `0` +- Informs Adjust whether users consented with their advertiser ID being leveraged for attribution purposes +{% /table %} + +```cpp +AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true); +adjustThirdPartySharing.addGranularOption("google_dma", "eea", "1"); +adjustThirdPartySharing.addGranularOption("google_dma", "ad_personalization", "1"); +adjustThirdPartySharing.addGranularOption("google_dma", "ad_user_data", "1"); +Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); +``` + +## Set URL strategy {% #set-url-strategy %} + +The URL strategy feature allows you to set either: + +- The country in which Adjust stores your data (data residency). +- The endpoint to which the Adjust SDK sends traffic (URL strategy). + +This is useful if you're operating in a country with strict privacy requirements. When you set your URL strategy, Adjust stores data in the selected data residency region or sends traffic to the chosen domain. + +To set your country of data residency, call the `setUrlStrategy` method on your `AdjustConfig2dx` instance with the following parameter: + +- `urlStrategyDomains` (`vector`): The country or countries of data residence, or the endpoints to which you want to send SDK traffic. +- `shouldUseSubdomains` (`bool`): Whether the source should prefix a subdomain. +- `isDataResidency` (`bool`): Whether the domain should be used for data residency. + +See the table below for a list of strategies. + +| URL strategy | Main and fallback domain | Use sub domains | Is Data Residency | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| EU data residency | `"eu.adjust.com"` | `true` | `true` | +| Turkish data residency | `"tr.adjust.com"` | `true` | `true` | +| US data residency | `"us.adjust.com"` | `true` | `true` | +| China global URL strategy | `"adjust.world"`, `"adjust.com"` | `true` | `false` | +| China URL strategy | `"adjust.cn"`, `"adjust.com"` | `true` | `false` | +| China only URL strategy | `"adjust.cn"` | `true` | `false` | +| India URL strategy | `"adjust.net.in"`, `"adjust.com"` | `true` | `false` | + +```cpp +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); +adjustConfig.setUrlStrategy(['eu.adjust.com'], true, true); +Adjust2dx::initSdk(adjustConfig); +``` + +## Toggle consent measurement per user {% #toggle-consent-measurement-per-user %} + +If you've enabled [Data Privacy settings](https://help.adjust.com/en/article/manage-data-collection-and-retention) in Adjust, 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 with the following argument: + +- `measurementConsent` (`bool`): Whether consent measurement is enabled (`true`) or not (`false`). + +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. + +```cpp +Adjust2dx::trackMeasurementConsent(true); +``` From 2f956c2dded121782c4b02a40796d19f2dd6b273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Wed, 25 Sep 2024 16:04:03 +0200 Subject: [PATCH 19/59] Fix list columns component --- src/components/ListColumns.astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ListColumns.astro b/src/components/ListColumns.astro index 58698c10c..cf33075d5 100644 --- a/src/components/ListColumns.astro +++ b/src/components/ListColumns.astro @@ -3,7 +3,7 @@ const content = Astro.slots.has("default") ? await Astro.slots.render("default") : ""; -const lists = content.split("
"); +const lists = content.split(//); ---
From 34115e66753513c71ce84a9f02d631fce57b0be3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Wed, 25 Sep 2024 16:16:16 +0200 Subject: [PATCH 20/59] Add global parameters guide --- .../v4/features/session-parameters.mdx | 2 +- .../v5/features/global-parameters.mdoc | 81 +++++++++++++++++++ 2 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 src/content/docs/sdk/cocos2dx/v5/features/global-parameters.mdoc diff --git a/src/content/docs/sdk/cocos2dx/v4/features/session-parameters.mdx b/src/content/docs/sdk/cocos2dx/v4/features/session-parameters.mdx index 1c0d8e78b..f6fd222e5 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/session-parameters.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/session-parameters.mdx @@ -9,7 +9,7 @@ versions: - label: v4 value: v4 redirects: - v5: /en/sdk/cocos2dx/features/session-parameters + v5: /en/sdk/cocos2dx/features/global-parameters --- 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. diff --git a/src/content/docs/sdk/cocos2dx/v5/features/global-parameters.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/global-parameters.mdoc new file mode 100644 index 000000000..6d8957f91 --- /dev/null +++ b/src/content/docs/sdk/cocos2dx/v5/features/global-parameters.mdoc @@ -0,0 +1,81 @@ +--- +title: Configure global parameters +description: Send information to your callback URL with each session. +slug: en/sdk/cocos2dx/features/global-parameters +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v4: /en/sdk/cocos2dx/v4/features/session-parameters +--- + +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. + +## Global callback parameters {% #global-callback-parameters %} + +{% callout type="note" %} +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. +{% /callout %} + +You can configure global callback parameters to send to your servers. The Adjust SDK appends all global callback parameters to your callback URL. You can use this information to analyze your users' in-app behavior with your BI system. + +### Add global callback parameters {% #add-global-callback-parameters %} + +Add callback parameters globally by calling the `Adjust2dx::addGlobalCallbackParameter` method with `string` key-value arguments. You can add multiple parameters by calling this method multiple times. + +```cpp +Adjust2dx::addGlobalCallbackParameter("foo", "bar"); +``` + +### Remove global callback parameters {% #remove-global-callback-parameters %} + +You can remove specific global callback parameters if they're no longer required. To do this, pass the parameter `key` to the `Adjust2dx::removeGlobalCallbackParameter` method. + +```cpp +Adjust2dx::removeSessionCallbackParameter("foo"); +``` + +### Reset global callback parameters {% #reset-global-callback-parameters %} + +You can remove all global parameters if they're no longer required. To do this, call the `Adjust2dx::removeGlobalCallbackParameters` method. + +```cpp +Adjust2dx::removeGlobalCallbackParameters(); +``` + +## Global partner parameters {% #global-partner-parameters %} + +You can send extra information to your network partners by adding global [partner parameters](https://help.adjust.com/en/article/data-sharing-ad-network#map-parameters). + +Adjust sends global 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. + +{% callout type="note" %} +Partner parameters don't appear in raw data exports by default. You can add the `{partner_parameters}` placeholder to receive them as a single string. +{% /callout %} + +### Add global partner parameters {% #add-global-partner-parameters %} + +Send global partner parameters by calling the `Adjust2dx::addGlobalPartnerParameter` method with `string` key-value arguments. You can add multiple parameters by calling this method multiple times. + +```cpp +Adjust2dx::addGlobalPartnerParameter("foo", "bar"); +``` + +### Remove global partner parameters {% #remove-global-partner-parameters %} + +You can remove specific global partner parameters if they're no longer required. To do this, pass the parameter `key` to the `Adjust2dx::removeGlobalPartnerParameter` method. + +```cpp +Adjust2dx::removeGlobalPartnerParameter("foo"); +``` + +### Reset global partner parameters {% #reset-global-partner-parameters %} + +You can remove all global partner parameters if they're no longer required. To do this, call the `Adjust2dx::removeGlobalPartnerParameters` method. + +```cpp +Adjust2dx::removeGlobalPartnerParameters(); +``` From c6e7b983e82f3f36e5c8b5ff74a9ae594ab6aa4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Wed, 25 Sep 2024 16:23:25 +0200 Subject: [PATCH 21/59] Add short link guide --- .../sdk/cocos2dx/v5/features/short-links.mdoc | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/content/docs/sdk/cocos2dx/v5/features/short-links.mdoc diff --git a/src/content/docs/sdk/cocos2dx/v5/features/short-links.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/short-links.mdoc new file mode 100644 index 000000000..253879813 --- /dev/null +++ b/src/content/docs/sdk/cocos2dx/v5/features/short-links.mdoc @@ -0,0 +1,45 @@ +--- +title: Resolve short branded links +description: Resolve short links that were created in Campaign Lab. +slug: en/sdk/cocos2dx/features/short-links +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v4: /en/sdk/cocos2dx/v4/features/short-links +--- + +Adjust's [link shortener solution](https://help.adjust.com/en/article/short-branded-links) converts your complex and long links into cleaner and shorter links. The shortened links retain deep link and campaign information, and route users to the app store, if they don't have your app installed. + +Use the method described in this section to resolve your short links. + +## Set up deep linking in the Adjust SDK {% #set-up-deep-linking-in-the-adjust-sdk %} + +{% callout type="note" %} +You don't need to set up LinkMe or Link resolution to use Adjust’s link shortener solution. +{% /callout %} + +In the Adjust SDK, add support for the following: + +- [URI schemes](/en/sdk/cocos2dx/features/deep-links) +- [Deferred deep linking](/en/sdk/cocos2dx/features/deep-links#deferred-deep-linking) + +## Set up the Adjust SDK to resolve short links {% #set-up-the-adjust-sdk-to-resolve-short-links %} + +To resolve a short Adjust link URL that deep linked users into your app, call the `Adjust2dx::processAndResolveDeeplink` method with the following arguments: + +- `deeplink` (`string`): The deep link you want to resolve. +- `deeplinkResolvedCallback` (`function`): A function that receives the resolved deep link. Must return `void`. + +```cpp +static void deeplinkResolvedCallback(const std::string& resolvedLink) { + cocos2d::log("Resolved link = %s", resolvedLink.c_str()); +} + +Adjust2dx::processAndResolveDeeplink(deeplink, deeplinkResolvedCallback); +``` + +If you pass a shortened link to the `Adjust2dx::processAndResolveDeeplink` method, you receive the original expanded link in your `deeplinkResolvedCallback` function. If you pass a non-shortened link, the `deeplinkResolvedCallback` function receives the link you passed to `Adjust2dx::processAndResolveDeeplink` without modification. From cd66806563d6de448f1b1d4adc9d2435cde231e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Wed, 25 Sep 2024 16:37:06 +0200 Subject: [PATCH 22/59] Fix tabs element --- markdoc.config.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/markdoc.config.mjs b/markdoc.config.mjs index fcae223c9..0c93c2ba0 100644 --- a/markdoc.config.mjs +++ b/markdoc.config.mjs @@ -124,7 +124,7 @@ export default defineMarkdocConfig({ } }, tabs: { - render: component("src/components/Tab.astro"), + render: component("src/components/Tabs.astro"), }, } }) From 27e3dbd1b52f298a7da76af088316cf9104cd799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Wed, 25 Sep 2024 16:43:10 +0200 Subject: [PATCH 23/59] Add SKAN guide --- .../docs/sdk/cocos2dx/v4/features/skad.mdx | 2 +- .../docs/sdk/cocos2dx/v5/features/skan.mdoc | 63 +++++++++++++++++++ 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 src/content/docs/sdk/cocos2dx/v5/features/skan.mdoc diff --git a/src/content/docs/sdk/cocos2dx/v4/features/skad.mdx b/src/content/docs/sdk/cocos2dx/v4/features/skad.mdx index 1ac7d8415..6c412f47d 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/skad.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/skad.mdx @@ -9,7 +9,7 @@ versions: - label: v4 value: v4 redirects: - v5: /en/sdk/cocos2dx/features/skad + v5: /en/sdk/cocos2dx/features/skan --- diff --git a/src/content/docs/sdk/cocos2dx/v5/features/skan.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/skan.mdoc new file mode 100644 index 000000000..37d9faa51 --- /dev/null +++ b/src/content/docs/sdk/cocos2dx/v5/features/skan.mdoc @@ -0,0 +1,63 @@ +--- +title: Set up SKAN and conversion values +description: Configure SKAN features for your iOS apps. +slug: en/sdk/cocos2dx/features/skan +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v5: /en/sdk/cocos2dx/v4/features/skad +--- + +StoreKit Ad Network (SKAN) is Apple's framework for app install and reinstall attribution. The SKAN workflow goes like this: + +1. Apple gathers attribution information and notifies the relevant ad network. +1. The network sends a postback with this information to Adjust. +1. Adjust displays SKAN data in [Datascape](https://help.adjust.com/en/suite/article/datascape) and [Data Canvas](https://help.adjust.com/en/classic/article/data-canvas-classic). + +## Disable SKAN communication {% #disable-skadnetwork-communication %} + +The Adjust SDK registers for SKAN attribution upon initialization by default. To disable this behavior, call the `disableSkanAttribution` method on your `AdjustConfig2dx` instance. + +```cpp +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment, false); +adjustConfig.disableSkanAttribution(); +Adjust2dx::initSdk(adjustConfig); +``` + +## Update conversion values {% #update-conversion-values %} + +Conversion values are a mechanism used to track user behavior in SKAN. You can map 64 conditions to values from 0 through 63 and send this integer value to SKAN 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 `updateSkanConversionValue` method. This method wraps [Apple's `updatePostbackConversionValue` method](https://developer.apple.com/documentation/storekit/skadnetwork/4097267-updatepostbackconversionvalue). You MUST pass the following arguments: + +- `fineValue` (`int`): Your conversion value. Must be between `0` and `63`. +- `coarseValue` (`string` [`SKAdNetwork.CoarseConversionValue`](https://developer.apple.com/documentation/storekit/skadnetwork/coarseconversionvalue)): The coarse conversion value. This value is used if your app doesn't have sufficient installs to reach the privacy threshold. The following values are allowed: + - `low` (`SKAdNetworkCoarseConversionValueLow`) + - `medium` (`SKAdNetworkCoarseConversionValueMedium`) + - `high` (`SKAdNetworkCoarseConversionValueHigh`) +- `lockWindow` (`bool`): Whether to send the postback before the conversion window ends (`true`). +- `errorCallback` (`function`): A function that receives any error message returned by SKAN as a `string`. + +```cpp +Adjust2dx::updateSkanConversionValue(6, "low", true, [](std::string error) { + std::cout << "Error while updating conversion value: " << error; +}); +``` + +## Listen for changes to conversion values {% #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 callback function to listen for these changes using the `setSkanUpdatedCallback` method. Pass your function as an argument. + +```cpp +adjustConfig.setSkanUpdatedCallback([]( + std::unordered_map data) { + std::cout << "\nConversion value: " << data["conversionValue"]; + std::cout << "\nCoarse value: " << data["coarseValue"]; + std::cout << "\nLock window: " << data["lockWindow"]; + std::cout << "\nError: " << data["error"]; +}); +``` From 217c323a0bac87b2cb65e54fc7dea294109756c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Wed, 25 Sep 2024 16:43:20 +0200 Subject: [PATCH 24/59] Update vector init in URL strategy --- src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc index 72b209115..53afdf8fe 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc @@ -305,7 +305,7 @@ See the table below for a list of strategies. ```cpp AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); -adjustConfig.setUrlStrategy(['eu.adjust.com'], true, true); +adjustConfig.setUrlStrategy({'eu.adjust.com'}, true, true); Adjust2dx::initSdk(adjustConfig); ``` From f28d79cd2fd723b0c19686979265ed26a52137f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Wed, 25 Sep 2024 16:48:36 +0200 Subject: [PATCH 25/59] Add updates from doc --- .../docs/sdk/migration/cocos2dx/v4-to-v5.mdoc | 30 ++++++++++++------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc b/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc index d49e5e734..6d62e72df 100644 --- a/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc +++ b/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc @@ -264,6 +264,14 @@ In SDK v5, the feature is decoupled from `transaction ID`. A new ID field called adjustEvent.setDeduplicationId("deduplication-id"); ``` +You can set a custom limit on the number of `deduplicationId` that can be added to the list for identifying duplicate events. By default, the limit is set to **10**. + +```cpp +AdjustConfig adjustConfig = new AdjustConfig("appToken", AdjustEnvironment.Sandbox); +adjustConfig.setEventDeduplicationIdsMaxSize(20); +Adjust2dx::initSdk(adjustConfig); +``` + ### App Store Subscriptions {% #app-store-subscriptions %} In SDK v4, you can set a new subscription by configuring an `AdjustAppStoreSubscription2dx` object. This object is initialized with four arguments: `price`, `currency`, `transactionId`, and `receipt`. @@ -373,22 +381,22 @@ Check the table below to see how to configure your URL strategy in SDK v5. ```cpp // India URL strategy -adjustConfig.setUrlStrategy(['adjust.net.in', 'adjust.com'], true, false); +adjustConfig.setUrlStrategy({'adjust.net.in', 'adjust.com'}, true, false); // China URL strategy -adjustConfig.setUrlStrategy(['adjust.world', 'adjust.com'], true, false); +adjustConfig.setUrlStrategy({'adjust.world', 'adjust.com'}, true, false); // China only URL strategy -adjustConfig.setUrlStrategy(['adjust.cn'], true, false); +adjustConfig.setUrlStrategy({'adjust.cn'}, true, false); // EU URL strategy -adjustConfig.setUrlStrategy(['eu.adjust.com'], true, true); +adjustConfig.setUrlStrategy({'eu.adjust.com'}, true, true); // Turkey URL strategy -adjustConfig.setUrlStrategy(['tr.adjust.com'], true, true); +adjustConfig.setUrlStrategy({'tr.adjust.com'}, true, true); // US URL strategy -adjustConfig.setUrlStrategy(['us.adjust.com'], true, true); +adjustConfig.setUrlStrategy({'us.adjust.com'}, true, true); ``` ### Record ad revenue {% #record-ad-revenue %} @@ -457,11 +465,11 @@ In SDK v5, you need to assign a callback function to the `setSkanUpdatedCallback ```cpp adjustConfig.setSkanUpdatedCallback([]( - std::map skanData) { - std::cout << "\nConversion value: " << skanData["conversionValue"]; - std::cout << "\nCoarse value: " << skanData["coarseValue"]; - std::cout << "\nLock window: " << skanData["lockWindow"]; - std::cout << "\nError: " << skanData["error"]; + std::unordered_map data) { + std::cout << "\nConversion value: " << data["conversionValue"]; + std::cout << "\nCoarse value: " << data["coarseValue"]; + std::cout << "\nLock window: " << data["lockWindow"]; + std::cout << "\nError: " << data["error"]; }); ``` From 2fcfaee046c70d03f2def684351bdafa87f34b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Thu, 26 Sep 2024 11:08:58 +0200 Subject: [PATCH 26/59] Fix broken links --- src/content/docs/sdk/cocos2dx/v4/configuration-ja.mdx | 8 -------- src/content/docs/sdk/cocos2dx/v4/configuration-ko.mdx | 8 -------- src/content/docs/sdk/cocos2dx/v4/configuration-zh.mdx | 8 -------- .../docs/sdk/cocos2dx/v4/features/ad-revenue-ja.mdx | 10 +--------- .../docs/sdk/cocos2dx/v4/features/ad-revenue-ko.mdx | 10 +--------- .../docs/sdk/cocos2dx/v4/features/ad-revenue-zh.mdx | 10 +--------- src/content/docs/sdk/cocos2dx/v4/features/att-ja.mdx | 10 +--------- src/content/docs/sdk/cocos2dx/v4/features/att-ko.mdx | 10 +--------- src/content/docs/sdk/cocos2dx/v4/features/att-zh.mdx | 10 +--------- .../docs/sdk/cocos2dx/v4/features/attribution-ja.mdx | 10 +--------- .../docs/sdk/cocos2dx/v4/features/attribution-ko.mdx | 10 +--------- .../docs/sdk/cocos2dx/v4/features/attribution-zh.mdx | 10 +--------- .../docs/sdk/cocos2dx/v4/features/callbacks-ja.mdx | 10 +--------- .../docs/sdk/cocos2dx/v4/features/callbacks-ko.mdx | 10 +--------- .../docs/sdk/cocos2dx/v4/features/callbacks-zh.mdx | 10 +--------- .../docs/sdk/cocos2dx/v4/features/deep-links-ja.mdx | 10 +--------- .../docs/sdk/cocos2dx/v4/features/deep-links-ko.mdx | 10 +--------- .../docs/sdk/cocos2dx/v4/features/deep-links-zh.mdx | 10 +--------- .../docs/sdk/cocos2dx/v4/features/device-info-ja.mdx | 10 +--------- .../docs/sdk/cocos2dx/v4/features/device-info-ko.mdx | 10 +--------- .../docs/sdk/cocos2dx/v4/features/device-info-zh.mdx | 10 +--------- .../docs/sdk/cocos2dx/v4/features/events-ja.mdx | 10 +--------- .../docs/sdk/cocos2dx/v4/features/events-ko.mdx | 10 +--------- .../docs/sdk/cocos2dx/v4/features/events-zh.mdx | 8 -------- src/content/docs/sdk/cocos2dx/v4/features/index-ja.mdx | 10 +--------- src/content/docs/sdk/cocos2dx/v4/features/index-ko.mdx | 10 +--------- src/content/docs/sdk/cocos2dx/v4/features/index-zh.mdx | 10 +--------- .../docs/sdk/cocos2dx/v4/features/privacy-ja.mdx | 10 +--------- .../docs/sdk/cocos2dx/v4/features/privacy-ko.mdx | 10 +--------- .../docs/sdk/cocos2dx/v4/features/privacy-zh.mdx | 10 +--------- .../sdk/cocos2dx/v4/features/session-parameters-ja.mdx | 8 -------- .../sdk/cocos2dx/v4/features/session-parameters-ko.mdx | 10 +--------- .../sdk/cocos2dx/v4/features/session-parameters-zh.mdx | 10 +--------- .../docs/sdk/cocos2dx/v4/features/short-links-ja.mdx | 10 +--------- .../docs/sdk/cocos2dx/v4/features/short-links-ko.mdx | 10 +--------- .../docs/sdk/cocos2dx/v4/features/short-links-zh.mdx | 10 +--------- src/content/docs/sdk/cocos2dx/v4/features/skad-ja.mdx | 10 +--------- src/content/docs/sdk/cocos2dx/v4/features/skad-ko.mdx | 10 +--------- src/content/docs/sdk/cocos2dx/v4/features/skad-zh.mdx | 10 +--------- .../docs/sdk/cocos2dx/v4/features/subscriptions-ja.mdx | 10 +--------- .../docs/sdk/cocos2dx/v4/features/subscriptions-ko.mdx | 10 +--------- .../docs/sdk/cocos2dx/v4/features/subscriptions-zh.mdx | 10 +--------- src/content/docs/sdk/cocos2dx/v4/index-ja.mdx | 9 --------- src/content/docs/sdk/cocos2dx/v4/index-ko.mdx | 8 -------- src/content/docs/sdk/cocos2dx/v4/index-zh.mdx | 8 -------- 45 files changed, 37 insertions(+), 398 deletions(-) diff --git a/src/content/docs/sdk/cocos2dx/v4/configuration-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/configuration-ja.mdx index fa2e269b7..1dc2631c6 100644 --- a/src/content/docs/sdk/cocos2dx/v4/configuration-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/configuration-ja.mdx @@ -4,14 +4,6 @@ description: "Adjust SDKを設定するには、このセクションのガイ category-title: "設定" slug: "ja/sdk/cocos2dx/configuration" sidebar-position: 1 -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ja/sdk/cocos2dx/configuration --- Adjust SDKの動作を設定するには、このドキュメントに記載されたメソッドを使用してください。 diff --git a/src/content/docs/sdk/cocos2dx/v4/configuration-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/configuration-ko.mdx index 3eec0bd6a..616265e51 100644 --- a/src/content/docs/sdk/cocos2dx/v4/configuration-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/configuration-ko.mdx @@ -4,14 +4,6 @@ description: "이 섹션의 가이드를 참조하여 Adjust SDK를 설정합니 category-title: "구성" slug: "ko/sdk/cocos2dx/configuration" sidebar-position: 1 -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ko/sdk/cocos2dx/configuration --- Adjust SDK의 동작을 설정하는 방법에 관한 본 문서의 메서드를 참조하시기 바랍니다. diff --git a/src/content/docs/sdk/cocos2dx/v4/configuration-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/configuration-zh.mdx index e2aa7e51d..b003ae3e5 100644 --- a/src/content/docs/sdk/cocos2dx/v4/configuration-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/configuration-zh.mdx @@ -4,14 +4,6 @@ description: "请按照本节中的说明配置 Adjust SDK。" category-title: "配置" slug: "zh/sdk/cocos2dx/configuration" sidebar-position: 1 -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /zh/sdk/cocos2dx/configuration --- 请使用该文档中的方法配置 Adjust SDK 行为。 diff --git a/src/content/docs/sdk/cocos2dx/v4/features/ad-revenue-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/features/ad-revenue-ja.mdx index 79e702cdb..47ee6d2fc 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/ad-revenue-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/ad-revenue-ja.mdx @@ -1,15 +1,7 @@ --- title: "広告収益情報を送信する" description: "Adjust SDKを使用して、サポートされているネットワークパートナーの広告収益情報を送信します。" -slug: "ja/sdk/cocos2dx/v4/features/ad-revenue" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ja/sdk/cocos2dx/features/ad-revenue +slug: "ja/sdk/cocos2dx/features/ad-revenue" --- Adjust SDKを使用して、[サポートされているネットワークパートナー](https://help.adjust.com/ja/article/ad-revenue)の広告収益を記録することができます。 diff --git a/src/content/docs/sdk/cocos2dx/v4/features/ad-revenue-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/features/ad-revenue-ko.mdx index b3d0e8701..e0cab98b2 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/ad-revenue-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/ad-revenue-ko.mdx @@ -1,15 +1,7 @@ --- title: "광고 매출 정보 전송" description: "Adjust SDK를 사용하여 지원되는 네트워크 파트너의 광고 매출 정보를 전송합니다." -slug: "ko/sdk/cocos2dx/v4/features/ad-revenue" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ko/sdk/cocos2dx/features/ad-revenue +slug: "ko/sdk/cocos2dx/features/ad-revenue" --- Adjust SDK를 사용하여 [지원되는 네트워크 파트너](https://help.adjust.com/ko/article/ad-revenue)의 광고 매출을 기록할 수 있습니다. diff --git a/src/content/docs/sdk/cocos2dx/v4/features/ad-revenue-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/features/ad-revenue-zh.mdx index 871312bda..547d57505 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/ad-revenue-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/ad-revenue-zh.mdx @@ -1,15 +1,7 @@ --- title: "发送广告收入信息" description: "使用 Adjust SDK 发送受支持渠道合作伙伴的广告收入信息。" -slug: "zh/sdk/cocos2dx/v4/features/ad-revenue" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /zh/sdk/cocos2dx/features/ad-revenue +slug: "zh/sdk/cocos2dx/features/ad-revenue" --- 您可以使用 Adjust SDK 记录[受支持渠道合作伙伴](https://help.adjust.com/zh/article/ad-revenue)的广告收入。 diff --git a/src/content/docs/sdk/cocos2dx/v4/features/att-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/features/att-ja.mdx index fc9f081e7..9ca0adadf 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/att-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/att-ja.mdx @@ -1,15 +1,7 @@ --- title: "App Tracking Transparencyの設定" description: "AppleのApp Tracking Transparencyフレームワークを使用するようにアプリを設定する" -slug: "ja/sdk/cocos2dx/v4/features/att" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ja/sdk/cocos2dx/features/att +slug: "ja/sdk/cocos2dx/features/att" --- 広告識別子(IDFA)を記録したい場合は、ユーザーの許諾を得るためのプロンプトを表示する必要があります。これを行うには、アプリにAppleのApp Tracking Transparency(ATT)frameworkを組み込む必要があります。Adjust SDKはユーザーの許諾状況を保存し、リクエストごとにAdjustサーバーに送信します。 diff --git a/src/content/docs/sdk/cocos2dx/v4/features/att-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/features/att-ko.mdx index bf8315467..589b975c1 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/att-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/att-ko.mdx @@ -1,15 +1,7 @@ --- title: "ATT 설정" description: "Apple의 ATT(App Tracking Transparency) 프레임워크를 사용하도록 앱 설정" -slug: "ko/sdk/cocos2dx/v4/features/att" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ko/sdk/cocos2dx/features/att +slug: "ko/sdk/cocos2dx/features/att" --- IDFA\(ID for Advertisers\)를 기록하려면 사용자의 허가를 받기 위한 메시지를 표시해야 합니다. 이렇게 하려면 앱에 Apple의 ATT\(App Tracking Transparency\) 프레임워크를 포함해야 합니다. Adjust SDK는 사용자의 허가 여부를 저장하고 각 요청과 함께 Adjust 서버로 전송합니다. diff --git a/src/content/docs/sdk/cocos2dx/v4/features/att-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/features/att-zh.mdx index d587eb37b..58f6ec1aa 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/att-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/att-zh.mdx @@ -1,15 +1,7 @@ --- title: "设置 App Tracking Transparency" description: "配置应用以使用 Apple 的 App Tracking Transparency 框架" -slug: "zh/sdk/cocos2dx/v4/features/att" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /zh/sdk/cocos2dx/features/att +slug: "zh/sdk/cocos2dx/features/att" --- 如果您要记录设备的广告主 ID \(即 IDFA\),需要先展示弹窗获得用户的授权。要达到这个目的,你需要在应用中添加 Apple 的 App Tracking Transparency \(ATT\) 框架。Adjust SDK 会存储用户的授权状态并在每次请求中将该信息发送至 Adjust 服务器。 diff --git a/src/content/docs/sdk/cocos2dx/v4/features/attribution-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/features/attribution-ja.mdx index 6cf576518..4e0f97fec 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/attribution-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/attribution-ja.mdx @@ -1,15 +1,7 @@ --- title: "アトリビューション情報の取得" description: "Adjust SDKを使ってアトリビューションの変更を受信する" -slug: "ja/sdk/cocos2dx/v4/features/attribution" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ja/sdk/cocos2dx/features/attribution +slug: "ja/sdk/cocos2dx/features/attribution" --- ユーザーがAdjustリンクをクリックすると、そのアトリビューション情報が更新されます。これは、ユーザーが[ディープリンク](https://help.adjust.com/ja/article/deep-links)をクリックした場合に発生します。ユーザーのアトリビューションについての情報は、`AdjustAttribution2dx`クラスに表示されます。 diff --git a/src/content/docs/sdk/cocos2dx/v4/features/attribution-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/features/attribution-ko.mdx index 13764c3b2..faf9c6a1b 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/attribution-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/attribution-ko.mdx @@ -1,15 +1,7 @@ --- title: "어트리뷰션 정보 확인" description: "Adjust SDK를 사용하여 어트리뷰션 변경 사항 수신" -slug: "ko/sdk/cocos2dx/v4/features/attribution" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ko/sdk/cocos2dx/features/attribution +slug: "ko/sdk/cocos2dx/features/attribution" --- 사용자가 Adjust 링크와 상호작용하면 어트리뷰션 정보가 업데이트됩니다. 이는 사용자가 [딥링크](https://help.adjust.com/ko/article/deep-links)와 상호작용하는 경우에 발생할 수 있습니다. 사용자의 어트리뷰션 관련 정보는 `AdjustAttribution2dx` 클래스에 나타납니다. diff --git a/src/content/docs/sdk/cocos2dx/v4/features/attribution-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/features/attribution-zh.mdx index 84cb13d9a..dd022a941 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/attribution-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/attribution-zh.mdx @@ -1,15 +1,7 @@ --- title: "获取归因信息" description: "使用 Adjust SDK 监听归因变化" -slug: "zh/sdk/cocos2dx/v4/features/attribution" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /zh/sdk/cocos2dx/features/attribution +slug: "zh/sdk/cocos2dx/features/attribution" --- 用户与 Adjust 链接交互时,其归因信息会发生更新。用户与[深度链接](https://help.adjust.com/zh/article/deep-links)交互时可能会发生这种情况。用户归因相关信息会在 `AdjustAttribution2dx` 类中展现。 diff --git a/src/content/docs/sdk/cocos2dx/v4/features/callbacks-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/features/callbacks-ja.mdx index 76d620920..f0ed03fe5 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/callbacks-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/callbacks-ja.mdx @@ -1,15 +1,7 @@ --- title: "コールバック情報を送信する" description: "Adjustにコールバック情報を送信するには、これらのメソッドを使用してください。" -slug: "ja/sdk/cocos2dx/v4/features/callbacks" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ja/sdk/cocos2dx/features/callbacks +slug: "ja/sdk/cocos2dx/features/callbacks" --- SDKがAdjustに情報を送信する時に関数をトリガーするコールバックを設定します。コールバックは **セッション** と **イベント** に対して設定できます。 diff --git a/src/content/docs/sdk/cocos2dx/v4/features/callbacks-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/features/callbacks-ko.mdx index d6aced8fa..3cdcc5d4d 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/callbacks-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/callbacks-ko.mdx @@ -1,15 +1,7 @@ --- title: "콜백 정보 전송" description: "이 메서드를 사용하여 콜백 정보를 Adjust로 전송합니다." -slug: "ko/sdk/cocos2dx/v4/features/callbacks" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ko/sdk/cocos2dx/features/callbacks +slug: "ko/sdk/cocos2dx/features/callbacks" --- SDK가 Adjust에 정보를 보낼 때 함수를 트리거하는 콜백을 설정합니다. 콜백은 **세션** 및 **이벤트** 에 대해 설정할 수 있습니다. diff --git a/src/content/docs/sdk/cocos2dx/v4/features/callbacks-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/features/callbacks-zh.mdx index b8d8d681d..f7e91c3ed 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/callbacks-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/callbacks-zh.mdx @@ -1,15 +1,7 @@ --- title: "发送回传信息" description: "使用这些方法向 Adjust 发送回传信息。" -slug: "zh/sdk/cocos2dx/v4/features/callbacks" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /zh/sdk/cocos2dx/features/callbacks +slug: "zh/sdk/cocos2dx/features/callbacks" --- 设置回传来在 SDK 向 Adjust 发送信息时触发函数。您可以针对 **会话** 和 **事件** 设置回传。 diff --git a/src/content/docs/sdk/cocos2dx/v4/features/deep-links-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/features/deep-links-ja.mdx index 875c8000c..21905375e 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/deep-links-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/deep-links-ja.mdx @@ -2,15 +2,7 @@ title: "ディープリンク" description: "ディープリンクを設定するには、このセクションのガイドに従ってください。" category-title: "ディープリンク" -slug: "ja/sdk/cocos2dx/v4/features/deep-links" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ja/sdk/cocos2dx/features/deep-links +slug: "ja/sdk/cocos2dx/features/deep-links" --- ディープリンクを作成して、ユーザーをアプリ内の特定の場所に誘導します。Adjust SDKは、ユーザーがデバイスにアプリをインストール済みかどうかによって、異なるロジックを使用します。 diff --git a/src/content/docs/sdk/cocos2dx/v4/features/deep-links-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/features/deep-links-ko.mdx index 160a2a2be..a3a3aa6c2 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/deep-links-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/deep-links-ko.mdx @@ -2,15 +2,7 @@ title: "딥링킹" description: "이 섹션의 가이드를 참조하여 딥링킹을 설정합니다." category-title: "딥링킹" -slug: "ko/sdk/cocos2dx/v4/features/deep-links" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ko/sdk/cocos2dx/features/dee-links +slug: "ko/sdk/cocos2dx/features/deep-links" --- 사용자를 앱의 특정 페이지로 이동시키기 위해 딥링크를 생성할 수 있습니다. Adjust SDK는 사용자 기기에 앱이 이미 설치되어 있는지 여부에 따라 다른 로직을 적용합니다. diff --git a/src/content/docs/sdk/cocos2dx/v4/features/deep-links-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/features/deep-links-zh.mdx index 1efeb601d..c89b218e7 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/deep-links-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/deep-links-zh.mdx @@ -2,15 +2,7 @@ title: "深度链接" description: "按照本节中的说明操作,设置深度链接。" category-title: "深度链接" -slug: "zh/sdk/cocos2dx/v4/features/deep-links" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /zh/sdk/cocos2dx/features/deep-links +slug: "zh/sdk/cocos2dx/features/deep-links" --- 您可以创建深度链接来将用户转到应用中的特定页面。针对用户是否已在设备上安装您的应用,Adjust SDK 会使用不同的逻辑: diff --git a/src/content/docs/sdk/cocos2dx/v4/features/device-info-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/features/device-info-ja.mdx index b13cf810a..6e16ccdea 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/device-info-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/device-info-ja.mdx @@ -1,15 +1,7 @@ --- title: "デバイス情報を取得" description: "これらのメソッドを使用することでコールバックに詳細を追加し、レポートを改善させましょう。" -slug: "ja/sdk/cocos2dx/v4/features/device-info" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ja/sdk/cocos2dx/features/device-info +slug: "ja/sdk/cocos2dx/features/device-info" --- Adjust SDKには、デバイス情報を返すヘルパーメソッドが含まれています。これらのメソッドを使用することでコールバックに詳細を追加し、レポートを改善させましょう。 diff --git a/src/content/docs/sdk/cocos2dx/v4/features/device-info-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/features/device-info-ko.mdx index f0a9d1a7c..de4d3f892 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/device-info-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/device-info-ko.mdx @@ -1,15 +1,7 @@ --- title: "디바이스 정보 확인" description: "해당 메서드를 사용하여 콜백에 세부 정보를 추가하고 리포트를 보완하시기 바랍니다." -slug: "ko/sdk/cocos2dx/v4/features/device-info" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ko/sdk/cocos2dx/features/device-info +slug: "ko/sdk/cocos2dx/features/device-info" --- Adjust SDK는 디바이스 정보를 반환하는 헬프 메서드가 포함되어 있습니다. 해당 메서드를 사용하여 콜백에 세부 정보를 추가하고 리포트를 보완하시기 바랍니다. diff --git a/src/content/docs/sdk/cocos2dx/v4/features/device-info-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/features/device-info-zh.mdx index 6b2a6313f..83978d394 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/device-info-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/device-info-zh.mdx @@ -1,15 +1,7 @@ --- title: "获取设备信息" description: "用这些方法来向回传添加细节信息,优化报告。" -slug: "zh/sdk/cocos2dx/v4/features/device-info" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /zh/sdk/cocos2dx/features/device-info +slug: "zh/sdk/cocos2dx/features/device-info" --- Adjust SDK 包含能够返回设备信息的辅助方法。用这些方法来向回传添加细节信息,优化报告。 diff --git a/src/content/docs/sdk/cocos2dx/v4/features/events-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/features/events-ja.mdx index f07987228..74900e2fa 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/events-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/events-ja.mdx @@ -1,15 +1,7 @@ --- title: "イベント情報を送信する" description: "Adjustにイベント情報を送信するには、これらのメソッドを使用してください。" -slug: "ja/sdk/cocos2dx/v4/features/events" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ja/sdk/cocos2dx/features/events +slug: "ja/sdk/cocos2dx/features/events" --- Adjust SDKは`AdjustEvent2dx`オブジェクトを提供しており、アプリのイベント情報を構造化してAdjustのサーバーに送信することができます。 diff --git a/src/content/docs/sdk/cocos2dx/v4/features/events-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/features/events-ko.mdx index 30bb01ab4..a58e410d4 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/events-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/events-ko.mdx @@ -1,15 +1,7 @@ --- title: "이벤트 정보 전송" description: "이 메서드를 사용하여 이벤트 정보를 Adjust로 전송합니다." -slug: "ko/sdk/cocos2dx/v4/features/events" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ko/sdk/cocos2dx/features/events +slug: "ko/sdk/cocos2dx/features/events" --- Adjust SDK가 제공하는 `AdjustEvent2dx` 객체는 이벤트 정보를 구성하고 이러한 정보를 앱에서 Adjust 서버로 전송하는 데 사용할 수 있습니다. diff --git a/src/content/docs/sdk/cocos2dx/v4/features/events-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/features/events-zh.mdx index aa84383b6..cf57ce2db 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/events-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/events-zh.mdx @@ -2,14 +2,6 @@ title: "发送事件信息" description: "使用这些方法向 Adjust 发送事件信息。" slug: "zh/sdk/cocos2dx/features/events" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /zh/sdk/cocos2dx/features/events --- Adjust SDK 提供一个 `AdjustEvent2dx` 对象,用于架构并向 Adjust 服务器发送来自您应用的事件信息。 diff --git a/src/content/docs/sdk/cocos2dx/v4/features/index-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/features/index-ja.mdx index e4211fa84..8862b34d1 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/index-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/index-ja.mdx @@ -2,17 +2,9 @@ title: "機能" description: "Adjust SDKを使用して、アプリ内情報をAdjustのサーバーに送信します。" category-title: "機能" -slug: "ja/sdk/cocos2dx/v4/features" +slug: "ja/sdk/cocos2dx/features" type: "category" sidebar-position: 3 -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ja/sdk/cocos2dx/features --- Adjust SDKを使用して、アプリ内情報をAdjustのサーバーに送信します。 diff --git a/src/content/docs/sdk/cocos2dx/v4/features/index-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/features/index-ko.mdx index f13346202..e4e1ce3a6 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/index-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/index-ko.mdx @@ -2,17 +2,9 @@ title: "기능" description: "Adjust SDK를 사용하여 Adjust 서버로 인앱 정보를 전송합니다." category-title: "기능" -slug: "ko/sdk/cocos2dx/v4/features" +slug: "ko/sdk/cocos2dx/features" type: "category" sidebar-position: 3 -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ko/sdk/cocos2dx/features --- Adjust SDK를 사용하여 Adjust 서버로 인앱 정보를 전송합니다. diff --git a/src/content/docs/sdk/cocos2dx/v4/features/index-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/features/index-zh.mdx index f06e3a4fb..fe4513d2a 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/index-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/index-zh.mdx @@ -2,17 +2,9 @@ title: "功能" description: "使用 Adjust SDK,向 Adjust 服务器发送应用内信息。" category-title: "功能" -slug: "zh/sdk/cocos2dx/v4/features" +slug: "zh/sdk/cocos2dx/features" type: "category" sidebar-position: 3 -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /zh/sdk/cocos2dx/features --- 使用 Adjust SDK,向 Adjust 服务器发送应用内信息。 diff --git a/src/content/docs/sdk/cocos2dx/v4/features/privacy-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/features/privacy-ja.mdx index 092af3e3a..301518d3b 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/privacy-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/privacy-ja.mdx @@ -1,15 +1,7 @@ --- title: "プライバシー機能の設定" description: "アプリ内でユーザーのプライバシーを処理するために使用できる機能を設定します。" -slug: "ja/sdk/cocos2dx/v4/features/privacy" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ja/sdk/cocos2dx/features/privacy +slug: "ja/sdk/cocos2dx/features/privacy" --- Adjust SDKには、アプリ内でのユーザープライバシーの処理に使用できる機能が含まれています。 diff --git a/src/content/docs/sdk/cocos2dx/v4/features/privacy-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/features/privacy-ko.mdx index d05888316..87f2acdd1 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/privacy-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/privacy-ko.mdx @@ -1,15 +1,7 @@ --- title: "프라이버시 기능 설정" description: "앱에서 사용자 프라이버시를 관리할 수 있는 기능을 구성합니다." -slug: "ko/sdk/cocos2dx/v4/features/privacy" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ko/sdk/cocos2dx/features/privacy +slug: "ko/sdk/cocos2dx/features/privacy" --- Adjust SDK에는 앱에서 사용자 프라이버시를 관리할 수 있는 기능이 포함되어 있습니다. diff --git a/src/content/docs/sdk/cocos2dx/v4/features/privacy-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/features/privacy-zh.mdx index c576d81cc..454709641 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/privacy-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/privacy-zh.mdx @@ -1,15 +1,7 @@ --- title: "设置隐私功能" description: "配置处理应用用户隐私的功能。" -slug: "zh/sdk/cocos2dx/v4/features/privacy" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /zh/sdk/cocos2dx/features/deep-links +slug: "zh/sdk/cocos2dx/features/privacy" --- Adjust SDK 包含处理应用用户隐私的功能。 diff --git a/src/content/docs/sdk/cocos2dx/v4/features/session-parameters-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/features/session-parameters-ja.mdx index a671f37e5..4fc0ddde2 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/session-parameters-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/session-parameters-ja.mdx @@ -2,14 +2,6 @@ title: "セッションパラメーターを設定する" description: "セッションごとにコールバックURLに情報を送信します。" slug: "ja/sdk/cocos2dx/features/session-parameters" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ja/sdk/cocos2dx/features/session-parameters --- Adjustダッシュボードで[コールバックURLを登録](https://help.adjust.com/ja/article/recommended-placeholders-callbacks)した場合、SDKがセッションを計測するとAdjustはコールバックURLにGETリクエストを送信します。 diff --git a/src/content/docs/sdk/cocos2dx/v4/features/session-parameters-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/features/session-parameters-ko.mdx index 10571a9cf..ee2bc4e17 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/session-parameters-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/session-parameters-ko.mdx @@ -1,15 +1,7 @@ --- title: "세션 파라미터 설정" description: "각 세션의 콜백 URL에 정보를 전송합니다." -slug: "ko/sdk/cocos2dx/v4/features/session-parameters" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ko/sdk/cocos2dx/features/session-parameters +slug: "ko/sdk/cocos2dx/features/session-parameters" --- Adjust 대시보드에 [콜백 URL을 등록](https://help.adjust.com/ko/article/recommended-placeholders-callbacks)하면 SDK가 세션을 측정할 때 Adjust가 GET 요청을 콜백 URL로 보냅니다. diff --git a/src/content/docs/sdk/cocos2dx/v4/features/session-parameters-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/features/session-parameters-zh.mdx index c5fe93f73..33a6e44b3 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/session-parameters-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/session-parameters-zh.mdx @@ -1,15 +1,7 @@ --- title: "配置会话参数" description: "将每次会话信息发送至回传 URL。" -slug: "zh/sdk/cocos2dx/v4/features/session-parameters" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /zh/sdk/cocos2dx/features/session-parameters +slug: "zh/sdk/cocos2dx/features/session-parameters" --- 您在 Adjust 控制面板中[注册回传 URL](https://help.adjust.com/zh/article/recommended-placeholders-callbacks),SDK 监测到会话后,Adjust 会向您的回传 URL 发送一个 GET 请求。 diff --git a/src/content/docs/sdk/cocos2dx/v4/features/short-links-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/features/short-links-ja.mdx index 59813fd09..795ce11ff 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/short-links-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/short-links-ja.mdx @@ -1,15 +1,7 @@ --- title: "ショートブランドリンクを解析" description: "Campaign Labで作成された短縮リンクを解析します。" -slug: "ja/sdk/cocos2dx/v4/features/short-links" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ja/sdk/cocos2dx/features/short-links +slug: "ja/sdk/cocos2dx/features/short-links" --- Adjustの[リンク短縮ソリューション](https://help.adjust.com/ja/article/short-branded-links)は、複雑で長いリンクをより簡潔で短いリンクに変換します。短縮リンクはディープリンクとキャンペーン情報を保持し、アプリがインストールされていない場合は、ユーザーをApp Storeに誘導します。 diff --git a/src/content/docs/sdk/cocos2dx/v4/features/short-links-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/features/short-links-ko.mdx index 47d9caca9..7354d0a48 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/short-links-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/short-links-ko.mdx @@ -1,15 +1,7 @@ --- title: "숏 브랜드 링크 해결" description: "Campaign Lab에서 생성된 숏 링크를 해석합니다." -slug: "ko/sdk/cocos2dx/v4/features/short-links" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ko/sdk/cocos2dx/features/short-links +slug: "ko/sdk/cocos2dx/features/short-links" --- Adjust의 [링크 단축 솔루션](https://help.adjust.com/ko/article/short-branded-links)은 복잡하고 긴 링크를 간결하고 간결한 링크로 만들어줍니다. 숏 링크는 딥링크와 캠페인 정보를 유지하며, 사용자가 아직 앱을 설치하지 않은 경우 앱 스토어로 라우팅합니다. diff --git a/src/content/docs/sdk/cocos2dx/v4/features/short-links-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/features/short-links-zh.mdx index ed0c2da1b..ef2046868 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/short-links-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/short-links-zh.mdx @@ -1,15 +1,7 @@ --- title: "解析品牌化短链接" description: "解析在 Campaign Lab 中创建的短链接。" -slug: "zh/sdk/cocos2dx/v4/features/short-links" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /zh/sdk/cocos2dx/features/short-links +slug: "zh/sdk/cocos2dx/features/short-links" --- Adjust 的[短链接解决方案](https://help.adjust.com/zh/article/short-branded-links)能将复杂的长链接变成简洁的短链接。短链接会保留深度链接和推广活动信息,如果用户尚未安装您的应用,则会将用户转到应用商店。 diff --git a/src/content/docs/sdk/cocos2dx/v4/features/skad-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/features/skad-ja.mdx index b02e95fe4..e6361d427 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/skad-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/skad-ja.mdx @@ -1,15 +1,7 @@ --- title: "SKAdNetworkとconversion valueの設定" description: "iOSアプリのSKAdNetwork機能を設定します。" -slug: "ja/sdk/cocos2dx/v4/features/skad" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ja/sdk/cocos2dx/features/skad +slug: "ja/sdk/cocos2dx/features/skad" --- diff --git a/src/content/docs/sdk/cocos2dx/v4/features/skad-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/features/skad-ko.mdx index 3bac7d60f..d4bb94206 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/skad-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/skad-ko.mdx @@ -1,15 +1,7 @@ --- title: "SKAdNetwork 및 전환값 설정" description: "iOS 앱의 SKAdNetwork 기능을 구성합니다." -slug: "ko/sdk/cocos2dx/v4/features/skad" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ko/sdk/cocos2dx/features/skad +slug: "ko/sdk/cocos2dx/features/skad" --- diff --git a/src/content/docs/sdk/cocos2dx/v4/features/skad-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/features/skad-zh.mdx index 04fb0be26..aa3588f88 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/skad-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/skad-zh.mdx @@ -1,15 +1,7 @@ --- title: "设置 SKAdNetwork 和转化值" description: "为 iOS 应用配置 SKAdNetwork 功能。" -slug: "zh/sdk/cocos2dx/v4/features/skad" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /zh/sdk/cocos2dx/features/skad +slug: "zh/sdk/cocos2dx/features/skad" --- diff --git a/src/content/docs/sdk/cocos2dx/v4/features/subscriptions-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/features/subscriptions-ja.mdx index 7677a248d..5fd6f9c93 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/subscriptions-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/subscriptions-ja.mdx @@ -1,15 +1,7 @@ --- title: "サブスクリプション情報の送信" description: "Adjustにサブスクリプション情報を送信するには、これらのメソッドを使用してください。" -slug: "ja/sdk/cocos2dx/v4/features/subscriptions" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ja/sdk/cocos2dx/features/subscriptions +slug: "ja/sdk/cocos2dx/features/subscriptions" --- diff --git a/src/content/docs/sdk/cocos2dx/v4/features/subscriptions-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/features/subscriptions-ko.mdx index aa13772e2..3f6224b56 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/subscriptions-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/subscriptions-ko.mdx @@ -1,15 +1,7 @@ --- title: "구독 정보 전송" description: "이 메서드를 사용하여 구독 정보를 Adjust로 전송합니다." -slug: "ko/sdk/cocos2dx/v4/features/subscriptions" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ko/sdk/cocos2dx/features/subscriptions +slug: "ko/sdk/cocos2dx/features/subscriptions" --- diff --git a/src/content/docs/sdk/cocos2dx/v4/features/subscriptions-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/features/subscriptions-zh.mdx index 46de1752b..0d4d70791 100644 --- a/src/content/docs/sdk/cocos2dx/v4/features/subscriptions-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/features/subscriptions-zh.mdx @@ -1,15 +1,7 @@ --- title: "发送订阅信息" description: "使用这些方法向 Adjust 发送订阅信息。" -slug: "zh/sdk/cocos2dx/v4/features/subscriptions" -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /zh/sdk/cocos2dx/features/subscriptions +slug: "zh/sdk/cocos2dx/features/subscriptions" --- diff --git a/src/content/docs/sdk/cocos2dx/v4/index-ja.mdx b/src/content/docs/sdk/cocos2dx/v4/index-ja.mdx index 0d742c441..d7e9f268f 100644 --- a/src/content/docs/sdk/cocos2dx/v4/index-ja.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/index-ja.mdx @@ -3,15 +3,6 @@ title: "Cocos2d-x SDK 連携ガイド" description: "Cocos2d-xアプリでAdjustの機能にアクセスするには、Web SDKを使用してください" category-title: "Cocos2d-x SDK" slug: "ja/sdk/cocos2dx" -sidebar-position: 7 -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ja/sdk/cocos2dx --- AdjustのAndroid SDKを実装することで、アトリビューション、イベント、さらにその他のさまざまなデータをCocos2d\-xアプリで記録できます。Adjust SDKをアプリに実装するには、以下の手順に従ってください。 diff --git a/src/content/docs/sdk/cocos2dx/v4/index-ko.mdx b/src/content/docs/sdk/cocos2dx/v4/index-ko.mdx index b78fb812e..3ff29e01a 100644 --- a/src/content/docs/sdk/cocos2dx/v4/index-ko.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/index-ko.mdx @@ -4,14 +4,6 @@ description: "웹 SDK를 사용해 Cocos2d-x 앱의 Adjust 기능에 액세스 category-title: "Cocos2d-x SDK" slug: "ko/sdk/cocos2dx" sidebar-position: 7 -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /ko/sdk/cocos2dx --- Adjust Android SDK를 사용하면 Cocos2d\-x 앱에서의 어트리뷰션, 이벤트 등을 기록할 수 있습니다. 본 가이드의 단계를 수행하여 Adjust SDK와 연동되도록 앱을 설정하시기 바랍니다. diff --git a/src/content/docs/sdk/cocos2dx/v4/index-zh.mdx b/src/content/docs/sdk/cocos2dx/v4/index-zh.mdx index e9b62010b..02fa02fcc 100644 --- a/src/content/docs/sdk/cocos2dx/v4/index-zh.mdx +++ b/src/content/docs/sdk/cocos2dx/v4/index-zh.mdx @@ -4,14 +4,6 @@ description: "使用 Web SDK 在您的 Cocos2d-x 应用中使用 Adjust 功能" category-title: "Cocos2d-x SDK" slug: "zh/sdk/cocos2dx" sidebar-position: 7 -versions: - - label: v5 - value: v5 - default: true - - label: v4 - value: v4 -redirects: - v5: /zh/sdk/cocos2dx --- 通过 Adjust 安卓 SDK,您可以在 Cocos2d\-x 应用中记录归因、事件及更多数据。请按照本指南中说明的步骤对应用进行设置,以便使用 Adjust SDK。 From cd49766b908e3e1a6753e562b62c1bfcd9efd856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Thu, 26 Sep 2024 11:16:02 +0200 Subject: [PATCH 27/59] Update slug for broken link --- .../docs/sdk/cocos2dx/v5/features/global-parameters.mdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/sdk/cocos2dx/v5/features/global-parameters.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/global-parameters.mdoc index 6d8957f91..132affbdd 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/global-parameters.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/global-parameters.mdoc @@ -1,7 +1,7 @@ --- title: Configure global parameters description: Send information to your callback URL with each session. -slug: en/sdk/cocos2dx/features/global-parameters +slug: en/sdk/cocos2dx/features/session-parameters versions: - label: v5 value: v5 From 2b6ec918d782e51a56568ec66d5da367143ec819 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Thu, 26 Sep 2024 11:32:25 +0200 Subject: [PATCH 28/59] Update variable usage --- .../docs/sdk/cocos2dx/v5/configuration.mdoc | 10 ++-- .../sdk/cocos2dx/v5/features/ad-revenue.mdoc | 46 ++++++++++--------- .../docs/sdk/cocos2dx/v5/features/att.mdoc | 2 +- .../sdk/cocos2dx/v5/features/callbacks.mdoc | 8 ++-- .../sdk/cocos2dx/v5/features/deep-links.mdoc | 4 +- src/content/docs/sdk/cocos2dx/v5/index.mdoc | 4 +- src/variables.json | 21 ++++++++- 7 files changed, 57 insertions(+), 38 deletions(-) diff --git a/src/content/docs/sdk/cocos2dx/v5/configuration.mdoc b/src/content/docs/sdk/cocos2dx/v5/configuration.mdoc index 7ed8064c9..f055c4af1 100644 --- a/src/content/docs/sdk/cocos2dx/v5/configuration.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/configuration.mdoc @@ -28,8 +28,8 @@ To instantiate your config object, create a new `AdjustConfig2dx` instance and p ```cpp #include "Adjust/Adjust2dx.h" -// ... -std::string appToken = "{YourAppToken}"; + +std::string appToken = "{% $variables.config.token %}"; std::string environment = AdjustEnvironmentSandbox2dx; AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment, false); @@ -59,7 +59,7 @@ You can set your log level by calling the `setLogLevel` method on your `AdjustCo - `logLevel` (`ADJLogLevel2dx`): The log level you want to use. ```cpp -std::string appToken = "{YourAppToken}"; +std::string appToken = "{% $variables.config.token %}"; std::string environment = AdjustEnvironmentSandbox2dx; AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment, false); @@ -81,7 +81,7 @@ You can use an external device ID as a custom identifier for a device. This help ```cpp AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); -adjustConfig.setExternalDeviceId("{Your-External-Device-Id}"); +adjustConfig.setExternalDeviceId("{% $variables.config.externalDeviceId %}"); Adjust2dx::initSdk(adjustConfig); ``` @@ -97,7 +97,7 @@ You can configure a default link token if your app is preinstalled on a device. ```cpp AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); -adjustConfig.setDefaultTracker("{TrackerToken}"); +adjustConfig.setDefaultTracker("{% $variables.config.defaultLink %}"); Adjust2dx::initSdk(config); ``` diff --git a/src/content/docs/sdk/cocos2dx/v5/features/ad-revenue.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/ad-revenue.mdoc index b7073e318..7eef72a07 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/ad-revenue.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/ad-revenue.mdoc @@ -64,8 +64,8 @@ To send the number of recorded ad impressions, call the `setAdImpressionsCount` - `setAdImpressionsCount` (`int`): The number of ad impressions. ```cpp -AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("applovin_max_sdk"); -adjustAdRevenue.setAdImpressionsCount(10); +AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("{% $variables.adRevenue.source %}"); +adjustAdRevenue.setAdImpressionsCount({% $variables.adRevenue.adImpressionsCount %}); ``` #### Ad revenue network @@ -75,8 +75,8 @@ To send the network associated with ad revenue, call the `setAdRevenueNetwork` m - `adRevenueNetwork` (`string`): The name of the network associated with the ad revenue. ```cpp -AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("applovin_max_sdk"); -adjustAdRevenue.adRevenueNetwork("network"); +AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("{% $variables.adRevenue.source %}"); +adjustAdRevenue.adRevenueNetwork("{% $variables.adRevenue.adRevenueNetwork %}"); ``` #### Ad revenue unit @@ -86,8 +86,8 @@ To send the advertising unit that earned the revenue, call the `setAdRevenueUnit - `adRevenueUnit` (`string`): The name of the ad unit associated with the ad revenue. ```cpp -AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("applovin_max_sdk"); -adjustAdRevenue.adRevenueUnit("unit1"); +AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("{% $variables.adRevenue.source %}"); +adjustAdRevenue.adRevenueUnit("{% $variables.adRevenue.adRevenueUnit %}"); ``` #### Ad revenue placement @@ -97,8 +97,8 @@ To send the placement of the ad unit, call the `setAdRevenuePlacement` method wi - `adRevenuePlacement` (`string`): The placement of the ad unit. ```cpp -AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("applovin_max_sdk"); -adjustAdRevenue.setAdRevenuePlacement("banner"); +AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("{% $variables.adRevenue.source %}"); +adjustAdRevenue.setAdRevenuePlacement("{% $variables.adRevenue.adRevenuePlacement %}"); ``` ### Callback parameters {% #callback-parameters %} @@ -130,9 +130,9 @@ You can read more about using URL callbacks, including a full list of available {% /callout %} ```cpp -AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("applovin_max_sdk"); -adjustAdRevenue.addCallbackParameter("key", "value"); -adjustAdRevenue.addCallbackParameter("foo", "bar"); +AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("{% $variables.adRevenue.source %}"); +adjustAdRevenue.addCallbackParameter({% $variables.adRevenue.callbackParams[0] %}); +adjustAdRevenue.addCallbackParameter({% $variables.adRevenue.callbackParams[1] %}); ``` ### Partner parameters {% #partner-parameters %} @@ -148,9 +148,9 @@ Partner parameters don't appear in raw data by default. You can add the `{partne Add partner parameters to your event by calling the `addPartnerParameter` method with `string` key-value arguments. You can add multiple parameters by calling this method multiple times. ```cpp -AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("applovin_max_sdk"); -adjustAdRevenue.addPartnerParameter("key", "value"); -adjustAdRevenue.addPartnerParameter("foo", "bar"); +AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx({% $variables.adRevenue.source %}); +adjustAdRevenue.addPartnerParameter({% $variables.adRevenue.partnerParams[0] %}); +adjustAdRevenue.addPartnerParameter({% $variables.adRevenue.partnerParams[1] %}); ``` ## Send ad revenue {% #send-ad-revenue %} @@ -158,13 +158,15 @@ adjustAdRevenue.addPartnerParameter("foo", "bar"); Once you've populated your `AdjustAdRevenue2dx` instance, pass it as an argument to the `Adjust2dx::trackAdRevenue()` to send the ad revenue information to Adjust. ```cpp -AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("applovin_max_sdk"); -adjustAdRevenue.setRevenue(1, "EUR"); -adjustAdRevenue.setAdImpressionsCount(10); -adjustAdRevenue.setAdRevenueNetwork("network1"); -adjustAdRevenue.setAdRevenueUnit("unit1"); -adjustAdRevenue.setAdRevenuePlacement("banner"); -adjustAdRevenue.addCallbackParameter("key1", "value1"); -adjustAdRevenue.addPartnerParameter("key2", "value2"); +AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("{% $variables.adRevenue.source %}"); +adjustAdRevenue.setRevenue({% $variables.adRevenue.revenue.amount %}, "{% $variables.adRevenue.revenue.currency %}"); +adjustAdRevenue.setAdImpressionsCount({% $variables.adRevenue.adImpressionsCount %}); +adjustAdRevenue.setAdRevenueNetwork("{% $variables.adRevenue.adRevenueNetwork %}"); +adjustAdRevenue.setAdRevenueUnit("{% $variables.adRevenue.adRevenueUnit %}"); +adjustAdRevenue.setAdRevenuePlacement("{% $variables.adRevenue.adRevenuePlacement %}"); +adjustAdRevenue.addCallbackParameter({% $variables.adRevenue.callbackParams[0] %}); +adjustAdRevenue.addCallbackParameter({% $variables.adRevenue.callbackParams[1] %}); +adjustAdRevenue.addPartnerParameter({% $variables.adRevenue.partnerParams[0] %}); +adjustAdRevenue.addPartnerParameter({% $variables.adRevenue.partnerParams[1] %}) Adjust2dx::trackAdRevenueNew(adjustAdRevenue); ``` diff --git a/src/content/docs/sdk/cocos2dx/v5/features/att.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/att.mdoc index 3183e330f..9243ac700 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/att.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/att.mdoc @@ -65,7 +65,7 @@ If the user closes the app before the timeout ends, or before they select their ```cpp AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment, false); -adjustConfig.setAttConsentWaitingInterval(30); +adjustConfig.setAttConsentWaitingInterval({% $variables.config.attWaitingInterval %}); Adjust2dx::InitSdk(adjustConfig); ``` diff --git a/src/content/docs/sdk/cocos2dx/v5/features/callbacks.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/callbacks.mdoc index 70bbd662a..e39d01780 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/callbacks.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/callbacks.mdoc @@ -40,7 +40,7 @@ static void sessionSuccessCallbackMethod(AdjustSessionSuccess2dx sessionSuccess) } bool AppDelegate::applicationDidFinishLaunching() { - std::string appToken = "{YourAppToken}"; + std::string appToken = "{% $variables.config.token %}"; std::string environment = AdjustEnvironmentSandbox2dx; AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); @@ -62,7 +62,7 @@ static void sessionFailureCallbackMethod(AdjustSessionFailure2dx sessionFailure) } bool AppDelegate::applicationDidFinishLaunching() { - std::string appToken = "{YourAppToken}"; + std::string appToken = "{% $variables.config.token %}"; std::string environment = AdjustEnvironmentSandbox2dx; AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); @@ -100,7 +100,7 @@ static void eventSuccessCallbackMethod(AdjustEventSuccess2dx eventSuccess) { } bool AppDelegate::applicationDidFinishLaunching() { - std::string appToken = "{YourAppToken}"; + std::string appToken = "{% $variables.config.token %}"; std::string environment = AdjustEnvironmentSandbox2dx; AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); @@ -122,7 +122,7 @@ static void eventFailureCallbackMethod(AdjustEventFailure2dx eventFailure) { } bool AppDelegate::applicationDidFinishLaunching() { - std::string appToken = "{YourAppToken}"; + std::string appToken = "{% $variables.config.token %}"; std::string environment = AdjustEnvironmentSandbox2dx; AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); diff --git a/src/content/docs/sdk/cocos2dx/v5/features/deep-links.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/deep-links.mdoc index 5b4befc78..8f335c47b 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/deep-links.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/deep-links.mdoc @@ -41,7 +41,7 @@ static bool deferredDeeplinkCallbackMethod(std::string deeplink) { } bool AppDelegate::applicationDidFinishLaunching() { - std::string appToken = "{YourAppToken}"; + std::string appToken = "{% $variables.config.token %}"; std::string environment = AdjustEnvironmentSandbox2dx; AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); @@ -75,7 +75,7 @@ When a user clicks on a LinkMe URL they have the option to copy the link informa To enable pasteboard checking in your app, call the `enableLinkMe` method on your `AdjustConfig2dx` instance. ```cpp -std::string appToken = "{YourAppToken}"; +std::string appToken = "{% $variables.config.token %}"; std::string environment = AdjustEnvironmentSandbox2dx; AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); diff --git a/src/content/docs/sdk/cocos2dx/v5/index.mdoc b/src/content/docs/sdk/cocos2dx/v5/index.mdoc index 0afee4c7c..6f85298a1 100644 --- a/src/content/docs/sdk/cocos2dx/v5/index.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/index.mdoc @@ -175,12 +175,12 @@ When running tests you should ensure that your environment is set to `AdjustEnvi #include "Adjust/Adjust2dx.h" bool AppDelegate::applicationDidFinishLaunching() { - std::string appToken = "{YourAppToken}"; + std::string appToken = "{% $variables.config.token %}"; std::string environment = AdjustEnvironmentSandbox2dx; AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose); - Adjust2dx::initSdl=k(adjustConfig); + Adjust2dx::initSdk(adjustConfig); } ``` diff --git a/src/variables.json b/src/variables.json index b86c1147e..1c2a7cf2b 100644 --- a/src/variables.json +++ b/src/variables.json @@ -1,10 +1,14 @@ { "config": { - "token": "2fm9gkqubvpc" + "token": "2fm9gkqubvpc", + "externalDeviceId": "1a42b171-faa5-46da-b5ae-6f4be6d05167", + "defaultLink": "abc123", + "attWaitingInterval": "30" }, "ids": { "gps_adid": "5962dfc1-3a53-4692-850b-22c4bf4311a5", - "android_uuid": "781f17d5-5048-4fae-a4e5-77b58bab62b9" + "android_uuid": "781f17d5-5048-4fae-a4e5-77b58bab62b9", + "idfa": "f6e44e82-1289-460d-b251-890d5815e235" }, "event": { "token": "g3mfiw", @@ -24,5 +28,18 @@ "\"revenue_amount\": \"0.25\"" ], "partnerParamsJson": ["\"product_id\": \"29\"", "\"user_id\": \"835\""] + }, + "adRevenue": { + "source": "applovin_max_sdk", + "revenue": { + "amount": "1.00", + "currency": "EUR" + }, + "adImpressionCount": "10", + "adRevenueNetwork": "network1", + "adRevenueUnit": "unit1", + "adRevenuePlacement": "banner", + "callbackParams": ["\"key1\", \"value1\"", "\"key2\", \"value2\""], + "partnerParams": ["\"key3\", \"value3\"", "\"key4\", \"value4\""] } } From afa2bcfd122e303d95e32c69ac26de69b74e8f3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Thu, 26 Sep 2024 13:22:11 +0200 Subject: [PATCH 29/59] Add third party sharing clarifications --- .../sdk/cocos2dx/v5/features/privacy.mdoc | 74 +++++++++++++------ 1 file changed, 50 insertions(+), 24 deletions(-) diff --git a/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc index 53afdf8fe..be269bf8d 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc @@ -68,21 +68,27 @@ adjustConfig.enablePlayStoreKidsCompliance(); Adjust2dx::initSdk(adjustConfig); ``` -## Configure third-party sharing options {% #configure-third-party-sharing-options %} +## Configure third party sharing options {% #configure-third-party-sharing-options %} -You can use the Adjust SDK to record when a user changes their third-party sharing settings. Third party sharing settings are configured using the `AdjustThirdPartySharing2dx` class. +Adjust shares all metrics with all SANs and module partners by default. To change this, configure your third party sharing preferences using the `AdjustThirdPartySharing2dx` class. -To enable or disable third party sharing with the Adjust SDK, you need to instantiate an `AdjustThirdPartySharing2dx` object. This object contains variables that control how third party sharing is handled by Adjust. +You can update your third party sharing settings at any time during the Adjust SDK lifecycle by instantiating an `AdjustThirdPartySharing2dx` object and passing it to `Adjust2dx::trackThirdPartySharing`. + +{% callout type="important" %} +If you need to communicate third party sharing settings before the install session, for example [disabling third party sharing globally](#disable-third-party-sharing-globally) or [configuring per-partner sharing settings](#configure-per-partner-sharing-settings), you MUST instantiate and configure an `AdjustThirdPartySharing2dx` instance and call `Adjust2dx::trackThirdPartySharing` **before** calling `Adjust2dx::initSdk`. +{% /callout %} + +### Instantiate a third party sharing object {% #instantiate-a-third-party-sharing-object %} To instantiate a third party sharing object, create a new `AdjustThirdPartySharing2dx` instance and pass the following parameters: -- `isEnabled` (`bool`): Whether third party sharing is enabled. Pass `true` to enable third party sharing or `false` to disable third party sharing. +- `isEnabled` (`bool` | `null`): Whether third party sharing is enabled. Pass `true` or `null` to enable third party sharing. Pass `false` to disable third party sharing. ```cpp AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true); ``` -Once you've instantiated your `AdjustThirdPartySharing2dx` object, you can send the information to Adjust by calling the `Adjust2dx::trackThirdPartySharing` method with your `AdjustThirdPartySharing2dx` instance as an argument. +Once you've instantiated your `AdjustThirdPartySharing2dx` object, send the information to Adjust by calling the `Adjust2dx::trackThirdPartySharing` method with your `AdjustThirdPartySharing2dx` instance as an argument. ```cpp AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true); @@ -94,9 +100,9 @@ Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); If you want to disable sharing information with all partners, including the initial install session, you MUST: 1. Instantiate your `AdjustThirdPartySharing2dx` instance with a `false` argument. -1. Call `Adjust2dx::trackThirdPartySharing` BEFORE you call `Adjust2dx::initSdk`. +1. Call `Adjust2dx::trackThirdPartySharing` **before** you call `Adjust2dx::initSdk`. -The Adjust SDK caches the third party sharing update call and sends it before the install session information. +The Adjust SDK caches the third party sharing update and sends it to Adjust **before** the install session information. ```cpp AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); @@ -107,15 +113,22 @@ Adjust2dx::initSdk(adjustConfig); ### Configure per-partner sharing settings {% #configure-per-partner-sharing-settings %} -If you instantiate your `AdjustAttribution2dx` object with a `true` argument, the Adjust SDK defaults to sending all information to every partner you have set up for your app. To control this, you must customize what data you share on a per-partner basis by calling the `addPartnerSharingSetting` method on your `AdjustAttribution2dx` instance with the following arguments: +{% callout type="important" %} +For SAN partners, you MAY pass the partner's name as the `partnerName`. For module partners, you MUST pass the partner ID. Adjust RECOMMENDS you pass the partner ID for both SANs and module partners. +{% /callout %} + +If you instantiate your `AdjustAttribution2dx` object with a `true` or `null` argument, the Adjust SDK defaults to sending all information to every partner you have set up for your app. To control this, you must customize what data you share on a per-partner basis by calling the `addPartnerSharingSetting` method on your `AdjustAttribution2dx` instance with the following arguments: | Argument | Type | Description | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `partnerName` | `string` | The ID of the partner. [Download the full list of available partners](https://assets.ctfassets.net/5s247im0esyq/2QQROOadVqJzrME7yXKObe/7aca25e53d38befb2d469809e62b6fcc/3rd-party-sharing-partners.xlsx) | -| `key` | `string` | The metric to share with the partner | -| `value` | `bool` | The user's decision | +| `key` | `string` | The metric you want to update. | +| `value` | `bool` | Pass `false` to stop sharing a metric with the specified partner or `true` to resume sharing. | -To enable specific features, you MUST disable `all` metrics, then enable only the metrics you want to share. +To share only specific metrics with a partner, you MUST: + +1. Set `all` metrics to `false`. +1. Set each metric you want to share to `true`. ```cpp AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true); @@ -150,9 +163,7 @@ The following metrics can be controlled using this method: - `uninstall` {% /listcolumns %} -When you set a `false` value against a metric for a partner, Adjust stops sharing the metric with the partner. - -### Examples +#### Examples If you want to stop sharing all metrics with a specific partner, pass the `all` key with a `false` value. @@ -170,14 +181,10 @@ adjustThirdPartySharing.addPartnerSharingSetting("PartnerA", "all", true); Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); ``` -You can stop or start sharing specific metrics by calling the `addPartnerSharingSetting` method multiple times with different keys. For example, if you only want to share event information with a partner, you can pass: - -- `all` with a `false` value to disable sharing all information. -- `event` with a `true` value to enable event sharing +To only share event data with a specific partner: -{% callout type="note" %} -Specific keys always take priority over `all`. If you pass `all` with other keys, the individual key values override the `all` setting. -{% /callout %} +- Pass `all` with a `false` value to stop sharing all metrics. +- Pass `event` with a `true` value to start sharing events. ```cpp AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true); @@ -188,7 +195,7 @@ Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); ### Add per-partner granular information {% #add-per-partner-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 on your `AdjustThirdPartySharing2dx` instance with the following parameters: +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 on your `AdjustThirdPartySharing2dx` instance with the following parameters: | Argument | Type | Description | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -202,15 +209,17 @@ adjustThirdPartySharing.addGranularOption("PartnerA", "foo", "bar"); Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); ``` +Granular options can be configured or updated at any time during the Adjust SDK lifecycle. If you configure granular options before calling `Adjust2dx::initSdk`, the Adjust SDK caches the value and sends it before the initial install. + #### Manage Facebook Limited Data Use {% #manage-facebook-ldu %} {% callout type="important" %} -The Adjust SDK sends information to Facebook as soon as the app is installed. You MUST set this **before** initializing the SDK. +You MUST configure these granular options and call `Adjust2dx::trackThirdPartySharing` **before** calling `Adjust2dx::initSdk`. {% /callout %} Facebook provides a feature called Limited Data Use (LDU) to comply with the California Consumer Privacy Act (CCPA). 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 using the following keys +You can update the Facebook LDU status using the following keys: {% table %} - Key @@ -239,10 +248,15 @@ AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing adjustThirdPartySharing.addGranularOption("facebook", "data_processing_options_country", "1"); adjustThirdPartySharing.addGranularOption("facebook", "data_processing_options_state", "1000"); Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); +Adjust2dx::initSdk(adjustConfig); ``` #### Provide consent data to Google (Digital Markets Act compliance) {% #dma-compliance %} +{% callout type="important" %} +You MUST configure these granular options and call `Adjust2dx::trackThirdPartySharing` **before** calling `Adjust2dx::initSdk`. You MUST NOT change these granular options later or Google won't claim attribution. +{% /callout %} + To comply with the EU's Digital Markets Act (DMA), Google Ads and the Google Marketing Platform require explicit consent to receive Adjust’s attribution requests to their APIs. To communicate this consent, you MUST the following granular options to your third party sharing instance for the partner `google_dma` if: - You have users in the European Economic Area (EEA). This includes EU member states, Switzerland, Norway, Iceland and Slovenia. @@ -272,8 +286,20 @@ To comply with the EU's Digital Markets Act (DMA), Google Ads and the Google Mar AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true); adjustThirdPartySharing.addGranularOption("google_dma", "eea", "1"); adjustThirdPartySharing.addGranularOption("google_dma", "ad_personalization", "1"); +adjustThirdPartySharing.addGranularOption("google_dma", "ad_user_data", "0"); +Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); +Adjust2dx::initSdk(adjustConfig); +``` + +If your user isn't in the EEA, you MUST set both `ad_personalization` and `ad_user_data` to `1`. If these values aren't set, Google won't claim attribution. + +```cpp +AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true); +adjustThirdPartySharing.addGranularOption("google_dma", "eea", "0"); +adjustThirdPartySharing.addGranularOption("google_dma", "ad_personalization", "1"); adjustThirdPartySharing.addGranularOption("google_dma", "ad_user_data", "1"); Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); +Adjust2dx::initSdk(adjustConfig); ``` ## Set URL strategy {% #set-url-strategy %} From 0e41c751b3cbb2bf5a39f507994c4db2681affca Mon Sep 17 00:00:00 2001 From: ivosam3 Date: Thu, 26 Sep 2024 16:37:43 +0200 Subject: [PATCH 30/59] Added subscription Merged variables conflict --- .../cocos2dx/v5/features/subscriptions.mdoc | 232 ++++++++++++++++++ src/variables.json | 13 + 2 files changed, 245 insertions(+) create mode 100644 src/content/docs/sdk/cocos2dx/v5/features/subscriptions.mdoc diff --git a/src/content/docs/sdk/cocos2dx/v5/features/subscriptions.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/subscriptions.mdoc new file mode 100644 index 000000000..e4d011a74 --- /dev/null +++ b/src/content/docs/sdk/cocos2dx/v5/features/subscriptions.mdoc @@ -0,0 +1,232 @@ +--- +title: Send subscription information +description: Use these methods send subscription information to Adjust. +slug: en/sdk/cocos2dx/features/subscriptions +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v4: /en/sdk/cocos2dx/v4/features/subscriptions +--- + +{% callout type="important" %} +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. +{% /callout %} + +You can record App Store and Play Store subscriptions and verify their validity with the Adjust SDK. + +## How it works {% #how-it-works %} + +After the user purchases a subscription, create an `AdjustAppStoreSubscription2dx` or `AdjustPlayStoreSubscription2dx` instance. These instances contain subscription details that allows Adjust to measure the subscription event. + +## Reference {% #reference %} + +The `AdjustAppStoreSubscription2dx` and `AdjustPlayStoreSubscription2dx` classes are used to hold information about a subscription. Each subscription is represented by unique `AdjustAppStoreSubscription2dx` or `AdjustPlayStoreSubscription2dx` instances. + +To get started, you need to create a subscription object containing details of the subscription purchase. + +### Instantiate a subscription object {% #instantiate-a-subscription-object %} + +{% tabs %} +{% tab title="App Store" sync="appstore" %} + +Instantiate an `AdjustAppStoreSubscription2dx` object with the following arguments: + +| Argument | Type | Description | +| --------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `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 | + +```cpp +AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx({% $variables.subscription.appStoreSubscription %}); +``` + +{% /tab %} +{% tab title="Play Store" sync="playstore" %} + +Instantiate an `AdjustPlayStoreSubscription2dx` object with the following arguments: + +| Argument | Type | Description | +| --------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `price` | `double` | 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 | + +```cpp +AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx({% $variables.subscription.playStoreSubscription %}); +``` +{% /tab %} +{% /tabs %} + +### Record the purchase date {% #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. + +{% tabs %} +{% tab title="App Store" sync="appstore" %} + +Call the `setTransactionDate` method on your subscription object to record the timestamp of the subscription. + +| Argument | Type | Description | +| ----------------- | --------- | ---------------------------------------- | +| `transactionDate` | `string` | The timestamp of the subscription | + +```cpp +AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx({% $variables.subscription.appStoreSubscription %}); +subscription.setTransactionDate(transactionDate); +``` + +{% /tab %} +{% tab title="Play Store" sync="playstore" %} + +Call the `setPurchaseTime` method on your subscription object to record the timestamp of the subscription. + +| Argument | Type | Description | +| ----------------- | --------- | ---------------------------------------- | +| `purchaseTime` | `string` | The timestamp of the subscription | + +```cpp +AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx({% $variables.subscription.playStoreSubscription %}); +subscription.setPurchaseTime(purchaseTime); +``` +{% /tab %} +{% /tabs %} + +### Record the purchase region (iOS only) {% #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 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/storekit/storefront/3792000-countrycode) of the [`Storefront`](https://developer.apple.com/documentation/storekit/storefront) object. + +| Argument | Type | Description | +| ----------------- | --------- | ---------------------------------------- | +| `salesRegion` | `string` | The country code for the subscription | + +```cpp +AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx({% $variables.subscription.appStoreSubscription %}); +subscription.setSalesRegion(salesRegion); +``` + +### Add callback parameters {% #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. + +{% tabs %} +{% tab title="App Store" sync="appstore" %} + +```cpp +AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx({% $variables.subscription.appStoreSubscription %}); +subscription.addCallbackParameter("{% $variables.subscription.key1 %}"); +subscription.addCallbackParameter("{% $variables.subscription.key2 %}"); +``` + +{% /tab %} +{% tab title="Play Store" sync="playstore" %} + +```cpp +AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx({% $variables.subscription.playStoreSubscription %}); +subscription.addCallbackParameter("{% $variables.subscription.key1 %}"); +subscription.addCallbackParameter("{% $variables.subscription.key2 %}"); +``` + +{% /tab %} +{% /tabs %} + +### Add partner parameters {% #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. + +{% tabs %} +{% tab title="App Store" sync="appstore" %} + +```cpp +AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx({% $variables.subscription.appStoreSubscription %}); +subscription.addPartnerParameter("{% $variables.subscription.key1 %}"); +subscription.addPartnerParameter("{% $variables.subscription.key2 %}"); +``` + +{% /tab %} +{% tab title="Play Store" sync="playstore" %} + +```cpp +AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx({% $variables.subscription.playStoreSubscription %}); +subscription.addPartnerParameter("{% $variables.subscription.key1 %}"); +subscription.addPartnerParameter("{% $variables.subscription.key2 %}"); +``` + +{% /tab %} +{% /tabs %} + +## Tutorial {% #tutorial %} +Once you have set up your subscription object, you can record it using the Adjust SDK. + +This tutorial demonstrates how to use the `AdjustAppStoreSubscription2dx` and `AdjustPlayStoreSubscription2dx` classes to send subscription information to Adjust. You will learn: + +1. How to create create and populate an `AdjustAppStoreSubscription2dx` or `AdjustPlayStoreSubscription2dx` instance. +1. How to use the `AdjustAppStoreSubscription2dx` and `AdjustPlayStoreSubscription2dx` classes in your app to send subscription information to Adjust. + +To send subscription information to Adjust, follow these steps: + +{% tabs %} +{% tab title="App Store" sync="appstore" %} + +1. Instantiate and populate an `AdjustAppStoreSubscription2dx` object with the `price`, `currency`, and `transactionId`. In the example below, the following properties are set: + - The transaction date is set to _txn\_20230918T123456Z_ + - The sales region is set to _US_. + - The callback parameters are set to _"key", "value"_ and _"foo", "bar"_. + - The partner parameters are set to _"key", "value"_ and _"foo", "bar"_. +1. At the end of your function, send the information to Adjust by calling `trackAppStoreSubscription` with your `AdjustAppStoreSubscription2dx` instance as an argument. + +```cpp +#include "Adjust/Adjust2dx.h" + +std::string appToken = "{% $variables.config.token %}"; +std::string environment = AdjustEnvironmentSandbox2dx; + +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment, false); +Adjust2dx::initSdk(adjustConfig); + +AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx({% $variables.subscription.appStoreSubscription %}); +subscription.setTransactionDate(transactionDate); +subscription.setSalesRegion(salesRegion); +subscription.addCallbackParameter("{% $variables.subscription.key1 %}"); +subscription.addCallbackParameter("{% $variables.subscription.key2 %}"); +subscription.addPartnerParameter("{% $variables.subscription.key1 %}"); +subscription.addPartnerParameter("{% $variables.subscription.key2 %}"); +Adjust2dx::trackAppStoreSubscription(subscription); +``` + +{% /tab %} +{% tab title="Play Store" sync="playstore" %} + +1. Instantiate and populate an `AdjustPlayStoreSubscription2dx` object with the `price`, `currency`, `sku`, `orderId`, `signature`, `purchaseToken`. In the example below, the following properties are set: + - The purchase time is set to _txn\_20230918T123456Z_ + - The callback parameters are set to _"key", "value"_ and _"foo", "bar"_. + - The partner parameters are set to _"key", "value"_ and _"foo", "bar"_. +1. At the end of your function, send the information to Adjust by calling `trackPlayStoreSubscription` with your `AdjustAppStoreSubscription2dx` instance as an argument. + +```cpp +#include "Adjust/Adjust2dx.h" + +std::string appToken = "{% $variables.config.token %}"; +std::string environment = AdjustEnvironmentSandbox2dx; + +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment, false); +Adjust2dx::initSdk(adjustConfig); + +AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx({% $variables.subscription.playStoreSubscription %}); +subscription.setPurchaseTime(purchaseTime); +subscription.addCallbackParameter("{% $variables.subscription.key1 %}"); +subscription.addCallbackParameter("{% $variables.subscription.key2 %}"); +subscription.addPartnerParameter("{% $variables.subscription.key1 %}"); +subscription.addPartnerParameter("{% $variables.subscription.key2 %}"); +Adjust2dx::trackPlayStoreSubscription(subscription); +``` + +{% /tab %} +{% /tabs %} diff --git a/src/variables.json b/src/variables.json index 1c2a7cf2b..e7c2456af 100644 --- a/src/variables.json +++ b/src/variables.json @@ -41,5 +41,18 @@ "adRevenuePlacement": "banner", "callbackParams": ["\"key1\", \"value1\"", "\"key2\", \"value2\""], "partnerParams": ["\"key3\", \"value3\"", "\"key4\", \"value4\""] + }, + "subscription": { + "appStoreSubscription": ["price, ", "currency ,", "transactionId"], + "playStoreSubscription": [ + "price, ", + "currency, ", + "sku, ", + "orderId, ", + "signature, ", + "purchaseToken" + ], + "key1": ["key\", ", "\"value"], + "key2": ["foo\", ", "\"bar"] } } From 87cc17d569316209dc5ff9da2b16585ae0a8d14d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Fri, 27 Sep 2024 16:21:05 +0200 Subject: [PATCH 31/59] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Uglješa Erceg --- .../docs/sdk/migration/cocos2dx/v4-to-v5.mdoc | 62 +++++++++---------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc b/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc index 6d62e72df..f9dcf3156 100644 --- a/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc +++ b/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc @@ -43,6 +43,7 @@ To start using SDK v5, you need to add it as a dependency in your project. To do $(LOCAL_PATH)/../../../Classes/Adjust/AdjustAppStorePurchase2dx.cpp \ $(LOCAL_PATH)/../../../Classes/Adjust/AdjustPlayStorePurchase2dx.cpp \ $(LOCAL_PATH)/../../../Classes/Adjust/AdjustDeeplink2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustPurchaseVerificationResult2dx.cpp \ ``` 1. (**Android only**): add the Adjust Android SDK to your project using Maven. @@ -267,7 +268,7 @@ adjustEvent.setDeduplicationId("deduplication-id"); You can set a custom limit on the number of `deduplicationId` that can be added to the list for identifying duplicate events. By default, the limit is set to **10**. ```cpp -AdjustConfig adjustConfig = new AdjustConfig("appToken", AdjustEnvironment.Sandbox); +AdjustConfig2dx adjustConfig = AdjustConfig2dx("appToken", AdjustEnvironmentSandbox2dx); adjustConfig.setEventDeduplicationIdsMaxSize(20); Adjust2dx::initSdk(adjustConfig); ``` @@ -277,13 +278,13 @@ Adjust2dx::initSdk(adjustConfig); In SDK v4, you can set a new subscription by configuring an `AdjustAppStoreSubscription2dx` object. This object is initialized with four arguments: `price`, `currency`, `transactionId`, and `receipt`. ```cpp -AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx(price, currency, transactionId, receipt) +AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx(price, currency, transactionId, receipt); ``` In SDK v5, you don't need to pass the `receipt` argument as it's no longer needed for purchase verification. ```cpp -AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx(price, currency, transactionId) +AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx(price, currency, transactionId); ``` ### Reattribution using deep links {% #reattribution-using-deep-links %} @@ -358,11 +359,11 @@ adjustConfig.setUrlStrategy(AdjustDataResidencyEU); In SDK v5, you need to pass your chosen domain or domains as an array. You need to also set the following: -- `useSubdomains` (`boolean`): Whether the domain should be treated as an Adjust domain. If `true`, the SDK will prefix the domains with Adjust-specific subdomains. If `false`, the SDK will use the provided domain as-is, without adding any prefixes. -- `isDataResidency` (`boolean`): Whether the domain should be used for data residency. +- `useSubdomains` (`bool`): Whether the domain should be treated as an Adjust domain. If `true`, the SDK will prefix the domains with Adjust-specific subdomains. If `false`, the SDK will use the provided domain as-is, without adding any prefixes. +- `isDataResidency` (`bool`): Whether the domain should be used for data residency. ```cpp -adjustConfig.setUrlStrategy(["eu.adjust.com"], true, true); +adjustConfig.setUrlStrategy({"eu.adjust.com"}, true, true); ``` Check the table below to see how to configure your URL strategy in SDK v5. @@ -381,22 +382,22 @@ Check the table below to see how to configure your URL strategy in SDK v5. ```cpp // India URL strategy -adjustConfig.setUrlStrategy({'adjust.net.in', 'adjust.com'}, true, false); +adjustConfig.setUrlStrategy({"adjust.net.in", "adjust.com"}, true, false); // China URL strategy -adjustConfig.setUrlStrategy({'adjust.world', 'adjust.com'}, true, false); +adjustConfig.setUrlStrategy({"adjust.world", "adjust.com"}, true, false); // China only URL strategy -adjustConfig.setUrlStrategy({'adjust.cn'}, true, false); +adjustConfig.setUrlStrategy({"adjust.cn"}, true, false); // EU URL strategy -adjustConfig.setUrlStrategy({'eu.adjust.com'}, true, true); +adjustConfig.setUrlStrategy({"eu.adjust.com"}, true, true); // Turkey URL strategy -adjustConfig.setUrlStrategy({'tr.adjust.com'}, true, true); +adjustConfig.setUrlStrategy({"tr.adjust.com"}, true, true); // US URL strategy -adjustConfig.setUrlStrategy({'us.adjust.com'}, true, true); +adjustConfig.setUrlStrategy({"us.adjust.com"}, true, true); ``` ### Record ad revenue {% #record-ad-revenue %} @@ -415,16 +416,15 @@ AdjustAdRevenue2dx adRevenue = AdjustAdRevenue2dx("applovin_max_sdk") | v4 | v5 | | --------------------------------------- | --------------------------------------- | -| `AdjustAdRevenueAppLovinMAX` | `'applovin_max_sdk'` | -| `AdjustAdRevenueSourceAdMob` | `'admob_sdk'` | -| `AdjustAdRevenueSourceIronSource` | `'ironsource_sdk'` | -| `AdjustAdRevenueSourceAdMost` | `'admost_sdk'` | -| `AdjustAdRevenueSourceUnity` | `'unity_sdk'` | -| `AdjustAdRevenueSourceHeliumChartboost` | `'helium_chartboost_sdk'` | -| `adjustConfig.AdRevenueSourceADX` | `'adx_sdk'` | -| `AdjustAdRevenueSourcePublisher` | `'publisher_sdk'` | -| `AdjustAdRevenueSourceTradplus` | `'tradplus_sdk'` | -| `AdjustAdRevenueSourceTopOn` | `'topon_sdk'` | +| `AdjustAdRevenueSourceAppLovinMAX` | `"applovin_max_sdk"` | +| `AdjustAdRevenueSourceAdMob` | `"admob_sdk"` | +| `AdjustAdRevenueSourceIronSource` | `"ironsource_sdk"` | +| `AdjustAdRevenueSourceAdMostSource` | `"admost_sdk"` | +| `AdjustAdRevenueSourceUnity` | `"unity_sdk"` | +| `AdjustAdRevenueSourceHeliumChartboost` | `"helium_chartboost_sdk"` | +| `AdjustAdRevenueSourceAdx` | `"adx_sdk"` | +| `AdjustAdRevenueSourcePublisher` | `"publisher_sdk"` | +| `AdjustAdRevenueSourceTopOn` | `"topon_sdk"` | | `AdjustAdRevenueSourceMopub` | No longer supported | ### Disable SKAdNetwork communication {% #disable-skan %} @@ -501,9 +501,9 @@ Adjust2dx::updatePostbackConversionValue(6, "low", false, [](std::string error) To update conversion values in SDK v5, use the `updateSkanConversionValue` method with the following arguments: -- `conversionValue` (`Number`): The updated conversion value -- `coarseValue` (`string`): The updated [coarse conversion value](https://developer.apple.com/documentation/storekit/skadnetwork/coarseconversionvalue) -- `lockWindow` (`boolean`): Whether to send the postback before the conversion window ends +- `conversionValue` (`int`): The updated conversion value +- `coarseValue` (`std::string`): The updated [coarse conversion value](https://developer.apple.com/documentation/storekit/skadnetwork/coarseconversionvalue) +- `lockWindow` (`bool`): Whether to send the postback before the conversion window ends ```cpp Adjust2dx::updateSkanConversionValue(6, "low", true, [](std::string error) { @@ -618,7 +618,7 @@ This setting has been removed in SDK v5. ### Custom user agent string {% #custom-user-agent %} -SDK v4 supports setting a custom User Agent by calling `adjustConfig.setUserAgent()` with a user agent string. +SDK v4 supports setting a custom User Agent by calling `adjustConfig.setUserAgent` with a user agent string. ```cpp adjustConfig.setUserAgent("custom-user-agent"); @@ -628,7 +628,7 @@ This setting has been removed in SDK v5. ### Set whether a device is known {% #set-device-known %} -In SDK v4, you can call the `adjustConfig.setDeviceKnown()` method to manually inform the SDK whether a device is known. +In SDK v4, you can call the `adjustConfig.setDeviceKnown` method to manually inform the SDK whether a device is known. ```cpp adjustConfig.setDeviceKnown(true); @@ -638,7 +638,7 @@ This setting has been removed in SDK v5. ### Delay SDK start {% #delay-sdk-start %} -SDK v4 supports delaying the start of the SDK by calling `adjustConfig.setDelayStart()` with up to **10 seconds** of delay. +SDK v4 supports delaying the start of the SDK by calling `adjustConfig.setDelayStart` with up to **10 seconds** of delay. ```cpp adjustConfig.setDelayStart(10); @@ -648,13 +648,13 @@ This method has been removed in SDK v5. The `Adjust2dx::sendFirstPackages()` met ### Disable third party sharing globally {% #disable-sharing-globally %} -In SDK v4, you can call the `Adjust2dx::disableThirdPartySharing()` method to globally disable sharing information with third parties globally. +In SDK v4, you can call the `Adjust2dx::disableThirdPartySharing` method to globally disable sharing information with third parties globally. ```cpp -Adjust2dx::disableThirdPartySharing() +Adjust2dx::disableThirdPartySharing(); ``` -This feature has been removed from SDK v5. In SDK v5, use the `Adjust2dx::trackThirdPartySharing()` method to enable or disable third party sharing. +This feature has been removed from SDK v5. In SDK v5, use the `Adjust2dx::trackThirdPartySharing` method to enable or disable third party sharing. ```cpp AdjustThirdPartySharing2dx thirdPartySharing = AdjustThirdPartySharing2dx(false); From 9133501a73df0186b237f67d9d5c27f221563987 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Fri, 27 Sep 2024 16:29:08 +0200 Subject: [PATCH 32/59] Add suggestions from feedback --- .../docs/sdk/migration/cocos2dx/v4-to-v5.mdoc | 67 ++++++++++++++----- 1 file changed, 50 insertions(+), 17 deletions(-) diff --git a/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc b/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc index f9dcf3156..954f6cff6 100644 --- a/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc +++ b/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc @@ -9,8 +9,6 @@ sidebar-position: 1 Here's what you need to do before updating to SDK v5: -1. SDK v5 supports [SDK signature verification](https://help.adjust.com/en/article/sdk-signature) natively. If you currently use the SDK signature library, you need to remove the signature library from your app first. - 1. The minimum supported API versions for SDK v5 have been updated. If your app targets a lower version, you need to update it first. - iOS: **12.0** @@ -46,13 +44,52 @@ To start using SDK v5, you need to add it as a dependency in your project. To do $(LOCAL_PATH)/../../../Classes/Adjust/AdjustPurchaseVerificationResult2dx.cpp \ ``` -1. (**Android only**): add the Adjust Android SDK to your project using Maven. - - ```groovy - dependencies { - implementation 'com.adjust.sdk:adjust-android:5.0.0' - } - ``` + If you're using CMake, add the following list of sources and headers to your `CMakeLists.txt` file: + + ```cmake + # add cross-platforms source files and header files + list(APPEND GAME_SOURCE + Classes/Adjust/AdjustConfig2dx.cpp + Classes/Adjust/AdjustAttribution2dx.cpp + Classes/Adjust/AdjustProxy2dx.cpp + Classes/Adjust/AdjustEvent2dx.cpp + Classes/Adjust/AdjustAdRevenue2dx.cpp + Classes/Adjust/AdjustAppStoreSubscription2dx.cpp + Classes/Adjust/AdjustPlayStoreSubscription2dx.cpp + Classes/Adjust/AdjustAppStorePurchase2dx.cpp + Classes/Adjust/AdjustPlayStorePurchase2dx.cpp + Classes/Adjust/Adjust2dx.cpp + Classes/Adjust/AdjustEventFailure2dx.cpp + Classes/Adjust/AdjustEventSuccess2dx.cpp + Classes/Adjust/AdjustSessionFailure2dx.cpp + Classes/Adjust/AdjustSessionSuccess2dx.cpp + Classes/Adjust/AdjustThirdPartySharing2dx.cpp + Classes/Adjust/AdjustDeeplink2dx.cpp + Classes/Adjust/AdjustPurchaseVerificationResult2dx.cpp + ) + list(APPEND GAME_HEADER + Classes/Adjust/AdjustConfig2dx.h + Classes/Adjust/AdjustAttribution2dx.h + Classes/Adjust/AdjustProxy2dx.h + Classes/Adjust/AdjustEvent2dx.h + Classes/Adjust/AdjustAdRevenue2dx.h + Classes/Adjust/AdjustAppStoreSubscription2dx.h + Classes/Adjust/AdjustPlayStoreSubscription2dx.h + Classes/Adjust/AdjustAppStorePurchase2dx.h + Classes/Adjust/AdjustPlayStorePurchase2dx.h + Classes/Adjust/Adjust2dx.h + Classes/Adjust/AdjustEventFailure2dx.h + Classes/Adjust/AdjustEventSuccess2dx.h + Classes/Adjust/AdjustSessionFailure2dx.h + Classes/Adjust/AdjustSessionSuccess2dx.h + Classes/Adjust/AdjustThirdPartySharing2dx.h + Classes/Adjust/AdjustDeeplink2dx.h + Classes/Adjust/AdjustPurchaseVerificationResult2dx.h + ) + ``` + +1. (**Android only**): download the latest `adjust-android.aar` from [the GitHub releases page](https://github.com/adjust/cocos2dx_sdk/releases/latest) and import it into your Android Studio project. +1. (**iOS only**): download the latest `AdjustSdk.xcframework` from [the GitHub releases page](https://github.com/adjust/cocos2dx_sdk/releases/latest) and link it in your Xcode project. ## Update the initialization method {% #update-the-init-method %} @@ -516,7 +553,7 @@ Adjust2dx::updateSkanConversionValue(6, "low", true, [](std::string error) { In SDK v4, you can handle changes to a user's ATT authorization status using the `Adjust2dx::requestTrackingAuthorizationWithCompletionHandler` method. ```cpp -static void authorizationStatusCallback(int status) { +Adjust2dx::requestTrackingAuthorizationWithCompletionHandler([] (int status) { switch (status) { case 0: // ATTrackingManagerAuthorizationStatusNotDetermined case @@ -531,15 +568,13 @@ static void authorizationStatusCallback(int status) { // ATTrackingManagerAuthorizationStatusAuthorized case break; } -} - -Adjust2dx::requestTrackingAuthorizationWithCompletionHandler(authorizationStatusCallback); +}); ``` This has been renamed to `Adjust2dx::requestAppTrackingAuthorization` in SDK v5 for clarity. ```cpp -static void authorizationStatusCallback(int status) { +Adjust2dx::requestAppTrackingAuthorization([] (int status) { switch (status) { case 0: // ATTrackingManagerAuthorizationStatusNotDetermined case @@ -554,9 +589,7 @@ static void authorizationStatusCallback(int status) { // ATTrackingManagerAuthorizationStatusAuthorized case break; } -} - -Adjust2dx::requestAppTrackingAuthorization(authorizationStatusCallback); +}); ``` ### Get device information {% #device-info %} From efc5b6ab43557f390bf397d22fabadb91a03b27c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Fri, 27 Sep 2024 17:31:43 +0200 Subject: [PATCH 33/59] Apply suggestions from PR --- .../docs/sdk/cocos2dx/v5/configuration.mdoc | 34 ++--- .../sdk/cocos2dx/v5/features/ad-revenue.mdoc | 25 ++-- .../docs/sdk/cocos2dx/v5/features/att.mdoc | 17 +-- .../sdk/cocos2dx/v5/features/attribution.mdoc | 35 +++--- .../sdk/cocos2dx/v5/features/callbacks.mdoc | 116 +++++++----------- .../sdk/cocos2dx/v5/features/deep-links.mdoc | 30 ++--- .../sdk/cocos2dx/v5/features/device-info.mdoc | 16 +-- .../docs/sdk/cocos2dx/v5/features/events.mdoc | 46 ++++--- .../v5/features/global-parameters.mdoc | 4 +- .../sdk/cocos2dx/v5/features/short-links.mdoc | 13 +- .../docs/sdk/cocos2dx/v5/features/skan.mdoc | 10 +- .../cocos2dx/v5/features/subscriptions.mdoc | 28 ++--- src/content/docs/sdk/cocos2dx/v5/index.mdoc | 71 ++++++++--- src/variables.json | 6 +- 14 files changed, 231 insertions(+), 220 deletions(-) diff --git a/src/content/docs/sdk/cocos2dx/v5/configuration.mdoc b/src/content/docs/sdk/cocos2dx/v5/configuration.mdoc index f055c4af1..52a162074 100644 --- a/src/content/docs/sdk/cocos2dx/v5/configuration.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/configuration.mdoc @@ -22,9 +22,9 @@ To configure the Adjust SDK, you need to instantiate an `AdjustConfig2dx` object To instantiate your config object, create a new `AdjustConfig2dx` instance and pass the following parameters: -- `appToken` (`String`): Your [Adjust app token](https://help.adjust.com/en/article/app-token-and-reporting-currency#view-your-app-details). -- `environment` (`String`): The environment you want to run the SDK in. Pass `AdjustEnvironmentSandbox2dx` to run the SDK in sandbox mode for testing. Pass `AdjustEnvironmentProduction2dx` to run the SDK in production mode for release. -- `allowSuppressLogLevel` (`Boolean`): Whether to suppress all logging. Set to `true` to suppress logging or `false` to enable logging. +- `appToken` (`std::string`): Your [Adjust app token](https://help.adjust.com/en/article/app-token-and-reporting-currency#view-your-app-details). +- `environment` (`std::string`): The environment you want to run the SDK in. Pass `AdjustEnvironmentSandbox2dx` to run the SDK in sandbox mode for testing. Pass `AdjustEnvironmentProduction2dx` to run the SDK in production mode for release. +- `allowSuppressLogLevel` (`bool`): Whether to suppress all logging. Set to `true` to suppress logging or `false` to enable logging. ```cpp #include "Adjust/Adjust2dx.h" @@ -38,7 +38,7 @@ Adjust2dx::initSdk(adjustConfig); ## Read-only configuration {% #read-only-configuration %} -**Read-only** configuration options are set in your `AdjustConfig2dx` instance **before** the initialization of the SDK. They can't be changed while the SDK is running. You MUST configure any options you want to use before running `Adjust2dx::initSdk()`. +**Read-only** configuration options are set in your `AdjustConfig2dx` instance **before** the initialization of the SDK. They can't be changed while the SDK is running. You MUST configure any options you want to use before running `Adjust2dx::initSdk`. ### Set your logging level {% #set-your-logging-levelt %} @@ -62,8 +62,8 @@ You can set your log level by calling the `setLogLevel` method on your `AdjustCo std::string appToken = "{% $variables.config.token %}"; std::string environment = AdjustEnvironmentSandbox2dx; -AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment, false); -adjustConfig.setLogLevel(AdjustLogLevel2dxSuppress); +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); +adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose); Adjust2dx::initSdk(adjustConfig); ``` @@ -77,7 +77,7 @@ An external device identifier is a custom value that you can assign to a device You can use an external device ID as a custom identifier for a device. This helps you keep continuity with your other systems. You can set property calling the `setExternalDeviceId` method with the following parameter: -- `externalDeviceId` (`String`): Your external device identifier. This value is **case sensitive**. If you have imported external device IDs, make sure the value you pass matches the imported value. +- `externalDeviceId` (`std::string`): Your external device identifier. This value is **case sensitive**. If you have imported external device IDs, make sure the value you pass matches the imported value. ```cpp AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); @@ -93,7 +93,7 @@ You can import existing external device IDs into Adjust. This ensures that the A You can configure a default link token if your app is preinstalled on a device. When a user opens the preinstalled app for the first time, the install is attributed to the default link token. To set your default link token, call the `setDefaultTracker` method of your `AdjustConfig2dx` instance with the following argument: -- `defaultTracker` (`String`): The [Adjust link token](https://help.adjust.com/en/article/links#adjust-link-token) you want to record preinstalled installs against. +- `defaultTracker` (`std::string`): The [Adjust link token](https://help.adjust.com/en/article/links#adjust-link-token) you want to record preinstalled installs against. ```cpp AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); @@ -115,11 +115,11 @@ Adjust2dx::initSdk(config); ### Enable background recording {% #enable-background-recording %} -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. To enable background recording, call the `setSendInBackground` method of your `AdjustConfig2dx` instance. +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. To enable background recording, call the `enableSendingInBackground` method of your `AdjustConfig2dx` instance. ```cpp AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); -adjustConfig.setSendInBackground(); +adjustConfig.enableSendingInBackground(); Adjust2dx::initSdk(adjustConfig); ``` @@ -135,7 +135,7 @@ The offline mode setting isn't remembered between sessions. Offline mode is disa 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. -You can toggle offline mode at any time by calling the `Adjust2dx::switchToOfflineMode()` method. +You can toggle offline mode at any time by calling the `Adjust2dx::switchToOfflineMode` method. ```cpp Adjust2dx::switchToOfflineMode(); @@ -143,7 +143,7 @@ Adjust2dx::switchToOfflineMode(); ### Deactivate offline mode {% #deactivate-offline-mode %} -You can re-enable the SDK by calling the `Adjust2dx::switchBackToOnlineMode()` method. This prompts the SDK to resume sending information. +You can re-enable the SDK by calling the `Adjust2dx::switchBackToOnlineMode` method. This prompts the SDK to resume sending information. ```cpp Adjust2dx::switchBackToOnlineMode(); @@ -153,9 +153,9 @@ Adjust2dx::switchBackToOnlineMode(); Push tokens are used for [Audiences](https://help.adjust.com/en/article/audiences) and client callbacks. They're also required for [Uninstall and reinstall measurement](https://help.adjust.com/en/article/uninstalls-reinstalls). -You can update your push token at any time by calling the `Adjust2dx::setPushToken()` method with the following argument: +You can update your push token at any time by calling the `Adjust2dx::setPushToken` method with the following argument: -- `pushtoken` (`String`): Your push token. +- `pushtoken` (`std::string`): Your push token. ```cpp Adjust2dx::setPushToken("push-token"); @@ -163,7 +163,7 @@ Adjust2dx::setPushToken("push-token"); ### Disable the SDK {% #disable-the-sdk %} -The Adjust SDK runs by default when your app is open. You can disable the Adjust SDK to stop sending information to Adjust by calling the `Adjust2dx::disable()` method. When you disable the Adjust SDK, no data is sent to Adjust and no information is recorded by the SDK. This means that any Adjust method called when the SDK is disabled won't record anything. +The Adjust SDK runs by default when your app is open. You can disable the Adjust SDK to stop sending information to Adjust by calling the `Adjust2dx::disable` method. When you disable the Adjust SDK, no data is sent to Adjust and no information is recorded by the SDK. This means that any Adjust method called when the SDK is disabled won't record anything. ```cpp Adjust2dx::disable(); @@ -171,7 +171,7 @@ Adjust2dx::disable(); ### Enable the SDK {% #enable-the-sdk %} -If you've disable the SDK and want to re-enable it, call the `Adjust2dx::enable()` method. When the SDK is enabled, it will send information to Adjust's servers. +If you've disable the SDK and want to re-enable it, call the `Adjust2dx::enable` method. When the SDK is enabled, it will send information to Adjust's servers. ```cpp Adjust2dx::enable(); @@ -179,7 +179,7 @@ Adjust2dx::enable(); #### Check enabled status {% #check-enabled-status %} -You can check if the Adjust SDK is enabled at any time by calling the `Adjust2dx::isEnabled()` method and passing a callback function. The status is returned asynchronously and passed to your callback function as a `bool` value. +You can check if the Adjust SDK is enabled at any time by calling the `Adjust2dx::isEnabled` method and passing a callback function. The status is returned asynchronously and passed to your callback function as a `bool` value. ```cpp Adjust2dx::isEnabled([](bool isEnabled) { diff --git a/src/content/docs/sdk/cocos2dx/v5/features/ad-revenue.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/ad-revenue.mdoc index 7eef72a07..46b01e7fc 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/ad-revenue.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/ad-revenue.mdoc @@ -24,7 +24,7 @@ To send ad revenue information with the Adjust SDK, you need to instantiate an ` To instantiate an ad revenue object, instantiate an `AdjustAdRevenue2dx` objec with the following parameter: -- `source` (`String`): The source of the ad revenue. See the table below for all available sources. +- `source` (`std::string`): The source of the ad revenue. See the table below for all available sources. | Parameter | Source | | ------------------------- | ------------------------- | @@ -42,11 +42,12 @@ To instantiate an ad revenue object, instantiate an `AdjustAdRevenue2dx` objec w Once you've instantiated your ad revenue object, set the ad revenue amount by calling the `setRevenue` method with the following arguments: - `amount` (`double`): The amount of ad revenue to be recorded. -- `currency` (`string`): The currency of the ad revenue. You MUST format this as a 3 character [ISO 4217 code](https://www.iban.com/currency-codes) +- `currency` (`std::string`): The currency of the ad revenue. You MUST format this as a 3 character [ISO 4217 code](https://www.iban.com/currency-codes) ```cpp AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("applovin_max_sdk"); adjustAdRevenue.setRevenue(1.00, "EUR"); +Adjust2dx::trackAdRevenue(adjustAdRevenue); ``` ## Set additional properties {% #set-additional-properties %} @@ -66,39 +67,43 @@ To send the number of recorded ad impressions, call the `setAdImpressionsCount` ```cpp AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("{% $variables.adRevenue.source %}"); adjustAdRevenue.setAdImpressionsCount({% $variables.adRevenue.adImpressionsCount %}); +Adjust2dx::trackAdRevenue(adjustAdRevenue); ``` #### Ad revenue network To send the network associated with ad revenue, call the `setAdRevenueNetwork` method of your `AdjustAdRevenue2dx` instance with the following argument: -- `adRevenueNetwork` (`string`): The name of the network associated with the ad revenue. +- `adRevenueNetwork` (`std::string`): The name of the network associated with the ad revenue. ```cpp AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("{% $variables.adRevenue.source %}"); adjustAdRevenue.adRevenueNetwork("{% $variables.adRevenue.adRevenueNetwork %}"); +Adjust2dx::trackAdRevenue(adjustAdRevenue); ``` #### Ad revenue unit To send the advertising unit that earned the revenue, call the `setAdRevenueUnit` method of your `AdjustAdRevenue2dx instance with the following argument: -- `adRevenueUnit` (`string`): The name of the ad unit associated with the ad revenue. +- `adRevenueUnit` (`std::string`): The name of the ad unit associated with the ad revenue. ```cpp AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("{% $variables.adRevenue.source %}"); adjustAdRevenue.adRevenueUnit("{% $variables.adRevenue.adRevenueUnit %}"); +Adjust2dx::trackAdRevenue(adjustAdRevenue); ``` #### Ad revenue placement To send the placement of the ad unit, call the `setAdRevenuePlacement` method with the following argument: -- `adRevenuePlacement` (`string`): The placement of the ad unit. +- `adRevenuePlacement` (`std::string`): The placement of the ad unit. ```cpp AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("{% $variables.adRevenue.source %}"); adjustAdRevenue.setAdRevenuePlacement("{% $variables.adRevenue.adRevenuePlacement %}"); +Adjust2dx::trackAdRevenue(adjustAdRevenue); ``` ### Callback parameters {% #callback-parameters %} @@ -107,7 +112,7 @@ If you [register a callback URL](https://help.adjust.com/en/article/recommended- 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 with `string` key-value arguments. You can add multiple parameters by calling this method multiple times. +Add callback parameters to your event by calling the `addCallbackParameter` method with `std::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: @@ -133,6 +138,7 @@ You can read more about using URL callbacks, including a full list of available AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("{% $variables.adRevenue.source %}"); adjustAdRevenue.addCallbackParameter({% $variables.adRevenue.callbackParams[0] %}); adjustAdRevenue.addCallbackParameter({% $variables.adRevenue.callbackParams[1] %}); +Adjust2dx::trackAdRevenue(adjustAdRevenue); ``` ### Partner parameters {% #partner-parameters %} @@ -145,17 +151,18 @@ Adjust sends partner parameters to [external partners](https://help.adjust.com/e Partner parameters don't appear in raw data by default. You can add the `{partner_parameters}` placeholder to receive them as a single string. {% /callout %} -Add partner parameters to your event by calling the `addPartnerParameter` method with `string` key-value arguments. You can add multiple parameters by calling this method multiple times. +Add partner parameters to your event by calling the `addPartnerParameter` method with `std::string` key-value arguments. You can add multiple parameters by calling this method multiple times. ```cpp AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx({% $variables.adRevenue.source %}); adjustAdRevenue.addPartnerParameter({% $variables.adRevenue.partnerParams[0] %}); adjustAdRevenue.addPartnerParameter({% $variables.adRevenue.partnerParams[1] %}); +Adjust2dx::trackAdRevenue(adjustAdRevenue); ``` ## Send ad revenue {% #send-ad-revenue %} -Once you've populated your `AdjustAdRevenue2dx` instance, pass it as an argument to the `Adjust2dx::trackAdRevenue()` to send the ad revenue information to Adjust. +Once you've populated your `AdjustAdRevenue2dx` instance, pass it as an argument to the `Adjust2dx::trackAdRevenue` to send the ad revenue information to Adjust. ```cpp AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("{% $variables.adRevenue.source %}"); @@ -168,5 +175,5 @@ adjustAdRevenue.addCallbackParameter({% $variables.adRevenue.callbackParams[0] % adjustAdRevenue.addCallbackParameter({% $variables.adRevenue.callbackParams[1] %}); adjustAdRevenue.addPartnerParameter({% $variables.adRevenue.partnerParams[0] %}); adjustAdRevenue.addPartnerParameter({% $variables.adRevenue.partnerParams[1] %}) -Adjust2dx::trackAdRevenueNew(adjustAdRevenue); +Adjust2dx::trackAdRevenue(adjustAdRevenue); ``` diff --git a/src/content/docs/sdk/cocos2dx/v5/features/att.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/att.mdoc index 9243ac700..eb5b91cf0 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/att.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/att.mdoc @@ -38,7 +38,7 @@ The Adjust SDK also records the consent status if you use a custom prompt. If yo {% /callout %} ```cpp -static void authorizationStatusCallback(int status) { +Adjust2dx::requestAppTrackingAuthorization([] (int status) { switch (status) { case 0: // ATTrackingManagerAuthorizationStatusNotDetermined case @@ -53,8 +53,7 @@ static void authorizationStatusCallback(int status) { // ATTrackingManagerAuthorizationStatusAuthorized case break; } -} -Adjust2dx::requestAppTrackingAuthorization(authorizationStatusCallback); +}); ``` ## Customize prompt timing {% #customize-prompt-timing %} @@ -64,9 +63,9 @@ If your app includes an onboarding process or a tutorial, you may want to delay If the user closes the app before the timeout ends, or before they select their consent status, the timeout restarts when they reopen the app. ```cpp -AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment, false); +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); adjustConfig.setAttConsentWaitingInterval({% $variables.config.attWaitingInterval %}); -Adjust2dx::InitSdk(adjustConfig); +Adjust2dx::initSdk(adjustConfig); ``` ## Get current authorization status {% #get-current-authorization-status %} @@ -76,11 +75,3 @@ You can retrieve a user's current authorization status at any time. Call the `Ad ```cpp Adjust2dx::getAppTrackingAuthorizationStatus(); ``` - -## Check for authorization status changes {% #check-for-auth-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 `Adjust2dx::checkForNewAttStatus()` method to send the authorization status to Adjust's servers. - -```cpp -Adjust2dx::checkForNewAttStatus(); -``` diff --git a/src/content/docs/sdk/cocos2dx/v5/features/attribution.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/attribution.mdoc index 30bf0f5ca..35aca0474 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/attribution.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/attribution.mdoc @@ -16,7 +16,7 @@ When a user interacts with an Adjust link, their attribution information updates ## AdjustAttribution2dx class properties {% #class-properties %} -The `AdjustAttribution2dx` class contains details about the current attribution status of the device. Any values that aren't populated for the user are returned as a `null` value. +The `AdjustAttribution2dx` class contains details about the current attribution status of the device. Any values that aren't populated for the user are returned as a `std::string` value. {% callout type="note" %} The following values can only be accessed if you have [called the `enableCostDataInAttribution` method on your `AdjustConfig2dx` instance](/en/sdk/cocos2dx/configuration#receive-ad-spend-data): @@ -28,18 +28,17 @@ The following values can only be accessed if you have [called the `enableCostDat | 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/). | +| `trackerToken` | `std::string` | The token of the tracker to which the device is currently attributed | +| `trackerName` | `std::string` | The name of the tracker to which the device is currently attributed | +| `network` | `std::string` | The name of the network to which the device is currently attributed | +| `campaign` | `std::string` | The name of the campaign to which the device is currently attributed | +| `adgroup` | `std::string` | The name of the adgroup to which the device is currently attributed | +| `creative` | `std::string` | The name of the creative to which the device is currently attributed | +| `clickLabel` | `std::string` | The [click label](https://help.adjust.com/en/article/user-rewards) that the install is tagged with | +| `costType` | `std::string` | The campaign pricing model (for example cpi) | +| `costAmount` | `double` | The cost of the install. | +| `costCurrency` | `std::string` | The [3 character ISO 4217 code](https://www.iban.com/currency-codes) of the currency associated with the cost. | +| `fbInstallReferrer` | `std::string` | The [Facebook install referrer](https://developers.facebook.com/docs/app-ads/install-referrer/). | ## Configure an attribution callback function {% #configure-an-attribution-callback-function %} @@ -48,14 +47,18 @@ You can configure the Adjust SDK to call a function whenever a user's attributio ```cpp AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose); -adjustConfig.setAttributionCallback(attributionCallbackMethod); +adjustConfig.setAttributionCallback([](AdjustAttribution2dx attribution) { + // process attribution +}); Adjust2dx::initSdk(adjustConfig); ``` ## Get current attribution information {% #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 as an `AdjustAttribution2dx` object, call the `Adjust2dx::getAttribution()` method. +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 as an `AdjustAttribution2dx` object, call the `Adjust2dx::getAttribution` method. ```cpp -AdjustAttribution2dx attribution = Adjust2dx::getAttribution(); +Adjust2dx::getAttribution([](AdjustAttribution2dx attribution) { + // process attribution +}); ``` diff --git a/src/content/docs/sdk/cocos2dx/v5/features/callbacks.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/callbacks.mdoc index e39d01780..131abb04e 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/callbacks.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/callbacks.mdoc @@ -22,10 +22,10 @@ Session callbacks have access to a response data object. You can use its propert | Property | 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` | `string` | The JSON object with the response from the server. | +| `message` | `std::string` | The message from the server or the error logged by the SDK. | +| `timestamp` | `std::string` | The timestamp from Adjust's servers. | +| `adid` | `std::string` | A unique device identifier provided by Adjust. | +| `jsonResponse` | `std::string` | The JSON object with the response from the server. | | `willRetry` | `bool` | Indicates whether there will be an attempt to resend a failed package. Available only on failure callbacks. | ### Success callbacks {% #session-success-callbacks %} @@ -33,21 +33,15 @@ Session callbacks have access to a response data object. You can use its propert Configure a success callback to call a function when the SDK records a session. ```cpp -#include "Adjust/Adjust2dx.h" - -static void sessionSuccessCallbackMethod(AdjustSessionSuccess2dx sessionSuccess) { - // Add your function -} - -bool AppDelegate::applicationDidFinishLaunching() { - std::string appToken = "{% $variables.config.token %}"; - std::string environment = AdjustEnvironmentSandbox2dx; - - AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); - adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose); - adjustConfig.setSessionSuccessCallback(sessionSuccessCallbackMethod); - Adjust2dx::initSdk(adjustConfig); -} +std::string appToken = "{% $variables.config.token %}"; +std::string environment = AdjustEnvironmentSandbox2dx; + +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); +adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose); +adjustConfig.setSessionSuccessCallback([](AdjustSessionSuccess2dx adjustSessionSuccess) { + // process adjustSessionSuccess +}); +Adjust2dx::initSdk(adjustConfig); ``` ### Failure callbacks {% #session-failure-callbacks %} @@ -55,21 +49,15 @@ bool AppDelegate::applicationDidFinishLaunching() { Configure a failure callback to call a function when the SDK fails to record a session. ```cpp -#include "Adjust/Adjust2dx.h" - -static void sessionFailureCallbackMethod(AdjustSessionFailure2dx sessionFailure) { - // Add your function -} - -bool AppDelegate::applicationDidFinishLaunching() { - std::string appToken = "{% $variables.config.token %}"; - std::string environment = AdjustEnvironmentSandbox2dx; - - AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); - adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose); - adjustConfig.setSessionFailureCallback(sessionFailureCallbackMethod); - Adjust2dx::initSdk(adjustConfig); -} +std::string appToken = "{% $variables.config.token %}"; +std::string environment = AdjustEnvironmentSandbox2dx; + +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); +adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose); +adjustConfig.setSessionFailureCallback([](AdjustSessionFailure2dx adjustSessionFailure) { + // process adjustSessionFailure +}); +Adjust2dx::initSdk(adjustConfig); ``` ## Event callbacks {% #event-callbacks %} @@ -80,12 +68,12 @@ Event callbacks have access to a response data object. You can use its propertie | Property | 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. | -| `eventToken` | `string` | The event token | -| `callbackId` | `string` | The custom callback ID set on the event object | -| `jsonResponse` | `string` | The JSON object with the response from the server. | +| `message` | `std::string` | The message from the server or the error logged by the SDK. | +| `timestamp` | `std::string` | The timestamp from Adjust's servers. | +| `adid` | `std::string` | A unique device identifier provided by Adjust. | +| `eventToken` | `std::string` | The event token | +| `callbackId` | `std::string` | The custom callback ID set on the event object | +| `jsonResponse` | `std::string` | The JSON object with the response from the server. | | `willRetry` | `bool` | Indicates whether there will be an attempt to resend a failed package. Only available on failure callbacks. | ### Success callbacks {% #event-success-callbacks %} @@ -93,21 +81,15 @@ Event callbacks have access to a response data object. You can use its propertie Configure a success callback to call a function when the SDK records an event. ```cpp -#include "Adjust/Adjust2dx.h" - -static void eventSuccessCallbackMethod(AdjustEventSuccess2dx eventSuccess) { - // Add your function -} - -bool AppDelegate::applicationDidFinishLaunching() { - std::string appToken = "{% $variables.config.token %}"; - std::string environment = AdjustEnvironmentSandbox2dx; - - AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); - adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose); - adjustConfig.setEventSuccessCallback(eventSuccessCallbackMethod); - Adjust2dx::initSdk(adjustConfig); -} +std::string appToken = "{% $variables.config.token %}"; +std::string environment = AdjustEnvironmentSandbox2dx; + +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); +adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose); +adjustConfig.setEventSuccessCallback([](AdjustEventSuccess2dx adjustEventSuccess) { + // process adjustEventSuccess +}); +Adjust2dx::initSdk(adjustConfig); ``` ### Failure callbacks {% #event-failure-callbacks %} @@ -115,19 +97,13 @@ bool AppDelegate::applicationDidFinishLaunching() { Configure a failure callback to call a function when the SDK fails to record an event. ```cpp -#include "Adjust/Adjust2dx.h" - -static void eventFailureCallbackMethod(AdjustEventFailure2dx eventFailure) { - // Add your function -} - -bool AppDelegate::applicationDidFinishLaunching() { - std::string appToken = "{% $variables.config.token %}"; - std::string environment = AdjustEnvironmentSandbox2dx; - - AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); - adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose); - adjustConfig.setEventFailureCallback(eventFailureCallbackMethod); - Adjust2dx::initSdk(adjustConfig); -} +std::string appToken = "{% $variables.config.token %}"; +std::string environment = AdjustEnvironmentSandbox2dx; + +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); +adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose); +adjustConfig.setEventFailureCallback([](AdjustEventFailure2dx adjustEventFailure) { + // process adjustEventFailure +}); +Adjust2dx::initSdk(adjustConfig); ``` diff --git a/src/content/docs/sdk/cocos2dx/v5/features/deep-links.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/deep-links.mdoc index 8f335c47b..89d96b3d4 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/deep-links.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/deep-links.mdoc @@ -34,21 +34,15 @@ Follow the instructions for setting up deep linking for your target platform: You can configure the Adjust SDK to call a callback function when it receives a deferred deep link. This callback function receives the deep link as a `string` argument. ```cpp -#include "Adjust/Adjust2dx.h" - -static bool deferredDeeplinkCallbackMethod(std::string deeplink) { - // Add your code -} - -bool AppDelegate::applicationDidFinishLaunching() { - std::string appToken = "{% $variables.config.token %}"; - std::string environment = AdjustEnvironmentSandbox2dx; +std::string appToken = "{% $variables.config.token %}"; +std::string environment = AdjustEnvironmentSandbox2dx; - AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); - adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose); - adjustConfig.setDeferredDeeplinkCallback(deferredDeeplinkCallbackMethod); - Adjust2dx::initSdk(adjustConfig); -} +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); +adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose); +adjustConfig.setDeferredDeeplinkCallback([](std::string adjustDeeplink) { + // process adjustDeeplink +}); +Adjust2dx::initSdk(adjustConfig); ``` ## Reattribution via deep links {% #reattribution-via-deep-links %} @@ -58,8 +52,8 @@ Adjust enables you to run re-engagement campaigns using deep links. For more inf To reattribute your user, you need to instantiatee an `AdjustDeeplink2dx` object with the deep link URL and pass it to the `Adjust2dx::processDeeplink` method. The Adjust SDK then looks for new attribution data within the deep link. If the SDK finds new information, it forwards the information to Adjust’s servers for reattribution. ```cpp -AdjustDeeplink2dx adjustDeeplink = new AdjustDeeplink2dx("url"); -Adjust::processDeeplink(adjustDeeplink); +AdjustDeeplink2dx adjustDeeplink = AdjustDeeplink2dx("url"); +Adjust2dx::processDeeplink(adjustDeeplink); ``` ## Enable LinkMe {% #enable-linkme %} @@ -84,9 +78,9 @@ adjustConfig.enableLinkMe(); Adjust2dx::initSdk(adjustConfig) ``` -## Get the last resolved link {% #get-the-last-resolved-link %} +## Get the last processed link {% #get-the-last-processed-link %} -You can return the last deep link URL resolved by the `Adjust2sx::processDeeplink()` or `Adjust2dx::processAndResolveDeepLink()` method by calling the `Adjust2dx::getLastDeeplink()` method. This method returns the last resolved deep link as a deep link object. +You can return the last deep link URL resolved by the `Adjust2sx::processDeeplink` or `Adjust2dx::processAndResolveDeepLink` method by calling the `Adjust2dx::getLastDeeplink` method. This method returns the last processed deep link as a deep link object. ```cpp Adjust2dx::getLastDeeplink([](std::string lastDeeplink) { diff --git a/src/content/docs/sdk/cocos2dx/v5/features/device-info.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/device-info.mdoc index f23c073e3..4b2539c0c 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/device-info.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/device-info.mdoc @@ -16,7 +16,7 @@ The Adjust SDK contains helper methods that return device information. Use these ## Adjust device identifier {% #adid %} -Adjust generates a unique Adjust Device ID (ADID) for each device. Call the `getAdid` method to asynchronously return the ADID as a `string` to a delegate function. +Adjust generates a unique Adjust Device ID (ADID) for each device. Call the `getAdid` method to asynchronously return the ADID as a `std::string` to a delegate function. ```cpp Adjust2dx::getAdid([](std::string adId) { @@ -26,7 +26,7 @@ Adjust2dx::getAdid([](std::string adId) { ## ID For Advertisers {% #idfa %} -The ID for Advertisers (IDFA) is a device-specific identifier for Apple devices. Call the `getIdfa` method to asynchronously return the IDFA as a `string` to a delegate function. +The ID for Advertisers (IDFA) is a device-specific identifier for Apple devices. Call the `getIdfa` method to asynchronously return the IDFA as a `std::string` to a delegate function. ```cpp Adjust2dx::getIdfa([](std::string idfa) { @@ -36,7 +36,7 @@ Adjust2dx::getIdfa([](std::string idfa) { ## ID For Vendor {% #idfv %} -The ID for Vendor (IDFV) is a device-specific identifier for Apple devices. Call the `getIdfv` method to asynchronously return the IDFV as a `string` to a delegate function. +The ID for Vendor (IDFV) is a device-specific identifier for Apple devices. Call the `getIdfv` method to asynchronously return the IDFV as a `std::string` to a delegate function. ```cpp Adjust2dx::getIdfv([](std::string idfv) { @@ -53,18 +53,18 @@ Users can opt out of sharing their GPS ADID by toggling the "Opt out of Ads Pers You can access this value by calling the `getGoogleAdId` method in a background thread. Assign a delegate function to access the GPS ADID value. ```cpp -Adjust2dx::getGoogleAdId([](std::string adId) { - std::cout << "\nGoogle Ad ID = " << adId; +Adjust2dx::getGoogleAdId([](std::string googleAdId) { + std::cout << "\nGoogle Ad ID = " << googleAdId; }); ``` ## Amazon Advertiser ID {% #amazon-adid %} -The Amazon Advertising ID (Amazon Ad ID) is a device-specific identifier for Android devices. Call the `getAmazonAdId` method to asynchronously return the Amazon Ad ID as a `string` to a delegate function. +The Amazon Advertising ID (Amazon Ad ID) is a device-specific identifier for Android devices. Call the `getAmazonAdId` method to asynchronously return the Amazon Ad ID as a `std::string` to a delegate function. ```cpp -Adjust2dx::getAmazonAdId([](std::string adId) { - std::cout << "\nAmazon Ad ID = " << adId; +Adjust2dx::getAmazonAdId([](std::string amazonAdId) { + std::cout << "\nAmazon Ad ID = " << amazonAdId; }); ``` diff --git a/src/content/docs/sdk/cocos2dx/v5/features/events.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/events.mdoc index 6aa76e23e..c2f27d35c 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/events.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/events.mdoc @@ -32,10 +32,11 @@ Instantiate an `AdjustEvent2dx` object by passing your event token as an argumen | Argument | Type | Description | | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | -| `eventToken` | `string` | Your Adjust event token. See [Add events](https://help.adjust.com/en/article/add-events#manage-your-events) for more information. | +| `eventToken` | `std::string` | Your Adjust event token. See [Add events](https://help.adjust.com/en/article/add-events#manage-your-events) for more information. | ```cpp -AdjustEvent2dx adjustEvent = new AdjustEvent2dx("{% $variables.event.token %}"); +AdjustEvent2dx adjustEvent = AdjustEvent2dx("{% $variables.event.token %}"); +Adjust2dx::trackEvent(adjustEvent); ``` ### Set event revenue {% #set-event-revenue %} @@ -45,26 +46,28 @@ Set the revenue amount and currency code of any revenue associated with the even | Argument | Type | Description | | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | | `revenue` | `double` | The amount of revenue generated by the event. | -| `currency` | `string` | The [ISO 4217 code](https://www.iban.com/currency-codes) of the event currency. | +| `currency` | `std::string` | The [ISO 4217 code](https://www.iban.com/currency-codes) of the event currency. | ```cpp -AdjustEvent2dx adjustEvent = new AdjustEvent2dx("{% $variables.event.token %}"); +AdjustEvent2dx adjustEvent = AdjustEvent2dx("{% $variables.event.token %}"); adjustEvent.setRevenue({% $variables.event.revenue.amount %}, "{% $variables.event.revenue.currency %}"); +Adjust2dx::trackEvent(adjustEvent); ``` ### Add callback parameters {% #add-callback-parameters %} -Add callback parameters by passing `string` key-value pairs to the `addCallbackParameter()` method. When Adjust receives your `AdjustEvent2dx` instance, all callback parameters are sent to your callback URL. +Add callback parameters by passing `std::string` key-value pairs to the `addCallbackParameter` method. When Adjust receives your `AdjustEvent2dx` instance, all callback parameters are sent to your callback URL. | Argument | Type | Description | | -------------------------------- | -------------------------------- | -------------------------------- | -| `key` | `string` | The name (key) of the parameter. | -| `value` | `string` | The value of the parameter. | +| `key` | `std::string` | The name (key) of the parameter. | +| `value` | `std::string` | The value of the parameter. | ```cpp -AdjustEvent2dx adjustEvent = new AdjustEvent2dx("{% $variables.event.token %}"); +AdjustEvent2dx adjustEvent = AdjustEvent2dx("{% $variables.event.token %}"); adjustEvent.addCallbackParameter({% $variables.event.callbackParams[0] %}); adjustEvent.addCallbackParameter({% $variables.event.callbackParams[1] %}); +Adjust2dx::trackEvent(adjustEvent); ``` ### Add partner parameters {% #add-partner-parameters %} @@ -73,13 +76,14 @@ Add callback parameters by passing `string` key-value pairs to the `addPartnerPa | Argument | Type | Description | | -------------------------------- | -------------------------------- | -------------------------------- | -| `key` | `string` | The name (key) of the parameter. | -| `value` | `string` | The value of the parameter. | +| `key` | `std::string` | The name (key) of the parameter. | +| `value` | `std::string` | The value of the parameter. | ```cpp -AdjustEvent2dx adjustEvent = new AdjustEvent2dx("{% $variables.event.token %}"); +AdjustEvent2dx adjustEvent = AdjustEvent2dx("{% $variables.event.token %}"); adjustEvent.addPartnerParameter({% $variables.event.partnerParams[0] %}); adjustEvent.addPartnerParameter({% $variables.event.partnerParams[1] %}); +Adjust2dx::trackEvent(adjustEvent) ``` ### Set deduplication ID {% #set-deduplication-id %} @@ -88,36 +92,38 @@ Sets a unique identifier for the `AdjustEvent2dx` instance to deduplicate revenu | Argument | Type | Description | | ------------------------ | ------------------------ | ------------------------ | -| `deduplicationId` | `string` | A unique transaction ID. | +| `deduplicationId` | `std::string` | A unique transaction ID. | ```cpp -AdjustEvent2dx adjustEvent = new AdjustEvent2dx("{% $variables.event.token %}"); +AdjustEvent2dx adjustEvent = AdjustEvent2dx("{% $variables.event.token %}"); adjustEvent.setDeduplicationId("{% $variables.event.deduplicationId %}"); +Adjust2dx::trackEvent(adjustEvent); ``` ### Set a callback ID {% #set-callback-id %} -Sets a unique identifier for Adjust's servers to report on in event callback by calling the `setCallbackId()` method. +Sets a unique identifier for Adjust's servers to report on in event callback by calling the `setCallbackId` method. | Argument | Type | Description | | --------------------- | --------------------- | --------------------- | -| `callbackId` | `string` | A unique callback ID. | +| `callbackId` | `std::string` | A unique callback ID. | ```cpp -AdjustEvent2dx adjustEvent = new AdjustEvent2dx("{% $variables.event.token %}"); +AdjustEvent2dx adjustEvent = AdjustEvent2dx("{% $variables.event.token %}"); adjustEvent.setCallbackId("{% $variables.event.callbackId %}"); +Adjust2dx::trackEvent(adjustEvent); ``` ### Send an event {% #send-an-event %} -Call the `Adjust2dx::trackEvent()` method with your `AdjustEvent2dx` instance as an argument to send your event to Adjust. +Call the `Adjust2dx::trackEvent` method with your `AdjustEvent2dx` instance as an argument to send your event to Adjust. | Argument | Type | Description | | ------------------------------ | ------------------------------ | ------------------------------ | | `adjustEvent` | `AdjustEvent2dx` | Your `AdjustEvent2dx` instance | ```cpp -AdjustEvent2dx adjustEvent = new AdjustEvent2dx("{% $variables.event.token %}"); +AdjustEvent2dx adjustEvent = AdjustEvent2dx("{% $variables.event.token %}"); Adjust2dx::trackEvent(adjustEvent); ``` @@ -145,10 +151,10 @@ To send event information to Adjust, follow these steps: std::string appToken = "{% $variables.config.token %}"; std::string environment = AdjustEnvironmentSandbox2dx; -AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment, false); +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); Adjust2dx::initSdk(adjustConfig); -AdjustEvent2dx adjustEvent = new AdjustEvent2dx("{% $variables.event.token %}"); +AdjustEvent2dx adjustEvent = new AdjustEvent2dx("g3mfiw"); adjustEvent.setRevenue({% $variables.event.revenue.amount %}, "{% $variables.event.revenue.currency %}"); adjustEvent.setDeduplicationId("{% $variables.event.deduplicationId %}"); adjustEvent.addCallbackParameter({% $variables.event.callbackParams[0] %}); diff --git a/src/content/docs/sdk/cocos2dx/v5/features/global-parameters.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/global-parameters.mdoc index 132affbdd..41ebf483c 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/global-parameters.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/global-parameters.mdoc @@ -24,7 +24,7 @@ You can configure global callback parameters to send to your servers. The Adjust ### Add global callback parameters {% #add-global-callback-parameters %} -Add callback parameters globally by calling the `Adjust2dx::addGlobalCallbackParameter` method with `string` key-value arguments. You can add multiple parameters by calling this method multiple times. +Add callback parameters globally by calling the `Adjust2dx::addGlobalCallbackParameter` method with `std::string` key-value arguments. You can add multiple parameters by calling this method multiple times. ```cpp Adjust2dx::addGlobalCallbackParameter("foo", "bar"); @@ -58,7 +58,7 @@ Partner parameters don't appear in raw data exports by default. You can add the ### Add global partner parameters {% #add-global-partner-parameters %} -Send global partner parameters by calling the `Adjust2dx::addGlobalPartnerParameter` method with `string` key-value arguments. You can add multiple parameters by calling this method multiple times. +Send global partner parameters by calling the `Adjust2dx::addGlobalPartnerParameter` method with `std::string` key-value arguments. You can add multiple parameters by calling this method multiple times. ```cpp Adjust2dx::addGlobalPartnerParameter("foo", "bar"); diff --git a/src/content/docs/sdk/cocos2dx/v5/features/short-links.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/short-links.mdoc index 253879813..f1103498a 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/short-links.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/short-links.mdoc @@ -31,15 +31,14 @@ In the Adjust SDK, add support for the following: To resolve a short Adjust link URL that deep linked users into your app, call the `Adjust2dx::processAndResolveDeeplink` method with the following arguments: -- `deeplink` (`string`): The deep link you want to resolve. -- `deeplinkResolvedCallback` (`function`): A function that receives the resolved deep link. Must return `void`. +- `deeplink` (`AdjustDeeplink2dx`): The deep link you want to resolve. +- `resolvedLinkCallback` (`void(std::string)`): A function that receives the resolved deep link. Must return `void`. ```cpp -static void deeplinkResolvedCallback(const std::string& resolvedLink) { - cocos2d::log("Resolved link = %s", resolvedLink.c_str()); -} - -Adjust2dx::processAndResolveDeeplink(deeplink, deeplinkResolvedCallback); +AdjustDeeplink2dx deeplink = AdjustDeeplink2dx("url"); +Adjust2dx::processAndResolveDeeplink(deeplink, [](std::string resolvedLink) { + // process resolvedLink +}); ``` If you pass a shortened link to the `Adjust2dx::processAndResolveDeeplink` method, you receive the original expanded link in your `deeplinkResolvedCallback` function. If you pass a non-shortened link, the `deeplinkResolvedCallback` function receives the link you passed to `Adjust2dx::processAndResolveDeeplink` without modification. diff --git a/src/content/docs/sdk/cocos2dx/v5/features/skan.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/skan.mdoc index 37d9faa51..57ff0ed15 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/skan.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/skan.mdoc @@ -23,7 +23,7 @@ StoreKit Ad Network (SKAN) is Apple's framework for app install and reinstall at The Adjust SDK registers for SKAN attribution upon initialization by default. To disable this behavior, call the `disableSkanAttribution` method on your `AdjustConfig2dx` instance. ```cpp -AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment, false); +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); adjustConfig.disableSkanAttribution(); Adjust2dx::initSdk(adjustConfig); ``` @@ -35,10 +35,10 @@ Conversion values are a mechanism used to track user behavior in SKAN. You can m 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 `updateSkanConversionValue` method. This method wraps [Apple's `updatePostbackConversionValue` method](https://developer.apple.com/documentation/storekit/skadnetwork/4097267-updatepostbackconversionvalue). You MUST pass the following arguments: - `fineValue` (`int`): Your conversion value. Must be between `0` and `63`. -- `coarseValue` (`string` [`SKAdNetwork.CoarseConversionValue`](https://developer.apple.com/documentation/storekit/skadnetwork/coarseconversionvalue)): The coarse conversion value. This value is used if your app doesn't have sufficient installs to reach the privacy threshold. The following values are allowed: - - `low` (`SKAdNetworkCoarseConversionValueLow`) - - `medium` (`SKAdNetworkCoarseConversionValueMedium`) - - `high` (`SKAdNetworkCoarseConversionValueHigh`) +- `coarseValue` (`std::string` [`SKAdNetwork.CoarseConversionValue`](https://developer.apple.com/documentation/storekit/skadnetwork/coarseconversionvalue)): The coarse conversion value. This value is used if your app doesn't have sufficient installs to reach the privacy threshold. The following values are allowed: + - `"low"` (`SKAdNetworkCoarseConversionValueLow`) + - `"medium"` (`SKAdNetworkCoarseConversionValueMedium`) + - `"high"` (`SKAdNetworkCoarseConversionValueHigh`) - `lockWindow` (`bool`): Whether to send the postback before the conversion window ends (`true`). - `errorCallback` (`function`): A function that receives any error message returned by SKAN as a `string`. diff --git a/src/content/docs/sdk/cocos2dx/v5/features/subscriptions.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/subscriptions.mdoc index e4d011a74..d29cc788f 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/subscriptions.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/subscriptions.mdoc @@ -37,9 +37,9 @@ Instantiate an `AdjustAppStoreSubscription2dx` object with the following argumen | Argument | Type | Description | | --------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `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 | +| `price` | `std::string` | The price of the subscription | +| `currency` | `std::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` | `std::string` | Your ID for the transaction | ```cpp AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx({% $variables.subscription.appStoreSubscription %}); @@ -52,12 +52,12 @@ Instantiate an `AdjustPlayStoreSubscription2dx` object with the following argume | Argument | Type | Description | | --------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `price` | `double` | 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 | +| `price` | `std::string` | The price of the subscription | +| `currency` | `std::string` | The currency of the subscription | +| `sku` | `std::string` | The ID of the product | +| `orderId` | `std::string` | Your ID for the transaction | +| `signature` | `std::string` | The signature of the purchase data | +| `purchaseToken` | `std::string` | The unique token of the transaction. See [Google's documentation]() for more information | ```cpp AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx({% $variables.subscription.playStoreSubscription %}); @@ -76,7 +76,7 @@ Call the `setTransactionDate` method on your subscription object to record the t | Argument | Type | Description | | ----------------- | --------- | ---------------------------------------- | -| `transactionDate` | `string` | The timestamp of the subscription | +| `transactionDate` | `std::string` | The timestamp of the subscription | ```cpp AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx({% $variables.subscription.appStoreSubscription %}); @@ -90,7 +90,7 @@ Call the `setPurchaseTime` method on your subscription object to record the time | Argument | Type | Description | | ----------------- | --------- | ---------------------------------------- | -| `purchaseTime` | `string` | The timestamp of the subscription | +| `purchaseTime` | `std::string` | The timestamp of the subscription | ```cpp AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx({% $variables.subscription.playStoreSubscription %}); @@ -105,7 +105,7 @@ You can record the region in which the user purchased a subscription. To do this | Argument | Type | Description | | ----------------- | --------- | ---------------------------------------- | -| `salesRegion` | `string` | The country code for the subscription | +| `salesRegion` | `std::string` | The country code for the subscription | ```cpp AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx({% $variables.subscription.appStoreSubscription %}); @@ -188,7 +188,7 @@ To send subscription information to Adjust, follow these steps: std::string appToken = "{% $variables.config.token %}"; std::string environment = AdjustEnvironmentSandbox2dx; -AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment, false); +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); Adjust2dx::initSdk(adjustConfig); AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx({% $variables.subscription.appStoreSubscription %}); @@ -216,7 +216,7 @@ Adjust2dx::trackAppStoreSubscription(subscription); std::string appToken = "{% $variables.config.token %}"; std::string environment = AdjustEnvironmentSandbox2dx; -AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment, false); +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); Adjust2dx::initSdk(adjustConfig); AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx({% $variables.subscription.playStoreSubscription %}); diff --git a/src/content/docs/sdk/cocos2dx/v5/index.mdoc b/src/content/docs/sdk/cocos2dx/v5/index.mdoc index 6f85298a1..1390a5bbb 100644 --- a/src/content/docs/sdk/cocos2dx/v5/index.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/index.mdoc @@ -47,19 +47,56 @@ Once you've extracted the release archive, follow these steps to add the Adjust $(LOCAL_PATH)/../../../Classes/Adjust/AdjustAppStorePurchase2dx.cpp \ $(LOCAL_PATH)/../../../Classes/Adjust/AdjustPlayStorePurchase2dx.cpp \ $(LOCAL_PATH)/../../../Classes/Adjust/AdjustDeeplink2dx.cpp \ + $(LOCAL_PATH)/../../../Classes/Adjust/AdjustPurchaseVerificationResult2dx.cpp \ ``` -## 3. Configure Android settings {% #android-settings %} - -To support Android devices, you need to add the Adjust Android SDK to your project dependencies. To do this, add the following to your `build.gradle` file: + If you're using CMake, add the following list of sources and headers to your `CMakeLists.txt` file: + + ```cmake + # add cross-platforms source files and header files + list(APPEND GAME_SOURCE + Classes/Adjust/AdjustConfig2dx.cpp + Classes/Adjust/AdjustAttribution2dx.cpp + Classes/Adjust/AdjustProxy2dx.cpp + Classes/Adjust/AdjustEvent2dx.cpp + Classes/Adjust/AdjustAdRevenue2dx.cpp + Classes/Adjust/AdjustAppStoreSubscription2dx.cpp + Classes/Adjust/AdjustPlayStoreSubscription2dx.cpp + Classes/Adjust/AdjustAppStorePurchase2dx.cpp + Classes/Adjust/AdjustPlayStorePurchase2dx.cpp + Classes/Adjust/Adjust2dx.cpp + Classes/Adjust/AdjustEventFailure2dx.cpp + Classes/Adjust/AdjustEventSuccess2dx.cpp + Classes/Adjust/AdjustSessionFailure2dx.cpp + Classes/Adjust/AdjustSessionSuccess2dx.cpp + Classes/Adjust/AdjustThirdPartySharing2dx.cpp + Classes/Adjust/AdjustDeeplink2dx.cpp + Classes/Adjust/AdjustPurchaseVerificationResult2dx.cpp + ) + list(APPEND GAME_HEADER + Classes/Adjust/AdjustConfig2dx.h + Classes/Adjust/AdjustAttribution2dx.h + Classes/Adjust/AdjustProxy2dx.h + Classes/Adjust/AdjustEvent2dx.h + Classes/Adjust/AdjustAdRevenue2dx.h + Classes/Adjust/AdjustAppStoreSubscription2dx.h + Classes/Adjust/AdjustPlayStoreSubscription2dx.h + Classes/Adjust/AdjustAppStorePurchase2dx.h + Classes/Adjust/AdjustPlayStorePurchase2dx.h + Classes/Adjust/Adjust2dx.h + Classes/Adjust/AdjustEventFailure2dx.h + Classes/Adjust/AdjustEventSuccess2dx.h + Classes/Adjust/AdjustSessionFailure2dx.h + Classes/Adjust/AdjustSessionSuccess2dx.h + Classes/Adjust/AdjustThirdPartySharing2dx.h + Classes/Adjust/AdjustDeeplink2dx.h + Classes/Adjust/AdjustPurchaseVerificationResult2dx.h + ) + ``` -```groovy -dependencies { - implementation 'com.adjust.sdk:adjust-android:{% $versions.android.v5 %}' -} -``` +## 3. Configure Android settings {% #android-settings %} -If you don't use Maven to manage dependencies, you can download the Adjust Android SDK as an `AAR` from [the GitHub releases page](https://github.com/adjust/cocos2dx_sdk/releases). +To support Android devices, you need to download the latest `adjust-android.aar` from [the GitHub releases page](https://github.com/adjust/cocos2dx_sdk/releases/latest) and import it into your Android Studio project. ### Permissions {% #android-permissions %} @@ -161,11 +198,11 @@ Once you've updated your project settings, you can integrate the Adjust SDK into 1. Find your application delegate file in the **Project Navigator** and open it. 1. Include the `Adjust/Adjust2dx.h` class at the top of the file. -1. Instantiate an `AdjustConfig2dx` object inside the `applicationDidFinishLaunching` method with the following arguments: +1. Instantiate an `AdjustConfig2dx` object with the following arguments: - `appToken`: Your Adjust app token - `environment`: `AdjustEnvironmentSandbox2dx` 1. Optionally adjust your [logging level](/en/sdk/cocos2dx/configuration#set-your-logging-level) to adjust the verbosity of your logging. -1. Call the `Adjust2dx::initSdk` method and pass your `AdjustConfig2dx` instance as an argument. +1. Call the `Adjust2dx::initSdk` method and pass your `AdjustConfig2dx` instance as an argument as soon as possible after the app is launched. {% callout type="important" %} When running tests you should ensure that your environment is set to `AdjustEnvironmentSandbox2dx`. Change this to `AdjustEnvironmentProduction2dx` before you submit your application to app stores. @@ -174,14 +211,12 @@ When running tests you should ensure that your environment is set to `AdjustEnvi ```cpp #include "Adjust/Adjust2dx.h" -bool AppDelegate::applicationDidFinishLaunching() { - std::string appToken = "{% $variables.config.token %}"; - std::string environment = AdjustEnvironmentSandbox2dx; +std::string appToken = "{% $variables.config.token %}"; +std::string environment = AdjustEnvironmentSandbox2dx; - AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); - adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose); - Adjust2dx::initSdk(adjustConfig); -} +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); +adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose); +Adjust2dx::initSdk(adjustConfig); ``` ## 7. Build your app diff --git a/src/variables.json b/src/variables.json index e7c2456af..b3d7b3ee0 100644 --- a/src/variables.json +++ b/src/variables.json @@ -1,6 +1,6 @@ { "config": { - "token": "2fm9gkqubvpc", + "token": "{YOUR_APP_TOKEN}", "externalDeviceId": "1a42b171-faa5-46da-b5ae-6f4be6d05167", "defaultLink": "abc123", "attWaitingInterval": "30" @@ -11,7 +11,7 @@ "idfa": "f6e44e82-1289-460d-b251-890d5815e235" }, "event": { - "token": "g3mfiw", + "token": "{YOUR_EVENT_TOKEN}", "revenue": { "amount": "0.25", "currency": "EUR" @@ -35,7 +35,7 @@ "amount": "1.00", "currency": "EUR" }, - "adImpressionCount": "10", + "adImpressionsCount": "10", "adRevenueNetwork": "network1", "adRevenueUnit": "unit1", "adRevenuePlacement": "banner", From 076d57e5a1e8ffd9cfcf4e708a162a701bd5453e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Fri, 27 Sep 2024 17:34:25 +0200 Subject: [PATCH 34/59] Apply changes from code review --- .../sdk/cocos2dx/v5/features/privacy.mdoc | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc index be269bf8d..6cd5a798a 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc @@ -82,16 +82,16 @@ If you need to communicate third party sharing settings before the install sessi To instantiate a third party sharing object, create a new `AdjustThirdPartySharing2dx` instance and pass the following parameters: -- `isEnabled` (`bool` | `null`): Whether third party sharing is enabled. Pass `true` or `null` to enable third party sharing. Pass `false` to disable third party sharing. +- `isEnabled` (`bool`): Whether third party sharing is enabled. Pass `true` to enable third party sharing. Pass `false` to disable third party sharing. ```cpp -AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true); +AdjustThirdPartySharing2dx adjustThirdPartySharing = AdjustThirdPartySharing2dx(true); ``` Once you've instantiated your `AdjustThirdPartySharing2dx` object, send the information to Adjust by calling the `Adjust2dx::trackThirdPartySharing` method with your `AdjustThirdPartySharing2dx` instance as an argument. ```cpp -AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true); +AdjustThirdPartySharing2dx adjustThirdPartySharing = AdjustThirdPartySharing2dx(true); Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); ``` @@ -106,7 +106,7 @@ The Adjust SDK caches the third party sharing update and sends it to Adjust **be ```cpp AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); -AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(false); +AdjustThirdPartySharing2dx adjustThirdPartySharing = AdjustThirdPartySharing2dx(false); Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); Adjust2dx::initSdk(adjustConfig); ``` @@ -117,12 +117,12 @@ Adjust2dx::initSdk(adjustConfig); For SAN partners, you MAY pass the partner's name as the `partnerName`. For module partners, you MUST pass the partner ID. Adjust RECOMMENDS you pass the partner ID for both SANs and module partners. {% /callout %} -If you instantiate your `AdjustAttribution2dx` object with a `true` or `null` argument, the Adjust SDK defaults to sending all information to every partner you have set up for your app. To control this, you must customize what data you share on a per-partner basis by calling the `addPartnerSharingSetting` method on your `AdjustAttribution2dx` instance with the following arguments: +If you instantiate your `AdjustThirdPartySharing2dx` object with a `true` or without parameters, the Adjust SDK defaults to sending all information to every partner you have set up for your app. To control this, you must customize what data you share on a per-partner basis by calling the `addPartnerSharingSetting` method on your `AdjustThirdPartySharing2dx` instance with the following arguments: | Argument | Type | Description | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `partnerName` | `string` | The ID of the partner. [Download the full list of available partners](https://assets.ctfassets.net/5s247im0esyq/2QQROOadVqJzrME7yXKObe/7aca25e53d38befb2d469809e62b6fcc/3rd-party-sharing-partners.xlsx) | -| `key` | `string` | The metric you want to update. | +| `partnerName` | `std::string` | The ID of the partner. [Download the full list of available partners](https://assets.ctfassets.net/5s247im0esyq/2QQROOadVqJzrME7yXKObe/7aca25e53d38befb2d469809e62b6fcc/3rd-party-sharing-partners.xlsx) | +| `key` | `std::string` | The metric you want to update. | | `value` | `bool` | Pass `false` to stop sharing a metric with the specified partner or `true` to resume sharing. | To share only specific metrics with a partner, you MUST: @@ -131,7 +131,7 @@ To share only specific metrics with a partner, you MUST: 1. Set each metric you want to share to `true`. ```cpp -AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true); +AdjustThirdPartySharing2dx adjustThirdPartySharing = AdjustThirdPartySharing2dx(true); adjustThirdPartySharing.addPartnerSharingSetting("PartnerA", "all", false); adjustThirdPartySharing.addPartnerSharingSetting("PartnerA", "install", true); Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); @@ -168,7 +168,7 @@ The following metrics can be controlled using this method: If you want to stop sharing all metrics with a specific partner, pass the `all` key with a `false` value. ```cpp -AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true); +AdjustThirdPartySharing2dx adjustThirdPartySharing = AdjustThirdPartySharing2dx(true); adjustThirdPartySharing.addPartnerSharingSetting("PartnerA", "all", false); Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); ``` @@ -176,7 +176,7 @@ Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); To re-enable sharing, pass the `all` key with a `true` value. ```cpp -AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true); +AdjustThirdPartySharing2dx adjustThirdPartySharing = AdjustThirdPartySharing2dx(true); adjustThirdPartySharing.addPartnerSharingSetting("PartnerA", "all", true); Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); ``` @@ -201,10 +201,10 @@ You can attach granular information when a user updates their third party sharin | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `partnerName` | `string` | The ID of the partner. [Download the full list of available partners](https://assets.ctfassets.net/5s247im0esyq/2QQROOadVqJzrME7yXKObe/7aca25e53d38befb2d469809e62b6fcc/3rd-party-sharing-partners.xlsx) | | `key` | `string` | The key of the granular information. | -| `value` | `string` | The value of the granular information. | +| `value` | `std::string` | The value of the granular information. | ```cpp -AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true); +AdjustThirdPartySharing2dx adjustThirdPartySharing = AdjustThirdPartySharing2dx(true); adjustThirdPartySharing.addGranularOption("PartnerA", "foo", "bar"); Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); ``` @@ -244,7 +244,7 @@ If you call this method with a `0` value for **either** `data_processing_options {% /callout %} ```cpp -AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true); +AdjustThirdPartySharing2dx adjustThirdPartySharing = AdjustThirdPartySharing2dx(true); adjustThirdPartySharing.addGranularOption("facebook", "data_processing_options_country", "1"); adjustThirdPartySharing.addGranularOption("facebook", "data_processing_options_state", "1000"); Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); @@ -283,7 +283,7 @@ To comply with the EU's Digital Markets Act (DMA), Google Ads and the Google Mar {% /table %} ```cpp -AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true); +AdjustThirdPartySharing2dx adjustThirdPartySharing = AdjustThirdPartySharing2dx(true); adjustThirdPartySharing.addGranularOption("google_dma", "eea", "1"); adjustThirdPartySharing.addGranularOption("google_dma", "ad_personalization", "1"); adjustThirdPartySharing.addGranularOption("google_dma", "ad_user_data", "0"); @@ -294,7 +294,7 @@ Adjust2dx::initSdk(adjustConfig); If your user isn't in the EEA, you MUST set both `ad_personalization` and `ad_user_data` to `1`. If these values aren't set, Google won't claim attribution. ```cpp -AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing2dx(true); +AdjustThirdPartySharing2dx adjustThirdPartySharing = AdjustThirdPartySharing2dx(true); adjustThirdPartySharing.addGranularOption("google_dma", "eea", "0"); adjustThirdPartySharing.addGranularOption("google_dma", "ad_personalization", "1"); adjustThirdPartySharing.addGranularOption("google_dma", "ad_user_data", "1"); @@ -313,7 +313,7 @@ This is useful if you're operating in a country with strict privacy requirements To set your country of data residency, call the `setUrlStrategy` method on your `AdjustConfig2dx` instance with the following parameter: -- `urlStrategyDomains` (`vector`): The country or countries of data residence, or the endpoints to which you want to send SDK traffic. +- `urlStrategyDomains` (`std::vector`): The endpoints to which you want to send SDK traffic. - `shouldUseSubdomains` (`bool`): Whether the source should prefix a subdomain. - `isDataResidency` (`bool`): Whether the domain should be used for data residency. @@ -331,7 +331,7 @@ See the table below for a list of strategies. ```cpp AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); -adjustConfig.setUrlStrategy({'eu.adjust.com'}, true, true); +adjustConfig.setUrlStrategy({"eu.adjust.com"}, true, true); Adjust2dx::initSdk(adjustConfig); ``` From 79409f01bb638e5e7fc984084dcbf43fc2505d46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Fri, 27 Sep 2024 18:04:42 +0200 Subject: [PATCH 35/59] Enable parsing non-text elements in definition lists --- src/components/utils/parseDefList.ts | 86 +++++++++++++++++----------- 1 file changed, 51 insertions(+), 35 deletions(-) diff --git a/src/components/utils/parseDefList.ts b/src/components/utils/parseDefList.ts index 99186f78a..33f6f16ad 100644 --- a/src/components/utils/parseDefList.ts +++ b/src/components/utils/parseDefList.ts @@ -1,24 +1,45 @@ import { unified } from "unified"; import rehypeParse from "rehype-parse"; import rehypeStringify from "rehype-stringify"; -import type { Element, Root } from "hast"; +import type { Element, Root, Text } from "hast"; + +/** + * Extracts text content from an element's children recursively. + * @param children The children of the element. + * @returns The concatenated text content. + */ +const getTextContent = (children: (Element | Text)[]): string => { + return children + .map((child) => { + if (child.type === 'text') { + return child.value; + } else if (child.type === 'element') { + // Recursively get the text content of nested elements + return getTextContent(child.children as (Element | Text)[]); + } + return ''; + }) + .join(''); +}; /** * Checks if a value is a definition list term. - * @param text The text value of the element. + * @param children The children of the element. * @returns Whether the value of the element is a term. */ -const isTerm = (text: string): boolean => { - return /^\S[^: ].*$/.test(text.trim()); +const isTerm = (children: (Element | Text)[]): boolean => { + const text = getTextContent(children).trim(); + return /^\S[^: ].*$/.test(text); }; /** * Checks if a value is a definition list description. - * @param text The text value of the element. - * @returns Whether the value of the element is a term. + * @param children The children of the element. + * @returns Whether the value of the element is a description. */ -const isDescription = (text: string): boolean => { - return /^(:|\s)/.test(text.trim()); +const isDescription = (children: (Element | Text)[]): boolean => { + const text = getTextContent(children).trim(); + return /^(:|\s)/.test(text); }; /** @@ -53,78 +74,73 @@ export const parseDefList = async (htmlString: string): Promise => { children.forEach((element) => { if (element.type === 'element') { if (element.tagName === 'p') { - const text = element.children - .filter((child): child is Element & { value: string } => child.type === 'text') - .map((child) => child.value) - .join("") - .trim(); + const textChildren = element.children as (Element | Text)[]; - // Perform this action for each term - if (isTerm(text)) { + // Check if this paragraph contains a term + if (isTerm(textChildren)) { // If we reach a new term, we need to finish appending the descriptions to the last term we were working on. if (currentTerm) { - // Add the term to the list + // Push the last term and its descriptions dlNode.children.push(currentTerm); - // Add all collected descriptions currentDescription.forEach(dd => dlNode.children.push(dd)); currentDescription = []; } - // If this is the first term, assign it as the current term. currentTerm = { type: "element", tagName: "dt", - children: [{ type: "text", value: text }], + children: textChildren, // Keep all children, including inline formatting properties: {}, }; - } else if (isDescription(text) && currentTerm) { - // If the element is a description (paragraph starting with whitespace or a colon), add it to the currentDescription array + } else if (isDescription(textChildren) && currentTerm) { currentDescription.push({ type: "element", tagName: "dd", - children: [{ type: "text", value: text.replace(/^:/, "").trim() }], + children: textChildren.map(child => { + if (child.type === 'text') { + // Strip leading colon or whitespace for descriptions + return { + ...child, + value: child.value.replace(/^:/, '').trim(), + }; + } + return child; + }), properties: {}, }); } } else { - // If the element isn't a paragraph tag, it will be a description + // Non-paragraph elements are considered descriptions if (currentTerm) { - // If we have an ongoing term, finalize it dlNode.children.push(currentTerm); currentTerm = null; - // Add all collected descriptions currentDescription.forEach(dd => dlNode.children.push(dd)); currentDescription = []; } - // Wrap all elements that aren't a paragraph in a
tag const ddElement: Element = { type: "element", tagName: "dd", - children: [element], + children: [element], // Wrap the non-paragraph element properties: {}, }; - // Add the description element to the definition list dlNode.children.push(ddElement); } } }); - // Finalize the last term-description pair if it exists + // Finalize the last term-description pair if (currentTerm) { dlNode.children.push(currentTerm); - if (currentDescription.length > 0) { - currentDescription.forEach(dd => dlNode.children.push(dd)); - } + currentDescription.forEach(dd => dlNode.children.push(dd)); } - // Overwrite the entire tree with the new
node + // Replace the tree with the new
node tree.children = [dlNode]; }; }) - .use(rehypeStringify); // Convert the result to a string so we can use set:html + .use(rehypeStringify); - // Process and return the transformed HTML const result = await processor.process(htmlString); return String(result); }; From 90269154f547166030c2683b8cf249b5ea582a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Fri, 27 Sep 2024 19:20:17 +0200 Subject: [PATCH 36/59] Use definition lists in privacy doc --- .../sdk/cocos2dx/v5/features/privacy.mdoc | 143 ++++++++++-------- 1 file changed, 84 insertions(+), 59 deletions(-) diff --git a/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc index 6cd5a798a..611151a0f 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc @@ -74,9 +74,7 @@ Adjust shares all metrics with all SANs and module partners by default. To chang You can update your third party sharing settings at any time during the Adjust SDK lifecycle by instantiating an `AdjustThirdPartySharing2dx` object and passing it to `Adjust2dx::trackThirdPartySharing`. -{% callout type="important" %} -If you need to communicate third party sharing settings before the install session, for example [disabling third party sharing globally](#disable-third-party-sharing-globally) or [configuring per-partner sharing settings](#configure-per-partner-sharing-settings), you MUST instantiate and configure an `AdjustThirdPartySharing2dx` instance and call `Adjust2dx::trackThirdPartySharing` **before** calling `Adjust2dx::initSdk`. -{% /callout %} +If you need to communicate third party sharing settings before the install session, for example [disabling third party sharing globally](#disable-third-party-sharing-globally) or [configuring per-partner sharing settings](#configure-per-partner-sharing-settings), you MUST instantiate and configure an `AdjustThirdPartySharing2dx` instance and call `Adjust2dx::trackThirdPartySharing` **before** calling `Adjust2dx::initSdk`. This ensures that your settings apply to all data sent to Adjust, including the install session. ### Instantiate a third party sharing object {% #instantiate-a-third-party-sharing-object %} @@ -117,13 +115,24 @@ Adjust2dx::initSdk(adjustConfig); For SAN partners, you MAY pass the partner's name as the `partnerName`. For module partners, you MUST pass the partner ID. Adjust RECOMMENDS you pass the partner ID for both SANs and module partners. {% /callout %} -If you instantiate your `AdjustThirdPartySharing2dx` object with a `true` or without parameters, the Adjust SDK defaults to sending all information to every partner you have set up for your app. To control this, you must customize what data you share on a per-partner basis by calling the `addPartnerSharingSetting` method on your `AdjustThirdPartySharing2dx` instance with the following arguments: +If you want to share metrics only with specific partners, or you want to configure which metrics to share with specific partners, you MUST do the following: + +1. Instantiate your `AdjustThirdPartySharing2dx` object with a `true` argument. +2. Customize what data you share on a per-partner basis by calling the `addPartnerSharingSetting` method on your `AdjustThirdPartySharing2dx` instance with the following arguments: + +{% deflist %} +`partnerName` (`std::string`) + +: The ID of the partner. [Download the full list of available partners](https://assets.ctfassets.net/5s247im0esyq/2QQROOadVqJzrME7yXKObe/7aca25e53d38befb2d469809e62b6fcc/3rd-party-sharing-partners.xlsx). -| Argument | Type | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `partnerName` | `std::string` | The ID of the partner. [Download the full list of available partners](https://assets.ctfassets.net/5s247im0esyq/2QQROOadVqJzrME7yXKObe/7aca25e53d38befb2d469809e62b6fcc/3rd-party-sharing-partners.xlsx) | -| `key` | `std::string` | The metric you want to update. | -| `value` | `bool` | Pass `false` to stop sharing a metric with the specified partner or `true` to resume sharing. | +`key` (`std::string`) + +: The metric you want to update. + +`value` (`bool`) + +: Pass `false` to stop sharing a metric with the specified partner or `true` to resume sharing. +{% /deflist %} To share only specific metrics with a partner, you MUST: @@ -197,11 +206,19 @@ Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); 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 on your `AdjustThirdPartySharing2dx` instance with the following parameters: -| Argument | Type | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `partnerName` | `string` | The ID of the partner. [Download the full list of available partners](https://assets.ctfassets.net/5s247im0esyq/2QQROOadVqJzrME7yXKObe/7aca25e53d38befb2d469809e62b6fcc/3rd-party-sharing-partners.xlsx) | -| `key` | `string` | The key of the granular information. | -| `value` | `std::string` | The value of the granular information. | +{% deflist %} +`partnerName` (`std::string`) + +: The ID of the partner. [Download the full list of available partners](https://assets.ctfassets.net/5s247im0esyq/2QQROOadVqJzrME7yXKObe/7aca25e53d38befb2d469809e62b6fcc/3rd-party-sharing-partners.xlsx) + +`key` (`std::string`) + +: The key of the granular information. + +` value` (`std::string`) + +: The value of the granular information. +{% /deflist %} ```cpp AdjustThirdPartySharing2dx adjustThirdPartySharing = AdjustThirdPartySharing2dx(true); @@ -221,23 +238,23 @@ Facebook provides a feature called Limited Data Use (LDU) to comply with the Cal You can update the Facebook LDU status using the following keys: -{% table %} -- Key -- Description -- Values ---- -- `data_processing_options_country` -- The country in which the user is located. -- - `0`: Request that Facebook use geolocation. - - `1`: United States of America. ---- -- `data_processing_options_state` -- Notifies Facebook in which state the user is located. -- - `0`: Request that Facebook use geolocation. - - `1000`: California. - - `1001`: Colorado. - - `1002`: Connecticut. -{% /table %} +{% deflist %} +`data_processing_options_country` + +: The country in which the user is located. + +- `0`: Request that Facebook use geolocation. +- `1`: United States of America. + +`data_processing_options_state` + +: Notifies Facebook in which state the user is located. + +- `0`: Request that Facebook use geolocation. +- `1000`: California. +- `1001`: Colorado. +- `1002`: Connecticut. +{% /deflist %} {% callout type="note" %} 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`. @@ -253,34 +270,28 @@ Adjust2dx::initSdk(adjustConfig); #### Provide consent data to Google (Digital Markets Act compliance) {% #dma-compliance %} -{% callout type="important" %} -You MUST configure these granular options and call `Adjust2dx::trackThirdPartySharing` **before** calling `Adjust2dx::initSdk`. You MUST NOT change these granular options later or Google won't claim attribution. -{% /callout %} - -To comply with the EU's Digital Markets Act (DMA), Google Ads and the Google Marketing Platform require explicit consent to receive Adjust’s attribution requests to their APIs. To communicate this consent, you MUST the following granular options to your third party sharing instance for the partner `google_dma` if: +To comply with the EU's Digital Markets Act (DMA), Google Ads and the Google Marketing Platform require explicit consent to receive Adjust’s attribution requests to their APIs. You MUST communicate the user's consent choices if: - You have users in the European Economic Area (EEA). This includes EU member states, Switzerland, Norway, Iceland and Slovenia. -- You use Google Ads or Google Marketing Platform +- You use Google Ads or Google Marketing Platform. -{% table %} -- Key -- Value -- Description ---- -- `eea` -- `1` or `0` -- Informs Adjust whether users installing the app are within the European Economic Area (`1`) or not (`0`). ---- -- `ad_personalization` -- `1` or `0` -- Informs Adjust whether users consented with being served personalized ads via Google Ads and/or Google Marketing Platform (`1`) or not (`0`). +To communicate this consent, add the following granular options to your third party sharing instance for the partner `google_dma`: - This parameter also informs the `npa` parameter reserved for Google Marketing Platform. ---- -- `ad_user_data` -- `1` or `0` -- Informs Adjust whether users consented with their advertiser ID being leveraged for attribution purposes -{% /table %} +{% deflist %} +`eea` (`1` or `0`) + +: Informs Adjust whether users installing the app are within the European Economic Area (`1`) or not (`0`). + +`ad_personalization` (`1` or `0`) + +: Informs Adjust whether users consented with being served personalized ads via Google Ads and/or Google Marketing Platform (`1`) or not (`0`). + +: This parameter also informs the `npa` parameter reserved for Google Marketing Platform. + +`ad_user_data` (`1` or `0`) + +: Informs Adjust whether users consented with their advertiser ID being leveraged for attribution purposes +{% /deflist %} ```cpp AdjustThirdPartySharing2dx adjustThirdPartySharing = AdjustThirdPartySharing2dx(true); @@ -313,9 +324,19 @@ This is useful if you're operating in a country with strict privacy requirements To set your country of data residency, call the `setUrlStrategy` method on your `AdjustConfig2dx` instance with the following parameter: -- `urlStrategyDomains` (`std::vector`): The endpoints to which you want to send SDK traffic. -- `shouldUseSubdomains` (`bool`): Whether the source should prefix a subdomain. -- `isDataResidency` (`bool`): Whether the domain should be used for data residency. +{% deflist %} +`urlStrategyDomains` (`std::vector`) + +: The endpoints to which you want to send SDK traffic. + +`shouldUseSubdomains` (`bool`) + +: Whether the source should prefix a subdomain. + +`isDataResidency` (`bool`) + +: Whether the domain should be used for data residency. +{% /deflist %} See the table below for a list of strategies. @@ -341,7 +362,11 @@ If you've enabled [Data Privacy settings](https://help.adjust.com/en/article/man To toggle this feature, call the `trackMeasurementConsent` method with the following argument: -- `measurementConsent` (`bool`): Whether consent measurement is enabled (`true`) or not (`false`). +{% deflist %} +`measurementConsent` (`bool`) + +: Whether consent measurement is enabled (`true`) or not (`false`). +{% /deflist %} 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. From 57a9caad09a69bfa085b189dc33ea5465f0c0f8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Mon, 30 Sep 2024 13:18:43 +0200 Subject: [PATCH 37/59] Update privacy doc --- .../sdk/cocos2dx/v5/features/privacy.mdoc | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc index 611151a0f..749efd839 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc @@ -70,17 +70,27 @@ Adjust2dx::initSdk(adjustConfig); ## Configure third party sharing options {% #configure-third-party-sharing-options %} -Adjust shares all metrics with all SANs and module partners by default. To change this, configure your third party sharing preferences using the `AdjustThirdPartySharing2dx` class. +Adjust shares all metrics with all Self-Attributing Networks (SANs) and module partners you've configured for your app by default. You can configure and update your third party sharing settings at any time during the Adjust SDK lifecycle by instantiating an `AdjustThirdPartySharing2dx` object and passing it to `Adjust2dx::trackThirdPartySharing`. -You can update your third party sharing settings at any time during the Adjust SDK lifecycle by instantiating an `AdjustThirdPartySharing2dx` object and passing it to `Adjust2dx::trackThirdPartySharing`. +If you initialize the Adjust SDK with `Adjust2dx::initSdk` **before** you configure and send your preferences with `Adjust2dx::trackThirdPartySharing`, your third party sharing options don't apply to your install session. -If you need to communicate third party sharing settings before the install session, for example [disabling third party sharing globally](#disable-third-party-sharing-globally) or [configuring per-partner sharing settings](#configure-per-partner-sharing-settings), you MUST instantiate and configure an `AdjustThirdPartySharing2dx` instance and call `Adjust2dx::trackThirdPartySharing` **before** calling `Adjust2dx::initSdk`. This ensures that your settings apply to all data sent to Adjust, including the install session. +Adjust RECOMMENDS you configure third party sharing settings and call `Adjust2dx::trackThirdPartySharing` **before** calling `Adjust2dx::initSdk`. When you do this, the Adjust SDK caches the third party sharing update and sends it before the install session information, ensuring that your settings apply to the install session and all subsequent sessions. + +You MUST configure your third party sharing settings before initializing the SDK to do the following: + +1. Configure the sharing of data with third parties **including the install session**. +1. [Configure Facebook Limited Data Use (LDU) settings](#manage-facebook-ldu). +1. [Communicate Google Digital Market Act (DMA) compliance](#dma-compliance). ### Instantiate a third party sharing object {% #instantiate-a-third-party-sharing-object %} To instantiate a third party sharing object, create a new `AdjustThirdPartySharing2dx` instance and pass the following parameters: -- `isEnabled` (`bool`): Whether third party sharing is enabled. Pass `true` to enable third party sharing. Pass `false` to disable third party sharing. +{% deflist %} +`isEnabled` (`bool`) + +: Whether third party sharing is enabled. Pass `true` to enable third party sharing. Pass `false` to disable third party sharing. +{% /deflist %} ```cpp AdjustThirdPartySharing2dx adjustThirdPartySharing = AdjustThirdPartySharing2dx(true); @@ -118,7 +128,7 @@ For SAN partners, you MAY pass the partner's name as the `partnerName`. For modu If you want to share metrics only with specific partners, or you want to configure which metrics to share with specific partners, you MUST do the following: 1. Instantiate your `AdjustThirdPartySharing2dx` object with a `true` argument. -2. Customize what data you share on a per-partner basis by calling the `addPartnerSharingSetting` method on your `AdjustThirdPartySharing2dx` instance with the following arguments: +1. Customize what data you share on a per-partner basis by calling the `addPartnerSharingSetting` method on your `AdjustThirdPartySharing2dx` instance with the following arguments: {% deflist %} `partnerName` (`std::string`) @@ -180,6 +190,7 @@ If you want to stop sharing all metrics with a specific partner, pass the `all` AdjustThirdPartySharing2dx adjustThirdPartySharing = AdjustThirdPartySharing2dx(true); adjustThirdPartySharing.addPartnerSharingSetting("PartnerA", "all", false); Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); +Adjust2dx::initSdk(adjustConfig); ``` To re-enable sharing, pass the `all` key with a `true` value. @@ -188,6 +199,7 @@ To re-enable sharing, pass the `all` key with a `true` value. AdjustThirdPartySharing2dx adjustThirdPartySharing = AdjustThirdPartySharing2dx(true); adjustThirdPartySharing.addPartnerSharingSetting("PartnerA", "all", true); Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); +Adjust2dx::initSdk(adjustConfig); ``` To only share event data with a specific partner: @@ -200,6 +212,7 @@ AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing adjustThirdPartySharing.addPartnerSharingSetting("PartnerA", "all", false); adjustThirdPartySharing.addPartnerSharingSetting("PartnerA", "event", true); Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); +Adjust2dx::initSdk(adjustConfig); ``` ### Add per-partner granular information {% #add-per-partner-granular-information %} @@ -215,7 +228,7 @@ You can attach granular information when a user updates their third party sharin : The key of the granular information. -` value` (`std::string`) +`value` (`std::string`) : The value of the granular information. {% /deflist %} @@ -302,7 +315,7 @@ Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); Adjust2dx::initSdk(adjustConfig); ``` -If your user isn't in the EEA, you MUST set both `ad_personalization` and `ad_user_data` to `1`. If these values aren't set, Google won't claim attribution. +If your user isn't in the EEA, you MUST set both `ad_personalization` and `ad_user_data` to `1`. If these values aren't set, Google won't claim attribution and will return an error. ```cpp AdjustThirdPartySharing2dx adjustThirdPartySharing = AdjustThirdPartySharing2dx(true); From 0a44f6fd18b4226e7a607a1be3f0389e7592c206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Mon, 30 Sep 2024 13:18:56 +0200 Subject: [PATCH 38/59] Remove tables and add definition lists --- src/components/utils/parseDefList.ts | 25 +- .../sdk/cocos2dx/v5/features/ad-revenue.mdoc | 45 +++- .../docs/sdk/cocos2dx/v5/features/events.mdoc | 73 ++++-- .../sdk/cocos2dx/v5/features/short-links.mdoc | 11 +- .../docs/sdk/cocos2dx/v5/features/skan.mdoc | 28 ++- .../cocos2dx/v5/features/subscriptions.mdoc | 214 ++++++++++-------- src/styles/index.css | 10 +- src/variables.json | 2 +- 8 files changed, 255 insertions(+), 153 deletions(-) diff --git a/src/components/utils/parseDefList.ts b/src/components/utils/parseDefList.ts index 33f6f16ad..c76a90a94 100644 --- a/src/components/utils/parseDefList.ts +++ b/src/components/utils/parseDefList.ts @@ -96,16 +96,21 @@ export const parseDefList = async (htmlString: string): Promise => { currentDescription.push({ type: "element", tagName: "dd", - children: textChildren.map(child => { - if (child.type === 'text') { - // Strip leading colon or whitespace for descriptions - return { - ...child, - value: child.value.replace(/^:/, '').trim(), - }; - } - return child; - }), + children: [{ + type: "element", + tagName: "p", + children: textChildren.map(child => { + if (child.type === 'text') { + // Strip leading colon or whitespace for descriptions + return { + ...child, + value: child.value.replace(/^:/, '').trim(), + }; + } + return child; + }), + properties: {}, + }], properties: {}, }); } diff --git a/src/content/docs/sdk/cocos2dx/v5/features/ad-revenue.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/ad-revenue.mdoc index 46b01e7fc..7968606d0 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/ad-revenue.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/ad-revenue.mdoc @@ -24,7 +24,11 @@ To send ad revenue information with the Adjust SDK, you need to instantiate an ` To instantiate an ad revenue object, instantiate an `AdjustAdRevenue2dx` objec with the following parameter: -- `source` (`std::string`): The source of the ad revenue. See the table below for all available sources. +{% deflist %} +`source` (`std::string`) + +: The source of the ad revenue. See the table below for all available sources. +{% /deflist %} | Parameter | Source | | ------------------------- | ------------------------- | @@ -41,8 +45,15 @@ To instantiate an ad revenue object, instantiate an `AdjustAdRevenue2dx` objec w Once you've instantiated your ad revenue object, set the ad revenue amount by calling the `setRevenue` method with the following arguments: -- `amount` (`double`): The amount of ad revenue to be recorded. -- `currency` (`std::string`): The currency of the ad revenue. You MUST format this as a 3 character [ISO 4217 code](https://www.iban.com/currency-codes) +{% deflist %} +`amount` (`double`) + +: The amount of ad revenue to be recorded. + +`currency` (`std::string`) + +: The currency of the ad revenue. You MUST format this as a 3 character [ISO 4217 code](https://www.iban.com/currency-codes) +{% /deflist %} ```cpp AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("applovin_max_sdk"); @@ -62,7 +73,11 @@ You can provide additional details about the campaign associated with your `Adju To send the number of recorded ad impressions, call the `setAdImpressionsCount` method of your `AdjustAdRevenue2dx` instance with the following argument: -- `setAdImpressionsCount` (`int`): The number of ad impressions. +{% deflist %} +`setAdImpressionsCount` (`int`) + +: The number of ad impressions. +{% /deflist %} ```cpp AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("{% $variables.adRevenue.source %}"); @@ -74,11 +89,15 @@ Adjust2dx::trackAdRevenue(adjustAdRevenue); To send the network associated with ad revenue, call the `setAdRevenueNetwork` method of your `AdjustAdRevenue2dx` instance with the following argument: -- `adRevenueNetwork` (`std::string`): The name of the network associated with the ad revenue. +{% deflist %} +`adRevenueNetwork` (`std::string`) + +: The name of the network associated with the ad revenue. +{% /deflist %} ```cpp AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("{% $variables.adRevenue.source %}"); -adjustAdRevenue.adRevenueNetwork("{% $variables.adRevenue.adRevenueNetwork %}"); +adjustAdRevenue.setAdRevenueNetwork("{% $variables.adRevenue.adRevenueNetwork %}"); Adjust2dx::trackAdRevenue(adjustAdRevenue); ``` @@ -86,11 +105,15 @@ Adjust2dx::trackAdRevenue(adjustAdRevenue); To send the advertising unit that earned the revenue, call the `setAdRevenueUnit` method of your `AdjustAdRevenue2dx instance with the following argument: -- `adRevenueUnit` (`std::string`): The name of the ad unit associated with the ad revenue. +{% deflist %} +`adRevenueUnit` (`std::string`) + +: The name of the ad unit associated with the ad revenue. +{% /deflist %} ```cpp AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("{% $variables.adRevenue.source %}"); -adjustAdRevenue.adRevenueUnit("{% $variables.adRevenue.adRevenueUnit %}"); +adjustAdRevenue.setAdRevenueUnit("{% $variables.adRevenue.adRevenueUnit %}"); Adjust2dx::trackAdRevenue(adjustAdRevenue); ``` @@ -98,7 +121,11 @@ Adjust2dx::trackAdRevenue(adjustAdRevenue); To send the placement of the ad unit, call the `setAdRevenuePlacement` method with the following argument: -- `adRevenuePlacement` (`std::string`): The placement of the ad unit. +{% deflist %} +`adRevenuePlacement` (`std::string`) + +: The placement of the ad unit. +{% /deflist %} ```cpp AdjustAdRevenue2dx adjustAdRevenue = AdjustAdRevenue2dx("{% $variables.adRevenue.source %}"); diff --git a/src/content/docs/sdk/cocos2dx/v5/features/events.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/events.mdoc index c2f27d35c..bc841383e 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/events.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/events.mdoc @@ -30,9 +30,11 @@ The `AdjustEvent2dx` class is used to hold information about an event. Each even Instantiate an `AdjustEvent2dx` object by passing your event token as an argument. -| Argument | Type | Description | -| --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | -| `eventToken` | `std::string` | Your Adjust event token. See [Add events](https://help.adjust.com/en/article/add-events#manage-your-events) for more information. | +{% deflist %} +`eventToken` (`std::string`) + +: Your Adjust event token. See [Add events](https://help.adjust.com/en/article/add-events#manage-your-events) for more information. +{% /deflist %} ```cpp AdjustEvent2dx adjustEvent = AdjustEvent2dx("{% $variables.event.token %}"); @@ -43,10 +45,15 @@ Adjust2dx::trackEvent(adjustEvent); Set the revenue amount and currency code of any revenue associated with the event by calling the `setRevenue()` method. -| Argument | Type | Description | -| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| `revenue` | `double` | The amount of revenue generated by the event. | -| `currency` | `std::string` | The [ISO 4217 code](https://www.iban.com/currency-codes) of the event currency. | +{% deflist %} +`revenue` (`double`) + +: The amount of revenue generated by the event. + +`currency` (`std::string`) + +: The [ISO 4217 code](https://www.iban.com/currency-codes) of the event currency. +{% /deflist %} ```cpp AdjustEvent2dx adjustEvent = AdjustEvent2dx("{% $variables.event.token %}"); @@ -58,10 +65,15 @@ Adjust2dx::trackEvent(adjustEvent); Add callback parameters by passing `std::string` key-value pairs to the `addCallbackParameter` method. When Adjust receives your `AdjustEvent2dx` instance, all callback parameters are sent to your callback URL. -| Argument | Type | Description | -| -------------------------------- | -------------------------------- | -------------------------------- | -| `key` | `std::string` | The name (key) of the parameter. | -| `value` | `std::string` | The value of the parameter. | +{% deflist %} +`key` (`std::string`) + +: The name (key) of the parameter. + +`value` (`std::string`) + +: The value of the parameter. +{% /deflist %} ```cpp AdjustEvent2dx adjustEvent = AdjustEvent2dx("{% $variables.event.token %}"); @@ -74,10 +86,15 @@ Adjust2dx::trackEvent(adjustEvent); Add callback parameters by passing `string` key-value pairs to the `addPartnerParameter()` method. When Adjust receives your `AdjustEvent2dx` instance, all partner parameters are sent to any external partners you've configured. -| Argument | Type | Description | -| -------------------------------- | -------------------------------- | -------------------------------- | -| `key` | `std::string` | The name (key) of the parameter. | -| `value` | `std::string` | The value of the parameter. | +{% deflist %} +`key` (`std::string`) + +: The name (key) of the parameter. + +`value` (`std::string`) + +: The value of the parameter. +{% /deflist %} ```cpp AdjustEvent2dx adjustEvent = AdjustEvent2dx("{% $variables.event.token %}"); @@ -90,9 +107,11 @@ Adjust2dx::trackEvent(adjustEvent) Sets a unique identifier for the `AdjustEvent2dx` instance to deduplicate revenue events by calling the `setDeduplicationId()` method. The SDK stores the last ten identifiers and skips revenue events with duplicate transaction IDs. -| Argument | Type | Description | -| ------------------------ | ------------------------ | ------------------------ | -| `deduplicationId` | `std::string` | A unique transaction ID. | +{% deflist %} +`deduplicationId` (`std::string`) + +: A unique deduplication ID. +{% /deflist %} ```cpp AdjustEvent2dx adjustEvent = AdjustEvent2dx("{% $variables.event.token %}"); @@ -104,9 +123,11 @@ Adjust2dx::trackEvent(adjustEvent); Sets a unique identifier for Adjust's servers to report on in event callback by calling the `setCallbackId` method. -| Argument | Type | Description | -| --------------------- | --------------------- | --------------------- | -| `callbackId` | `std::string` | A unique callback ID. | +{% deflist %} +`callbackId` (`std::string`) + +: A unique callback ID. +{% /deflist %} ```cpp AdjustEvent2dx adjustEvent = AdjustEvent2dx("{% $variables.event.token %}"); @@ -118,9 +139,11 @@ Adjust2dx::trackEvent(adjustEvent); Call the `Adjust2dx::trackEvent` method with your `AdjustEvent2dx` instance as an argument to send your event to Adjust. -| Argument | Type | Description | -| ------------------------------ | ------------------------------ | ------------------------------ | -| `adjustEvent` | `AdjustEvent2dx` | Your `AdjustEvent2dx` instance | +{% deflist %} +`adjustEvent` (`AdjustEvent2dx`) + +: Your `AdjustEvent2dx` instance. +{% /deflist %} ```cpp AdjustEvent2dx adjustEvent = AdjustEvent2dx("{% $variables.event.token %}"); @@ -217,3 +240,5 @@ Parameters: deduplication_id {% $variables.event.deduplicationId %} ui_mode 1 ``` + +{% deflist /%} diff --git a/src/content/docs/sdk/cocos2dx/v5/features/short-links.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/short-links.mdoc index f1103498a..382dd9088 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/short-links.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/short-links.mdoc @@ -31,8 +31,15 @@ In the Adjust SDK, add support for the following: To resolve a short Adjust link URL that deep linked users into your app, call the `Adjust2dx::processAndResolveDeeplink` method with the following arguments: -- `deeplink` (`AdjustDeeplink2dx`): The deep link you want to resolve. -- `resolvedLinkCallback` (`void(std::string)`): A function that receives the resolved deep link. Must return `void`. +{% deflist %} +`deeplink` (`AdjustDeeplink2dx`) + +: The deep link you want to resolve. + +`resolvedLinkCallback` (`void(std::string)`) + +: A function that receives the resolved deep link. Must return `void`. +{% /deflist %} ```cpp AdjustDeeplink2dx deeplink = AdjustDeeplink2dx("url"); diff --git a/src/content/docs/sdk/cocos2dx/v5/features/skan.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/skan.mdoc index 57ff0ed15..b52ade23e 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/skan.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/skan.mdoc @@ -34,13 +34,27 @@ Conversion values are a mechanism used to track user behavior in SKAN. You can m 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 `updateSkanConversionValue` method. This method wraps [Apple's `updatePostbackConversionValue` method](https://developer.apple.com/documentation/storekit/skadnetwork/4097267-updatepostbackconversionvalue). You MUST pass the following arguments: -- `fineValue` (`int`): Your conversion value. Must be between `0` and `63`. -- `coarseValue` (`std::string` [`SKAdNetwork.CoarseConversionValue`](https://developer.apple.com/documentation/storekit/skadnetwork/coarseconversionvalue)): The coarse conversion value. This value is used if your app doesn't have sufficient installs to reach the privacy threshold. The following values are allowed: - - `"low"` (`SKAdNetworkCoarseConversionValueLow`) - - `"medium"` (`SKAdNetworkCoarseConversionValueMedium`) - - `"high"` (`SKAdNetworkCoarseConversionValueHigh`) -- `lockWindow` (`bool`): Whether to send the postback before the conversion window ends (`true`). -- `errorCallback` (`function`): A function that receives any error message returned by SKAN as a `string`. +{% deflist %} +`fineValue` (`int`) + +: Your conversion value. Must be between `0` and `63`. + +`coarseValue` (`std::string`) + +: The coarse conversion value. This value is used if your app doesn't have sufficient installs to reach the privacy threshold. The following values are allowed: + +- `"low"` (`SKAdNetworkCoarseConversionValueLow`) +- `"medium"` (`SKAdNetworkCoarseConversionValueMedium`) +- `"high"` (`SKAdNetworkCoarseConversionValueHigh`) + +`lockWindow` (`bool`) + +: Whether to send the postback before the conversion window ends (`true`). + +`errorCallback` (`function`) + +: A function that receives any error message returned by SKAN as a `string`. +{% /deflist %} ```cpp Adjust2dx::updateSkanConversionValue(6, "low", true, [](std::string error) { diff --git a/src/content/docs/sdk/cocos2dx/v5/features/subscriptions.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/subscriptions.mdoc index d29cc788f..2677946e7 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/subscriptions.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/subscriptions.mdoc @@ -20,149 +20,90 @@ You can record App Store and Play Store subscriptions and verify their validity ## How it works {% #how-it-works %} -After the user purchases a subscription, create an `AdjustAppStoreSubscription2dx` or `AdjustPlayStoreSubscription2dx` instance. These instances contain subscription details that allows Adjust to measure the subscription event. +After the user purchases a subscription, create an `AdjustAppStoreSubscription2dx` or `AdjustPlayStoreSubscription2dx` instance. These classes contain properties representing subscription details that allow Adjust to measure the subscription event. -## Reference {% #reference %} +## App Store subscriptions {% #app-store-subscriptions %} -The `AdjustAppStoreSubscription2dx` and `AdjustPlayStoreSubscription2dx` classes are used to hold information about a subscription. Each subscription is represented by unique `AdjustAppStoreSubscription2dx` or `AdjustPlayStoreSubscription2dx` instances. +The `AdjustAppStoreSubscription2dx` class represents App Store subscription information. You can create multiple instances of this class to send subscription information to Adjust. -To get started, you need to create a subscription object containing details of the subscription purchase. +To get started, you need to instantiate a subscription object containing details of the subscription purchase. -### Instantiate a subscription object {% #instantiate-a-subscription-object %} - -{% tabs %} -{% tab title="App Store" sync="appstore" %} +### Instantiate an App Store subscription object {% #instantiate-an-app-store-subscription-object %} Instantiate an `AdjustAppStoreSubscription2dx` object with the following arguments: -| Argument | Type | Description | -| --------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `price` | `std::string` | The price of the subscription | -| `currency` | `std::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` | `std::string` | Your ID for the transaction | +{% deflist %} +`price` (`std::string`) -```cpp -AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx({% $variables.subscription.appStoreSubscription %}); -``` +: The price of the subscription -{% /tab %} -{% tab title="Play Store" sync="playstore" %} +`currency` (`std::string`) -Instantiate an `AdjustPlayStoreSubscription2dx` object with the following arguments: +: 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` (`std::string`) -| Argument | Type | Description | -| --------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `price` | `std::string` | The price of the subscription | -| `currency` | `std::string` | The currency of the subscription | -| `sku` | `std::string` | The ID of the product | -| `orderId` | `std::string` | Your ID for the transaction | -| `signature` | `std::string` | The signature of the purchase data | -| `purchaseToken` | `std::string` | The unique token of the transaction. See [Google's documentation]() for more information | +: Your ID for the transaction. +{% /deflist %} ```cpp -AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx({% $variables.subscription.playStoreSubscription %}); +AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx({% $variables.subscription.appStoreSubscription %}); ``` -{% /tab %} -{% /tabs %} -### Record the purchase date {% #record-the-purchase-date %} +### Record the purchase date {% #record-the-purchase-date-app-store %} You can record the date on which the user purchased a subscription. The SDK returns this data for you to report on. -{% tabs %} -{% tab title="App Store" sync="appstore" %} - Call the `setTransactionDate` method on your subscription object to record the timestamp of the subscription. -| Argument | Type | Description | -| ----------------- | --------- | ---------------------------------------- | -| `transactionDate` | `std::string` | The timestamp of the subscription | +{% deflist %} +`transactionDate` (`std::string`) + +: The timestamp of the subscription +{% /deflist %} ```cpp AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx({% $variables.subscription.appStoreSubscription %}); subscription.setTransactionDate(transactionDate); ``` -{% /tab %} -{% tab title="Play Store" sync="playstore" %} - -Call the `setPurchaseTime` method on your subscription object to record the timestamp of the subscription. - -| Argument | Type | Description | -| ----------------- | --------- | ---------------------------------------- | -| `purchaseTime` | `std::string` | The timestamp of the subscription | - -```cpp -AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx({% $variables.subscription.playStoreSubscription %}); -subscription.setPurchaseTime(purchaseTime); -``` -{% /tab %} -{% /tabs %} - -### Record the purchase region (iOS only) {% #record-the-purchase-region-ios-only %} +### Record the purchase region {% #record-the-purchase-region %} You can record the region in which the user purchased a subscription. To do this, call the `setSalesRegion` method 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/storekit/storefront/3792000-countrycode) of the [`Storefront`](https://developer.apple.com/documentation/storekit/storefront) object. -| Argument | Type | Description | -| ----------------- | --------- | ---------------------------------------- | -| `salesRegion` | `std::string` | The country code for the subscription | +{% deflist %} +`salesRegion` (`std::string`) + +: The country code for the subscription. +{% /deflist %} ```cpp AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx({% $variables.subscription.appStoreSubscription %}); subscription.setSalesRegion(salesRegion); ``` -### Add callback parameters {% #add-callback-parameters %} +### Add callback parameters {% #add-callback-parameters-app-store %} 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. -{% tabs %} -{% tab title="App Store" sync="appstore" %} - ```cpp AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx({% $variables.subscription.appStoreSubscription %}); subscription.addCallbackParameter("{% $variables.subscription.key1 %}"); subscription.addCallbackParameter("{% $variables.subscription.key2 %}"); ``` -{% /tab %} -{% tab title="Play Store" sync="playstore" %} - -```cpp -AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx({% $variables.subscription.playStoreSubscription %}); -subscription.addCallbackParameter("{% $variables.subscription.key1 %}"); -subscription.addCallbackParameter("{% $variables.subscription.key2 %}"); -``` - -{% /tab %} -{% /tabs %} - -### Add partner parameters {% #add-partner-parameters %} +### Add partner parameters {% #add-partner-parameters-app-store %} 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. -{% tabs %} -{% tab title="App Store" sync="appstore" %} - ```cpp AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx({% $variables.subscription.appStoreSubscription %}); subscription.addPartnerParameter("{% $variables.subscription.key1 %}"); subscription.addPartnerParameter("{% $variables.subscription.key2 %}"); ``` -{% /tab %} -{% tab title="Play Store" sync="playstore" %} +### App Store subscription tutorial {% #tutorial-app-store %} -```cpp -AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx({% $variables.subscription.playStoreSubscription %}); -subscription.addPartnerParameter("{% $variables.subscription.key1 %}"); -subscription.addPartnerParameter("{% $variables.subscription.key2 %}"); -``` - -{% /tab %} -{% /tabs %} - -## Tutorial {% #tutorial %} Once you have set up your subscription object, you can record it using the Adjust SDK. This tutorial demonstrates how to use the `AdjustAppStoreSubscription2dx` and `AdjustPlayStoreSubscription2dx` classes to send subscription information to Adjust. You will learn: @@ -172,9 +113,6 @@ This tutorial demonstrates how to use the `AdjustAppStoreSubscription2dx` and `A To send subscription information to Adjust, follow these steps: -{% tabs %} -{% tab title="App Store" sync="appstore" %} - 1. Instantiate and populate an `AdjustAppStoreSubscription2dx` object with the `price`, `currency`, and `transactionId`. In the example below, the following properties are set: - The transaction date is set to _txn\_20230918T123456Z_ - The sales region is set to _US_. @@ -201,8 +139,93 @@ subscription.addPartnerParameter("{% $variables.subscription.key2 %}"); Adjust2dx::trackAppStoreSubscription(subscription); ``` -{% /tab %} -{% tab title="Play Store" sync="playstore" %} +## Play Store subscriptions {% #play-store-subscriptions %} + +The `AdjustPlayStoreSubscription2dx` class represents App Store subscription information. You can create multiple instances of this class to send subscription information to Adjust. + +To get started, you need to instantiate a subscription object containing details of the subscription purchase. + +### Instantiate a Play Store subscription object {% #instantiate-a-play-store-subscription-object %} + +Instantiate an `AdjustPlayStoreSubscription2dx` object with the following arguments: + +{% deflist %} +`price` (`std::string`) + +: The price of the subscription + +`currency` (`std::string`) + +: The currency of the subscription + +`sku` (`std::string`) + +: The ID of the product + +`orderId` (`std::string`) + +: Your ID for the transaction + +`signature` (`std::string`) + +: The signature of the purchase data + +`purchaseToken` (`std::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 +{% /deflist %} + +```cpp +AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx({% $variables.subscription.playStoreSubscription %}); +``` + +### Record the purchase date {% #record-the-purchase-date-play-store %} + +You can record the date on which the user purchased a subscription. The SDK returns this data for you to report on. + +Call the `setPurchaseTime` method on your subscription object to record the timestamp of the subscription. + +{% deflist %} +`purchaseTime` (`std::string`) + +: The timestamp of the subscription. +{% /deflist %} + +```cpp +AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx({% $variables.subscription.playStoreSubscription %}); +subscription.setPurchaseTime(purchaseTime); +``` + +### Add callback parameters {% #add-callback-parameters-play-store %} + +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. + +```cpp +AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx({% $variables.subscription.playStoreSubscription %}); +subscription.addCallbackParameter("{% $variables.subscription.key1 %}"); +subscription.addCallbackParameter("{% $variables.subscription.key2 %}"); +``` + +### Add partner parameters {% #add-partner-parameters-play-store %} + +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. + +```cpp +AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx({% $variables.subscription.playStoreSubscription %}); +subscription.addPartnerParameter("{% $variables.subscription.key1 %}"); +subscription.addPartnerParameter("{% $variables.subscription.key2 %}"); +``` + +### Play Store subscription tutorial {% #tutorial-play-store %} + +Once you have set up your subscription object, you can record it using the Adjust SDK. + +This tutorial demonstrates how to use the `AdjustAppStoreSubscription2dx` and `AdjustPlayStoreSubscription2dx` classes to send subscription information to Adjust. You will learn: + +1. How to create create and populate an `AdjustAppStoreSubscription2dx` or `AdjustPlayStoreSubscription2dx` instance. +1. How to use the `AdjustAppStoreSubscription2dx` and `AdjustPlayStoreSubscription2dx` classes in your app to send subscription information to Adjust. + +To send subscription information to Adjust, follow these steps: 1. Instantiate and populate an `AdjustPlayStoreSubscription2dx` object with the `price`, `currency`, `sku`, `orderId`, `signature`, `purchaseToken`. In the example below, the following properties are set: - The purchase time is set to _txn\_20230918T123456Z_ @@ -227,6 +250,3 @@ subscription.addPartnerParameter("{% $variables.subscription.key1 %}"); subscription.addPartnerParameter("{% $variables.subscription.key2 %}"); Adjust2dx::trackPlayStoreSubscription(subscription); ``` - -{% /tab %} -{% /tabs %} diff --git a/src/styles/index.css b/src/styles/index.css index 18a5930a8..e1840887d 100644 --- a/src/styles/index.css +++ b/src/styles/index.css @@ -133,7 +133,11 @@ body { } .article-content a { - @apply text-inherit text-link-active font-link items-center underline-offset-2; + @apply text-inherit text-link-active font-link underline-offset-2; +} + +.article-content dd a { + @apply mx-1; } bold { @@ -266,7 +270,7 @@ blockquote { } code { - @apply text-sm bg-code rounded-md px-1 py-[0.1rem] break-words; + @apply text-sm bg-blue-30 rounded-md px-1 py-[0.1rem] break-words; } .article-content iframe { @@ -280,7 +284,7 @@ code { /* Links */ a > code { - @apply relative bg-transparent underline-offset-2 text-gray-30 before:content-none before:absolute before:top-0 before:right-0 before:bottom-0 before:left-0 before:block before:bg-blue before:opacity-15 before:rounded-[3px]; + @apply relative bg-transparent underline-offset-2 before:content-none before:absolute before:top-0 before:right-0 before:bottom-0 before:left-0 before:block before:bg-blue before:opacity-15 before:rounded-[3px]; } a { diff --git a/src/variables.json b/src/variables.json index b3d7b3ee0..42f59859f 100644 --- a/src/variables.json +++ b/src/variables.json @@ -43,7 +43,7 @@ "partnerParams": ["\"key3\", \"value3\"", "\"key4\", \"value4\""] }, "subscription": { - "appStoreSubscription": ["price, ", "currency ,", "transactionId"], + "appStoreSubscription": ["price, ", "currency, ", "transactionId"], "playStoreSubscription": [ "price, ", "currency, ", From b83177ac4bcf233a57209ccb4e3f5f3b2a9efe47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Mon, 30 Sep 2024 13:31:17 +0200 Subject: [PATCH 39/59] Update dl block style --- src/styles/index.css | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/styles/index.css b/src/styles/index.css index e1840887d..2b06d97ec 100644 --- a/src/styles/index.css +++ b/src/styles/index.css @@ -136,7 +136,8 @@ body { @apply text-inherit text-link-active font-link underline-offset-2; } -.article-content dd a { +.article-content dd a, +.article-content dd code { @apply mx-1; } @@ -148,6 +149,12 @@ blockquote { @apply my-8 py-5 px-6 leading-[1.7] rounded-[0_0.25rem_0.25rem_0] bg-quote border-l-[3px] border-l-gray-40; } +/* Definition */ + +.article-content dl { + @apply bg-zinc-100 rounded-md pt-4 px-4 pb-1 mb-7; +} + /* Tables */ .article-content table { From 4f478cd4b162027aead574997fde10ff84ebfafc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Mon, 30 Sep 2024 13:32:38 +0200 Subject: [PATCH 40/59] Migrate to deflist, add optional loglevel constructor argument --- .../docs/sdk/cocos2dx/v5/configuration.mdoc | 44 ++++++++++++++++--- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/src/content/docs/sdk/cocos2dx/v5/configuration.mdoc b/src/content/docs/sdk/cocos2dx/v5/configuration.mdoc index 52a162074..184f2d08a 100644 --- a/src/content/docs/sdk/cocos2dx/v5/configuration.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/configuration.mdoc @@ -22,9 +22,23 @@ To configure the Adjust SDK, you need to instantiate an `AdjustConfig2dx` object To instantiate your config object, create a new `AdjustConfig2dx` instance and pass the following parameters: -- `appToken` (`std::string`): Your [Adjust app token](https://help.adjust.com/en/article/app-token-and-reporting-currency#view-your-app-details). -- `environment` (`std::string`): The environment you want to run the SDK in. Pass `AdjustEnvironmentSandbox2dx` to run the SDK in sandbox mode for testing. Pass `AdjustEnvironmentProduction2dx` to run the SDK in production mode for release. -- `allowSuppressLogLevel` (`bool`): Whether to suppress all logging. Set to `true` to suppress logging or `false` to enable logging. +{% deflist %} +`appToken` (`std::string`) + +: Your [Adjust app token](https://help.adjust.com/en/article/app-token-and-reporting-currency#view-your-app-details). + +`environment` (`std::string`) + +: The environment you want to run the SDK in. Pass `AdjustEnvironmentSandbox2dx` to run the SDK in sandbox mode for testing. Pass `AdjustEnvironmentProduction2dx` to run the SDK in production mode for release. +{% /deflist %} + +You can also pass the following optional parameter: + +{% deflist %} +`allowSuppressLogLevel` (`bool`) + +: Whether to suppress all logging. Set to `true` to suppress logging or `false` to enable logging. +{% /deflist %} ```cpp #include "Adjust/Adjust2dx.h" @@ -56,7 +70,11 @@ The Adjust SDK provides configurable log levels to return different amounts of i You can set your log level by calling the `setLogLevel` method on your `AdjustConfig2dx` instance with the following parameter: -- `logLevel` (`ADJLogLevel2dx`): The log level you want to use. +{% deflist %} +`logLevel` (`ADJLogLevel2dx`) + +: The log level you want to use. +{% /deflist %} ```cpp std::string appToken = "{% $variables.config.token %}"; @@ -77,7 +95,11 @@ An external device identifier is a custom value that you can assign to a device You can use an external device ID as a custom identifier for a device. This helps you keep continuity with your other systems. You can set property calling the `setExternalDeviceId` method with the following parameter: -- `externalDeviceId` (`std::string`): Your external device identifier. This value is **case sensitive**. If you have imported external device IDs, make sure the value you pass matches the imported value. +{% deflist %} +`externalDeviceId` (`std::string`) + +: Your external device identifier. This value is **case sensitive**. If you have imported external device IDs, make sure the value you pass matches the imported value. +{% /deflist %} ```cpp AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); @@ -93,7 +115,11 @@ You can import existing external device IDs into Adjust. This ensures that the A You can configure a default link token if your app is preinstalled on a device. When a user opens the preinstalled app for the first time, the install is attributed to the default link token. To set your default link token, call the `setDefaultTracker` method of your `AdjustConfig2dx` instance with the following argument: -- `defaultTracker` (`std::string`): The [Adjust link token](https://help.adjust.com/en/article/links#adjust-link-token) you want to record preinstalled installs against. +{% deflist %} +`defaultTracker` (`std::string`) + +: The [Adjust link token](https://help.adjust.com/en/article/links#adjust-link-token) you want to record preinstalled installs against. +{% /deflist %} ```cpp AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); @@ -155,7 +181,11 @@ Push tokens are used for [Audiences](https://help.adjust.com/en/article/audience You can update your push token at any time by calling the `Adjust2dx::setPushToken` method with the following argument: -- `pushtoken` (`std::string`): Your push token. +{% deflist %} +`pushtoken` (`std::string`) + +: Your push token. +{% /deflist %} ```cpp Adjust2dx::setPushToken("push-token"); From 029fb5096711465aef85838cab4a3186d9e39b91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Mon, 30 Sep 2024 13:48:38 +0200 Subject: [PATCH 41/59] Fix up definition lists --- .../docs/sdk/cocos2dx/v5/configuration.mdoc | 5 ++++- .../sdk/cocos2dx/v5/features/privacy.mdoc | 10 ++++++++-- src/content/docs/sdk/cocos2dx/v5/index.mdoc | 20 +++++++++++++++---- src/styles/index.css | 8 +++++++- 4 files changed, 35 insertions(+), 8 deletions(-) diff --git a/src/content/docs/sdk/cocos2dx/v5/configuration.mdoc b/src/content/docs/sdk/cocos2dx/v5/configuration.mdoc index 184f2d08a..8eed27ec7 100644 --- a/src/content/docs/sdk/cocos2dx/v5/configuration.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/configuration.mdoc @@ -29,7 +29,10 @@ To instantiate your config object, create a new `AdjustConfig2dx` instance and p `environment` (`std::string`) -: The environment you want to run the SDK in. Pass `AdjustEnvironmentSandbox2dx` to run the SDK in sandbox mode for testing. Pass `AdjustEnvironmentProduction2dx` to run the SDK in production mode for release. +: The environment you want to run the SDK in. + +- Pass `AdjustEnvironmentSandbox2dx` to run the SDK in sandbox mode for testing. +- Pass `AdjustEnvironmentProduction2dx` to run the SDK in production mode for release. {% /deflist %} You can also pass the following optional parameter: diff --git a/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc index 749efd839..8622509f6 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc @@ -89,7 +89,10 @@ To instantiate a third party sharing object, create a new `AdjustThirdPartyShari {% deflist %} `isEnabled` (`bool`) -: Whether third party sharing is enabled. Pass `true` to enable third party sharing. Pass `false` to disable third party sharing. +: Whether third party sharing is enabled. + +- Pass `true` to enable third party sharing. +- Pass `false` to disable third party sharing. {% /deflist %} ```cpp @@ -141,7 +144,10 @@ If you want to share metrics only with specific partners, or you want to configu `value` (`bool`) -: Pass `false` to stop sharing a metric with the specified partner or `true` to resume sharing. +: Whether to share the metric with the specified spartner. + +- Pass `false` to stop sharing the metric. +- Pass `true` to resume sharing the metric. {% /deflist %} To share only specific metrics with a partner, you MUST: diff --git a/src/content/docs/sdk/cocos2dx/v5/index.mdoc b/src/content/docs/sdk/cocos2dx/v5/index.mdoc index 1390a5bbb..5ea363d1d 100644 --- a/src/content/docs/sdk/cocos2dx/v5/index.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/index.mdoc @@ -92,7 +92,7 @@ Once you've extracted the release archive, follow these steps to add the Adjust Classes/Adjust/AdjustDeeplink2dx.h Classes/Adjust/AdjustPurchaseVerificationResult2dx.h ) - ``` + ``` ## 3. Configure Android settings {% #android-settings %} @@ -197,11 +197,23 @@ Signature protection is inactive by default. To enable it, you need to: Once you've updated your project settings, you can integrate the Adjust SDK into your app. To do this: 1. Find your application delegate file in the **Project Navigator** and open it. + 1. Include the `Adjust/Adjust2dx.h` class at the top of the file. + 1. Instantiate an `AdjustConfig2dx` object with the following arguments: - - `appToken`: Your Adjust app token - - `environment`: `AdjustEnvironmentSandbox2dx` + + {% deflist %} + `appToken` + + : Your Adjust app token + + `environment` + + : Pass `AdjustEnvironmentSandbox2dx` to test your app in a sandbox environment. + {% /deflist %} + 1. Optionally adjust your [logging level](/en/sdk/cocos2dx/configuration#set-your-logging-level) to adjust the verbosity of your logging. + 1. Call the `Adjust2dx::initSdk` method and pass your `AdjustConfig2dx` instance as an argument as soon as possible after the app is launched. {% callout type="important" %} @@ -219,7 +231,7 @@ adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose); Adjust2dx::initSdk(adjustConfig); ``` -## 7. Build your app +## 7. Build your app {% #build-your-app %} Well done! You should now be able to build and run your Cocos2d-x app. Enable logging to check for any issues. Check your logs to see the `Install tracked` message. diff --git a/src/styles/index.css b/src/styles/index.css index 2b06d97ec..272b08f22 100644 --- a/src/styles/index.css +++ b/src/styles/index.css @@ -137,7 +137,9 @@ body { } .article-content dd a, -.article-content dd code { +.article-content dd code:not(a > code), +.article-content li a, +.article-content li code { @apply mx-1; } @@ -155,6 +157,10 @@ blockquote { @apply bg-zinc-100 rounded-md pt-4 px-4 pb-1 mb-7; } +.article-content li > dl { + @apply mt-7 ml-4; +} + /* Tables */ .article-content table { From 2a2669a5340eea3f7e00a673f24102bf9b752d90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Mon, 30 Sep 2024 14:43:42 +0200 Subject: [PATCH 42/59] Add FB Meta Install Referrer information --- src/content/docs/sdk/cocos2dx/v5/index.mdoc | 27 +++++++++++++++++++++ src/variables.json | 3 ++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/content/docs/sdk/cocos2dx/v5/index.mdoc b/src/content/docs/sdk/cocos2dx/v5/index.mdoc index 5ea363d1d..3f9aa07f1 100644 --- a/src/content/docs/sdk/cocos2dx/v5/index.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/index.mdoc @@ -151,6 +151,33 @@ To support the [Google Play Referrer API](https://developer.android.com/google/p } ``` +#### Meta Install Referrer + +To add support for the [Meta Install Referrer](https://developers.facebook.com/docs/app-ads/meta-install-referrer), follow these steps: + +1. Install the Adjust Android Meta Referrer plugin by adding the following dependency to your `build.gradle` file: + + ```groovy + dependencies { + implementation 'com.adjust.sdk:adjust-android-meta-referrer:{% $versions.android.v5 %}' + } + ``` + +1. Find your Meta app ID in your [Meta app dashboard](https://developers.facebook.com/apps). + +1. Call the `setFbAppId` method on your `AdjustConfig2dx` instance with your Meta App ID as an argument. + + ```cpp + #include "Adjust/Adjust2dx.h" + + std::string appToken = "{% $variables.config.token %}"; + std::string environment = AdjustEnvironmentSandbox2dx; + + AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); + adjustConfig.setFbAppId("{% $variables.config.fbAppId %}"); + Adjust2dx::initSdk(adjustConfig); + ``` + ## 4. Configure iOS settings {% #ios-settings %} To support iOS devices, you need to add the `Adjust.xcframework` framework to your project. To do this, specify which version you want to download in your `Podfile`: diff --git a/src/variables.json b/src/variables.json index 42f59859f..c103b7175 100644 --- a/src/variables.json +++ b/src/variables.json @@ -3,7 +3,8 @@ "token": "{YOUR_APP_TOKEN}", "externalDeviceId": "1a42b171-faa5-46da-b5ae-6f4be6d05167", "defaultLink": "abc123", - "attWaitingInterval": "30" + "attWaitingInterval": "30", + "fbAppId": "{YOUR_FB_APP_ID}" }, "ids": { "gps_adid": "5962dfc1-3a53-4692-850b-22c4bf4311a5", From 6915a2d6f9b97999fc9d48ba0aa692aa4e0085e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Mon, 30 Sep 2024 15:33:09 +0200 Subject: [PATCH 43/59] Add more explicit code examples --- .../cocos2dx/v5/features/subscriptions.mdoc | 154 +++++++++++++----- src/variables.json | 29 ++-- 2 files changed, 130 insertions(+), 53 deletions(-) diff --git a/src/content/docs/sdk/cocos2dx/v5/features/subscriptions.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/subscriptions.mdoc index 2677946e7..46dd4575b 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/subscriptions.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/subscriptions.mdoc @@ -47,7 +47,11 @@ Instantiate an `AdjustAppStoreSubscription2dx` object with the following argumen {% /deflist %} ```cpp -AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx({% $variables.subscription.appStoreSubscription %}); +AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx( + {% $variables.subscription.appStoreSubscription.price %}, // price + {% $variables.subscription.appStoreSubscription.currency %}, // currency + {% $variables.subscription.appStoreSubscription.transactionId %} // transactionId +); ``` ### Record the purchase date {% #record-the-purchase-date-app-store %} @@ -63,8 +67,12 @@ Call the `setTransactionDate` method on your subscription object to record the t {% /deflist %} ```cpp -AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx({% $variables.subscription.appStoreSubscription %}); -subscription.setTransactionDate(transactionDate); +AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx( + {% $variables.subscription.appStoreSubscription.price %}, // price + {% $variables.subscription.appStoreSubscription.currency %}, // currency + {% $variables.subscription.appStoreSubscription.transactionId %} // transactionId +); +subscription.setTransactionDate({% $variables.subscription.appStoreSubscription.transactionDate %}); ``` ### Record the purchase region {% #record-the-purchase-region %} @@ -78,8 +86,12 @@ You can record the region in which the user purchased a subscription. To do this {% /deflist %} ```cpp -AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx({% $variables.subscription.appStoreSubscription %}); -subscription.setSalesRegion(salesRegion); +AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx( + {% $variables.subscription.appStoreSubscription.price %}, // price + {% $variables.subscription.appStoreSubscription.currency %}, // currency + {% $variables.subscription.appStoreSubscription.transactionId %} // transactionId +); +subscription.setSalesRegion({% $variables.subscription.appStoreSubscription.salesRegion %}); ``` ### Add callback parameters {% #add-callback-parameters-app-store %} @@ -87,9 +99,13 @@ subscription.setSalesRegion(salesRegion); 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. ```cpp -AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx({% $variables.subscription.appStoreSubscription %}); -subscription.addCallbackParameter("{% $variables.subscription.key1 %}"); -subscription.addCallbackParameter("{% $variables.subscription.key2 %}"); +AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx( + {% $variables.subscription.appStoreSubscription.price %}, // price + {% $variables.subscription.appStoreSubscription.currency %}, // currency + {% $variables.subscription.appStoreSubscription.transactionId %} // transactionId +); +subscription.addCallbackParameter({% $variables.subscription.key1 %}); +subscription.addCallbackParameter({% $variables.subscription.key2 %}); ``` ### Add partner parameters {% #add-partner-parameters-app-store %} @@ -97,9 +113,13 @@ subscription.addCallbackParameter("{% $variables.subscription.key2 %}"); 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. ```cpp -AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx({% $variables.subscription.appStoreSubscription %}); -subscription.addPartnerParameter("{% $variables.subscription.key1 %}"); -subscription.addPartnerParameter("{% $variables.subscription.key2 %}"); +AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx( + {% $variables.subscription.appStoreSubscription.price %}, // price + {% $variables.subscription.appStoreSubscription.currency %}, // currency + {% $variables.subscription.appStoreSubscription.transactionId %} // transactionId +); +subscription.addPartnerParameter({% $variables.subscription.key1 %}); +subscription.addPartnerParameter({% $variables.subscription.key2 %}); ``` ### App Store subscription tutorial {% #tutorial-app-store %} @@ -113,11 +133,15 @@ This tutorial demonstrates how to use the `AdjustAppStoreSubscription2dx` and `A To send subscription information to Adjust, follow these steps: -1. Instantiate and populate an `AdjustAppStoreSubscription2dx` object with the `price`, `currency`, and `transactionId`. In the example below, the following properties are set: - - The transaction date is set to _txn\_20230918T123456Z_ - - The sales region is set to _US_. - - The callback parameters are set to _"key", "value"_ and _"foo", "bar"_. - - The partner parameters are set to _"key", "value"_ and _"foo", "bar"_. +1. Instantiate and populate an `AdjustAppStoreSubscription2dx` object with the `price`, `currency`, and `transactionId`. In the example below, the following values are used: + - The `price` is _{% $variables.subscription.appStoreSubscription.price %}_. + - The `currency` is _{% $variables.subscription.appStoreSubscription.currency %}_. + - The `transactionId` is _{% $variables.subscription.appStoreSubscription.transactionId %}_ +1. In the example below, the following properties are set: + - The transaction date is set to _{% $variables.subscription.appStoreSubscription.transactionDate %}_ + - The sales region is set to _{% $variables.subscription.appStoreSubscription.salesRegion %}_. + - The callback parameters are set to _{% $variables.subscription.key1 %}_ and _{% $variables.subscription.key2 %}_. + - The partner parameters are set to _{% $variables.subscription.key1 %}_ and _{% $variables.subscription.key2 %}_. 1. At the end of your function, send the information to Adjust by calling `trackAppStoreSubscription` with your `AdjustAppStoreSubscription2dx` instance as an argument. ```cpp @@ -129,13 +153,17 @@ std::string environment = AdjustEnvironmentSandbox2dx; AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); Adjust2dx::initSdk(adjustConfig); -AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx({% $variables.subscription.appStoreSubscription %}); -subscription.setTransactionDate(transactionDate); -subscription.setSalesRegion(salesRegion); -subscription.addCallbackParameter("{% $variables.subscription.key1 %}"); -subscription.addCallbackParameter("{% $variables.subscription.key2 %}"); -subscription.addPartnerParameter("{% $variables.subscription.key1 %}"); -subscription.addPartnerParameter("{% $variables.subscription.key2 %}"); +AdjustAppStoreSubscription2dx subscription = AdjustAppStoreSubscription2dx( + {% $variables.subscription.appStoreSubscription.price %}, // price + {% $variables.subscription.appStoreSubscription.currency %}, // currency + {% $variables.subscription.appStoreSubscription.transactionId %} // transactionId +); +subscription.setTransactionDate({% $variables.subscription.appStoreSubscription.transactionDate%}); +subscription.setSalesRegion({% $variables.subscription.appStoreSubscription.salesRegion %}); +subscription.addCallbackParameter({% $variables.subscription.key1 %}); +subscription.addCallbackParameter({% $variables.subscription.key2 %}); +subscription.addPartnerParameter({% $variables.subscription.key1 %}); +subscription.addPartnerParameter({% $variables.subscription.key2 %}); Adjust2dx::trackAppStoreSubscription(subscription); ``` @@ -176,7 +204,14 @@ Instantiate an `AdjustPlayStoreSubscription2dx` object with the following argume {% /deflist %} ```cpp -AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx({% $variables.subscription.playStoreSubscription %}); +AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx( + {% $variables.subscription.playStoreSubscription.price %}, // price + {% $variables.subscription.playStoreSubscription.currency %}, // currency + {% $variables.subscription.playStoreSubscription.sku %}, // sku + {% $variables.subscription.playStoreSubscription.orderId %}, // orderId + {% $variables.subscription.playStoreSubscription.signature %}, // signature + {% $variables.subscription.playStoreSubscription.purchaseToken %} // purchaseToken +); ``` ### Record the purchase date {% #record-the-purchase-date-play-store %} @@ -192,8 +227,15 @@ Call the `setPurchaseTime` method on your subscription object to record the time {% /deflist %} ```cpp -AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx({% $variables.subscription.playStoreSubscription %}); -subscription.setPurchaseTime(purchaseTime); +AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx( + {% $variables.subscription.playStoreSubscription.price %}, // price + {% $variables.subscription.playStoreSubscription.currency %}, // currency + {% $variables.subscription.playStoreSubscription.sku %}, // sku + {% $variables.subscription.playStoreSubscription.orderId %}, // orderId + {% $variables.subscription.playStoreSubscription.signature %}, // signature + {% $variables.subscription.playStoreSubscription.purchaseToken %} // purchaseToken +); +subscription.setPurchaseTime({% $variables.subscription.playStoreSubscription.purchaseTime%}); ``` ### Add callback parameters {% #add-callback-parameters-play-store %} @@ -201,9 +243,16 @@ subscription.setPurchaseTime(purchaseTime); 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. ```cpp -AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx({% $variables.subscription.playStoreSubscription %}); -subscription.addCallbackParameter("{% $variables.subscription.key1 %}"); -subscription.addCallbackParameter("{% $variables.subscription.key2 %}"); +AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx( + {% $variables.subscription.playStoreSubscription.price %}, // price + {% $variables.subscription.playStoreSubscription.currency %}, // currency + {% $variables.subscription.playStoreSubscription.sku %}, // sku + {% $variables.subscription.playStoreSubscription.orderId %}, // orderId + {% $variables.subscription.playStoreSubscription.signature %}, // signature + {% $variables.subscription.playStoreSubscription.purchaseToken %} // purchaseToken +); +subscription.addCallbackParameter({% $variables.subscription.key1 %}); +subscription.addCallbackParameter({% $variables.subscription.key2 %}); ``` ### Add partner parameters {% #add-partner-parameters-play-store %} @@ -211,9 +260,16 @@ subscription.addCallbackParameter("{% $variables.subscription.key2 %}"); 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. ```cpp -AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx({% $variables.subscription.playStoreSubscription %}); -subscription.addPartnerParameter("{% $variables.subscription.key1 %}"); -subscription.addPartnerParameter("{% $variables.subscription.key2 %}"); +AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx( + {% $variables.subscription.playStoreSubscription.price %}, // price + {% $variables.subscription.playStoreSubscription.currency %}, // currency + {% $variables.subscription.playStoreSubscription.sku %}, // sku + {% $variables.subscription.playStoreSubscription.orderId %}, // orderId + {% $variables.subscription.playStoreSubscription.signature %}, // signature + {% $variables.subscription.playStoreSubscription.purchaseToken %} // purchaseToken +); +subscription.addPartnerParameter({% $variables.subscription.key1 %}); +subscription.addPartnerParameter({% $variables.subscription.key2 %}); ``` ### Play Store subscription tutorial {% #tutorial-play-store %} @@ -227,10 +283,17 @@ This tutorial demonstrates how to use the `AdjustAppStoreSubscription2dx` and `A To send subscription information to Adjust, follow these steps: -1. Instantiate and populate an `AdjustPlayStoreSubscription2dx` object with the `price`, `currency`, `sku`, `orderId`, `signature`, `purchaseToken`. In the example below, the following properties are set: - - The purchase time is set to _txn\_20230918T123456Z_ - - The callback parameters are set to _"key", "value"_ and _"foo", "bar"_. - - The partner parameters are set to _"key", "value"_ and _"foo", "bar"_. +1. Instantiate and populate an `AdjustPlayStoreSubscription2dx` object with the `price`, `currency`, `sku`, `orderId`, `signature`, `purchaseToken`. In the example below, the following values are used: + - The `price` is _{% $variables.subscription.playStoreSubscription.price %}_. + - The `currency` is _{% $variables.subscription.playStoreSubscription.currency %}_. + - The `sku` is _{% $variables.subscription.playStoreSubscription.sku %}_. + - The `orderId` is _{% $variables.subscription.playStoreSubscription.orderId %}_. + - The `signature` is _{% $variables.subscription.playStoreSubscription.signature %}_. + - The `purchaseToken` is _{% $variables.subscription.playStoreSubscription.purchaseToken %}_. +1. In the example below, the following properties are set: + - The purchase time is set to _{% $variables.subscription.playStoreSubscription.purchaseTime %}_ + - The callback parameters are set to _{% $variables.subscription.key1 %}_ and _{% $variables.subscription.key2 %}_. + - The partner parameters are set to _{% $variables.subscription.key1 %}_ and _{% $variables.subscription.key2 %}_. 1. At the end of your function, send the information to Adjust by calling `trackPlayStoreSubscription` with your `AdjustAppStoreSubscription2dx` instance as an argument. ```cpp @@ -242,11 +305,18 @@ std::string environment = AdjustEnvironmentSandbox2dx; AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); Adjust2dx::initSdk(adjustConfig); -AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx({% $variables.subscription.playStoreSubscription %}); -subscription.setPurchaseTime(purchaseTime); -subscription.addCallbackParameter("{% $variables.subscription.key1 %}"); -subscription.addCallbackParameter("{% $variables.subscription.key2 %}"); -subscription.addPartnerParameter("{% $variables.subscription.key1 %}"); -subscription.addPartnerParameter("{% $variables.subscription.key2 %}"); +AdjustPlayStoreSubscription2dx subscription = AdjustPlayStoreSubscription2dx( + {% $variables.subscription.playStoreSubscription.price %}, // price + {% $variables.subscription.playStoreSubscription.currency %}, // currency + {% $variables.subscription.playStoreSubscription.sku %}, // sku + {% $variables.subscription.playStoreSubscription.orderId %}, // orderId + {% $variables.subscription.playStoreSubscription.signature %}, // signature + {% $variables.subscription.playStoreSubscription.purchaseToken %} // purchaseToken +); +subscription.setPurchaseTime({% $variables.subscription.playStoreSubscription.purchaseTime%}); +subscription.addCallbackParameter({% $variables.subscription.key1 %}); +subscription.addCallbackParameter({% $variables.subscription.key2 %}); +subscription.addPartnerParameter({% $variables.subscription.key1 %}); +subscription.addPartnerParameter({% $variables.subscription.key2 %}); Adjust2dx::trackPlayStoreSubscription(subscription); ``` diff --git a/src/variables.json b/src/variables.json index c103b7175..7878b0131 100644 --- a/src/variables.json +++ b/src/variables.json @@ -44,16 +44,23 @@ "partnerParams": ["\"key3\", \"value3\"", "\"key4\", \"value4\""] }, "subscription": { - "appStoreSubscription": ["price, ", "currency, ", "transactionId"], - "playStoreSubscription": [ - "price, ", - "currency, ", - "sku, ", - "orderId, ", - "signature, ", - "purchaseToken" - ], - "key1": ["key\", ", "\"value"], - "key2": ["foo\", ", "\"bar"] + "appStoreSubscription": { + "price": "\"1.00\"", + "currency": "\"EUR\"", + "transactionId": "\"44da840e-3f70-4bc0-95d2-4b9638e1d7eb\"", + "salesRegion": "\"US\"", + "transactionDate": "\"txn_20230918T123456Z\"" + }, + "playStoreSubscription": { + "price": "\"1.00\"", + "currency": "\"EUR\"", + "sku": "\"47411084-12dd-41f6-9e4b-2c59e380945e\"", + "orderId": "\"63469457-d777-4698-9957-f07a3d14c7bf\"", + "signature": "\"1c37d91e-a3e6-4236-90a7-86c69051fc39\"", + "purchaseToken": "\"4afa8869-0dc6-43ff-be28-d07d454cb357\"", + "purchaseTime": "\"txn_20230918T123456Z\"" + }, + "key1": ["\"key\", ", "\"value\""], + "key2": ["\"foo\", ", "\"bar\""] } } From 072cdad4c877c6aa70c9ba687edf0d66d927a724 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Mon, 30 Sep 2024 15:33:16 +0200 Subject: [PATCH 44/59] Update vale settings --- .github/styles/Microsoft/HeadingAcronyms.yml | 2 ++ .../config/vocabularies/Adjust/accept.txt | 11 ++++++++++ .vale.ini | 3 +++ .../sdk/cocos2dx/v5/features/attribution.mdoc | 22 +++++++++---------- .../sdk/cocos2dx/v5/features/callbacks.mdoc | 20 ++++++++--------- src/content/docs/sdk/cocos2dx/v5/index.mdoc | 2 +- 6 files changed, 38 insertions(+), 22 deletions(-) create mode 100644 .github/styles/config/vocabularies/Adjust/accept.txt diff --git a/.github/styles/Microsoft/HeadingAcronyms.yml b/.github/styles/Microsoft/HeadingAcronyms.yml index 6674d3e80..64a25536b 100644 --- a/.github/styles/Microsoft/HeadingAcronyms.yml +++ b/.github/styles/Microsoft/HeadingAcronyms.yml @@ -24,3 +24,5 @@ exceptions: - AAR - CPU - IDE + - SKAN + - SKAD diff --git a/.github/styles/config/vocabularies/Adjust/accept.txt b/.github/styles/config/vocabularies/Adjust/accept.txt new file mode 100644 index 000000000..d8afa6e1e --- /dev/null +++ b/.github/styles/config/vocabularies/Adjust/accept.txt @@ -0,0 +1,11 @@ +MUST +MUST NOT +REQUIRED +SHALL +SHALL NOT +SHOULD +SHOULD NOT +RECOMMENDED +NOT RECOMMENDED +MAY +OPTIONAL diff --git a/.vale.ini b/.vale.ini index 34f9e2018..2653af741 100644 --- a/.vale.ini +++ b/.vale.ini @@ -3,9 +3,12 @@ IgnoredScopes = code, tt, img, url, a SkippedScopes = script, style, pre, figure, code MinAlertLevel = warning # suggestion, warning or error +Vocab = Adjust + # Force Vale to treat MDX files as markdown [formats] mdx = md +mdoc = md # Only Markdown and .txt files; change to whatever you're using. [*.md] diff --git a/src/content/docs/sdk/cocos2dx/v5/features/attribution.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/attribution.mdoc index 35aca0474..102fdfeec 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/attribution.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/attribution.mdoc @@ -28,17 +28,17 @@ The following values can only be accessed if you have [called the `enableCostDat | Values | Data type | Description | | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | -| `trackerToken` | `std::string` | The token of the tracker to which the device is currently attributed | -| `trackerName` | `std::string` | The name of the tracker to which the device is currently attributed | -| `network` | `std::string` | The name of the network to which the device is currently attributed | -| `campaign` | `std::string` | The name of the campaign to which the device is currently attributed | -| `adgroup` | `std::string` | The name of the adgroup to which the device is currently attributed | -| `creative` | `std::string` | The name of the creative to which the device is currently attributed | -| `clickLabel` | `std::string` | The [click label](https://help.adjust.com/en/article/user-rewards) that the install is tagged with | -| `costType` | `std::string` | The campaign pricing model (for example cpi) | -| `costAmount` | `double` | The cost of the install. | -| `costCurrency` | `std::string` | The [3 character ISO 4217 code](https://www.iban.com/currency-codes) of the currency associated with the cost. | -| `fbInstallReferrer` | `std::string` | The [Facebook install referrer](https://developers.facebook.com/docs/app-ads/install-referrer/). | +| `trackerToken` | `std::string` | The token of the tracker to which the device is currently attributed | +| `trackerName` | `std::string` | The name of the tracker to which the device is currently attributed | +| `network` | `std::string` | The name of the network to which the device is currently attributed | +| `campaign` | `std::string` | The name of the campaign to which the device is currently attributed | +| `adgroup` | `std::string` | The name of the adgroup to which the device is currently attributed | +| `creative` | `std::string` | The name of the creative to which the device is currently attributed | +| `clickLabel` | `std::string` | The [click label](https://help.adjust.com/en/article/user-rewards) that the install is tagged with | +| `costType` | `std::string` | The campaign pricing model (for example cpi) | +| `costAmount` | `double` | The cost of the install. | +| `costCurrency` | `std::string` | The [3 character ISO 4217 code](https://www.iban.com/currency-codes) of the currency associated with the cost. | +| `fbInstallReferrer` | `std::string` | The [Facebook install referrer](https://developers.facebook.com/docs/app-ads/install-referrer/). | ## Configure an attribution callback function {% #configure-an-attribution-callback-function %} diff --git a/src/content/docs/sdk/cocos2dx/v5/features/callbacks.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/callbacks.mdoc index 131abb04e..9281d5cee 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/callbacks.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/callbacks.mdoc @@ -22,10 +22,10 @@ Session callbacks have access to a response data object. You can use its propert | Property | Type | Description | | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `message` | `std::string` | The message from the server or the error logged by the SDK. | -| `timestamp` | `std::string` | The timestamp from Adjust's servers. | -| `adid` | `std::string` | A unique device identifier provided by Adjust. | -| `jsonResponse` | `std::string` | The JSON object with the response from the server. | +| `message` | `std::string` | The message from the server or the error logged by the SDK. | +| `timestamp` | `std::string` | The timestamp from Adjust's servers. | +| `adid` | `std::string` | A unique device identifier provided by Adjust. | +| `jsonResponse` | `std::string` | The JSON object with the response from the server. | | `willRetry` | `bool` | Indicates whether there will be an attempt to resend a failed package. Available only on failure callbacks. | ### Success callbacks {% #session-success-callbacks %} @@ -68,12 +68,12 @@ Event callbacks have access to a response data object. You can use its propertie | Property | Type | Description | | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `message` | `std::string` | The message from the server or the error logged by the SDK. | -| `timestamp` | `std::string` | The timestamp from Adjust's servers. | -| `adid` | `std::string` | A unique device identifier provided by Adjust. | -| `eventToken` | `std::string` | The event token | -| `callbackId` | `std::string` | The custom callback ID set on the event object | -| `jsonResponse` | `std::string` | The JSON object with the response from the server. | +| `message` | `std::string` | The message from the server or the error logged by the SDK. | +| `timestamp` | `std::string` | The timestamp from Adjust's servers. | +| `adid` | `std::string` | A unique device identifier provided by Adjust. | +| `eventToken` | `std::string` | The event token | +| `callbackId` | `std::string` | The custom callback ID set on the event object | +| `jsonResponse` | `std::string` | The JSON object with the response from the server. | | `willRetry` | `bool` | Indicates whether there will be an attempt to resend a failed package. Only available on failure callbacks. | ### Success callbacks {% #event-success-callbacks %} diff --git a/src/content/docs/sdk/cocos2dx/v5/index.mdoc b/src/content/docs/sdk/cocos2dx/v5/index.mdoc index 3f9aa07f1..067807d85 100644 --- a/src/content/docs/sdk/cocos2dx/v5/index.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/index.mdoc @@ -208,7 +208,7 @@ If you don't use Cocoapods, you can install the framework manually by fetching i ### Copy additional source files -To complete iOS setup, you MUST copy all Objective-C++ (`.h` and `.mm`) files to your Xcode project alongside the Cocos2d-x C++ files. Ensure that all `.mm` files are listed in the **Build Phases —> Compile Sources** section. +To complete iOS setup, you MUST copy all Objective-C++ (`.h` and `.mm`) files to your Xcode project alongside the Cocos2d-x C++ files. Ensure that all `.mm` files are listed in the **Build Phases --> Compile Sources** section. ## 5. Set up SDK Signature {% #set-up-sdk-signature %} From b909c3d19090d0d1d07aca3cfd331ad537aef3d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Mon, 30 Sep 2024 15:36:13 +0200 Subject: [PATCH 45/59] Apply suggestion from review --- src/content/docs/sdk/cocos2dx/v5/features/events.mdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/sdk/cocos2dx/v5/features/events.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/events.mdoc index bc841383e..a8d38ee8c 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/events.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/events.mdoc @@ -177,7 +177,7 @@ std::string environment = AdjustEnvironmentSandbox2dx; AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); Adjust2dx::initSdk(adjustConfig); -AdjustEvent2dx adjustEvent = new AdjustEvent2dx("g3mfiw"); +AdjustEvent2dx adjustEvent = AdjustEvent2dx("g3mfiw"); adjustEvent.setRevenue({% $variables.event.revenue.amount %}, "{% $variables.event.revenue.currency %}"); adjustEvent.setDeduplicationId("{% $variables.event.deduplicationId %}"); adjustEvent.addCallbackParameter({% $variables.event.callbackParams[0] %}); From 5dda4a750f879566f980732607eeaa7082759807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Mon, 30 Sep 2024 15:38:36 +0200 Subject: [PATCH 46/59] Add missing types to deflist --- src/content/docs/sdk/cocos2dx/v5/index.mdoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/sdk/cocos2dx/v5/index.mdoc b/src/content/docs/sdk/cocos2dx/v5/index.mdoc index 067807d85..fa93206d4 100644 --- a/src/content/docs/sdk/cocos2dx/v5/index.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/index.mdoc @@ -230,11 +230,11 @@ Once you've updated your project settings, you can integrate the Adjust SDK into 1. Instantiate an `AdjustConfig2dx` object with the following arguments: {% deflist %} - `appToken` + `appToken` (`std::string`) : Your Adjust app token - `environment` + `environment` (`std::string`) : Pass `AdjustEnvironmentSandbox2dx` to test your app in a sandbox environment. {% /deflist %} From a7af93e53903f4decbebf72d5cbb8aa5fdc08ebe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Tue, 1 Oct 2024 11:40:39 +0200 Subject: [PATCH 47/59] Update wording for 3rd party sharing --- src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc index 8622509f6..1958e6554 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc @@ -72,9 +72,7 @@ Adjust2dx::initSdk(adjustConfig); Adjust shares all metrics with all Self-Attributing Networks (SANs) and module partners you've configured for your app by default. You can configure and update your third party sharing settings at any time during the Adjust SDK lifecycle by instantiating an `AdjustThirdPartySharing2dx` object and passing it to `Adjust2dx::trackThirdPartySharing`. -If you initialize the Adjust SDK with `Adjust2dx::initSdk` **before** you configure and send your preferences with `Adjust2dx::trackThirdPartySharing`, your third party sharing options don't apply to your install session. - -Adjust RECOMMENDS you configure third party sharing settings and call `Adjust2dx::trackThirdPartySharing` **before** calling `Adjust2dx::initSdk`. When you do this, the Adjust SDK caches the third party sharing update and sends it before the install session information, ensuring that your settings apply to the install session and all subsequent sessions. +If you configure third party sharing settings and call `Adjust2dx::trackThirdPartySharing` before calling `Adjust2dx::iniSdk`, Adjust will receive the third party sharing settings before the install session. You MUST configure your third party sharing settings before initializing the SDK to do the following: From ece25c7e07915f6fc05cc754ee68418026998e05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Wed, 2 Oct 2024 09:59:17 +0200 Subject: [PATCH 48/59] Fix typo --- src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc index 1958e6554..37d868bbb 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc @@ -72,7 +72,7 @@ Adjust2dx::initSdk(adjustConfig); Adjust shares all metrics with all Self-Attributing Networks (SANs) and module partners you've configured for your app by default. You can configure and update your third party sharing settings at any time during the Adjust SDK lifecycle by instantiating an `AdjustThirdPartySharing2dx` object and passing it to `Adjust2dx::trackThirdPartySharing`. -If you configure third party sharing settings and call `Adjust2dx::trackThirdPartySharing` before calling `Adjust2dx::iniSdk`, Adjust will receive the third party sharing settings before the install session. +If you configure third party sharing settings and call `Adjust2dx::trackThirdPartySharing` before calling `Adjust2dx::initSdk`, Adjust will receive the third party sharing settings before the install session. You MUST configure your third party sharing settings before initializing the SDK to do the following: From 0be931bd17fdc51646ffe14f1d7036265388fde0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Wed, 2 Oct 2024 10:40:30 +0200 Subject: [PATCH 49/59] Add purchase verification doc --- .../v5/features/purchase-verification.mdoc | 205 ++++++++++++++++++ src/variables.json | 3 + 2 files changed, 208 insertions(+) create mode 100644 src/content/docs/sdk/cocos2dx/v5/features/purchase-verification.mdoc diff --git a/src/content/docs/sdk/cocos2dx/v5/features/purchase-verification.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/purchase-verification.mdoc new file mode 100644 index 000000000..45102a564 --- /dev/null +++ b/src/content/docs/sdk/cocos2dx/v5/features/purchase-verification.mdoc @@ -0,0 +1,205 @@ +--- +title: Purchase verification +description: Verify your App Store and Play Store purchases +slug: en/sdk/cocos2dx/features/purchase-verification +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v4: /en/sdk/unity/v4/features/events +--- + +If you've enabled [purchase verification](https://help.adjust.com/en/article/purchase-verification), you can use the Adjust SDK to request purchase verification. There are two ways to verify purchases with the Adjust SDK: + +1. Create an `AdjustEvent2dx` object that represents your purchase and configure purchase properties for the target store. +1. Create an `AdjustAppStorePurchase2dx` (Apple App Store) or `AdjustPlayStorePurchase2dx` (Google Play Store) object representing the purchase. + +{% callout type="tip" %} +If you use revenue events to measure your purchases in Adjust, you should use the `AdjustEvent2dx` class. If you only want to verify a purchase but don't want to associate it with an event, use the `AdjustAppStorePurchase2dx` or `AdjustPlayStorePurchase2dx` class. +{% /callout %} + +When you send purchase information with the Adjust SDK, Adjust does the following: + +1. Sends the information to the relevant store and waits for a status response. +1. Forwards the status response to the Adjust SDK. + +You can access the purchase verification status by using a callback. Results are returned as `AdjustPurchaseVerificationResult2dx` objects containing the following properties: + +{% deflist %} +`verificationStatus` (`std::string`) + +: The status of the purchase. + +`code` (`int`) + +: The status code of the purchase. + +`message` (`std::string`) + +: Any message returned by the store. +{% /deflist %} + +## Verify purchase and record event {% #verify-purchase-and-record-event %} + +To send a revenue event for verification and listen for the purchase verification status, follow these steps. + +### App Store purchases {% #app-store-purchases %} + +1. Instantiate an `AdjustEvent2dx` object with the your event token and set the following parameters: + + {% deflist %} + `productId` (`std::string`) + + : The product identifier of the item that was successfully purchased. + + `transactionId` (`std::string`) + + : The ID of the transaction you want to verify. + {% /deflist %} + +1. Call the `Adjust2dx::verifyAndTrackPlayStorePurchase` method with the following arguments: + + {% deflist %} + `event` (`AdjustEvent2dx`) + + : Your instantiated event object. + + `callback` (`void(*callback)`) + + : A delegate callback function that receives an `AdjustPurchaseVerificationResult2dx` object as an argument. + {% /deflist %} + +In this example, the purchase verification response is output to the logging daemon. + +```cpp +AdjustEvent2dx adjustEvent = AdjustEvent2dx("{% $variables.event.token %}"); +adjustEvent.setRevenue({% $variables.event.revenue.amount %}, "{% $variables.event.revenue.currency %}"); +adjustEvent.setTransactionId("{% $variables.event.transactionId %}"); +adjustEvent.setProductId("{% $variables.event.revenue.productId %}"); +Adjust2dx::verifyAndTrackPlayStorePurchase(adjustEvent, [](AdjustPurchaseVerificationResult2dx verificationResult) { + log("Verification status: %s", verificationResult.verificationStatus); + log("Code: %s", verificationResult.code); + log("Message: %s", verificationResult.message); +}); +``` + +### Play Store purchases {% #play-store-purchases %} + +1. Instantiate an `AdjustEvent2dx` object with the your event token and set the following parameters: + + {% deflist %} + `productId` (`std::string`) + + : The ID of the product that has been purchased. + + `purchaseToken` (`std::string`) + + : The purchase token associated with the purchase. + {% /deflist %} + +1. Call the `Adjust::verifyAndTrackPlayStorePurchase` method with the following arguments: + + {% deflist %} + `event` (`AdjustEvent2dx`) + + : Your instantiated event object. + + `callback` (`void(*callback)`) + + : A delegate callback function that receives an `AdjustPurchaseVerificationResult2dx` object as an argument. + {% /deflist %} + +In this example, the purchase verification response is output to the logging daemon. + +```cpp +AdjustEvent2dx adjustEvent = AdjustEvent("{% $variables.event.token %}"); +adjustEvent.setRevenue({% $variables.event.revenue.amount %}, "{% $variables.event.revenue.currency %}"); +adjustEvent.setProductId("{% $variables.event.productId %}"); +adjustEvent.setPurchaseToken("{% $variables.event.revenue.purchaseToken %}"); +Adjust2dx::verifyAndTrackPlayStorePurchase(adjustEvent, [](AdjustPurchaseVerificationResult2dx verificationResult) { + log("Verification status: %s", verificationResult.verificationStatus); + log("Code: %s", verificationResult.code); + log("Message: %s", verificationResult.message); +}); +``` + +## Only verify purchase {% #only-verify-purchase %} + +To send standalone purchase information and listen for the purchase verification status, follow these steps: + +### App Store purchases {% #app-store-only-verify %} + +1. Instantiate an `AdjustAppStorePurchase2dx` object with the following arguments: + + {% deflist %} + `productId` (`std::string`) + + : The product identifier of the item that was successfully purchased. + + `transactionId` (`std::string`) + + : The ID of the transaction you want to verify. + {% /deflist %} + +1. Call the `Adjust2dx::verifyAppStorePurchase` method with the following arguments: + + {% deflist %} + `purchase` (`AdjustAppStorePurchase2dx`) + + : Your instantiated purchase object. + + `callback` (`void(*callback)`) + + : A delegate callback function that receives an `AdjustPurchaseVerificationResult2dx` object as an argument. + {% /deflist %} + +In this example, the purchase verification response is output to the logging daemon. + +```cpp +AdjustAppStorePurchase2dx purchase = AdjustAppStorePurchase2dx("{% $variables.event.productId %}", "{% $variables.event.transactionId %}"); +Adjust2dx::verifyAppStorePurchase(purchase, [](AdjustPurchaseVerificationResult2dx verificationResult) { + log("Verification status: %s", verificationResult.verificationStatus); + log("Code: %s", verificationResult.code); + log("Message: %s", verificationResult.message); +}); +``` + +### Play Store purchases {% #play-store-only-verify %} + +1. Instantiate an `AdjustPlayStorePurchase2dx` with the following arguments: + + {% deflist %} + `productId` (`std::string`) + + : The ID of the product that has been purchased. + + `purchaseToken` (`std::string`) + + : The purchase token associated with the purchase. + {% /deflist %} + +1. Call the `Adjust2dx::verifyPlayStorePurchase` method with the following arguments: + + {% deflist %} + `purchase` (`AdjustPlayStorePurchase2dx`) + + : Your instantiated purchase object. + + `callback` (`void(*callback)`) + + : A delegate callback function that receives an `AdjustPurchaseVerificationResult2dx` object as an argument. + {% /deflist %} + +In this example, the purchase verification response is output to the logging daemon. + +```cpp +AdjustPlayStorePurchase2dx purchase = AdjustPlayStorePurchase2dx("{% $variables.event.productId %}", "{% $variables.event.purchaseToken %}"); +Adjust2dx::verifyPlayStorePurchase(purchase, [](AdjustPurchaseVerificationResult2dx verificationResult) { + log("Verification status: %s", verificationResult.verificationStatus); + log("Code: %s", verificationResult.code); + log("Message: %s", verificationResult.message); +}); +``` diff --git a/src/variables.json b/src/variables.json index 7878b0131..99a737ffb 100644 --- a/src/variables.json +++ b/src/variables.json @@ -19,6 +19,9 @@ }, "deduplicationId": "5e85484b-1ebc-4141-aab7-25b869e54c49", "callbackId": "f2e728d8-271b-49ab-80ea-27830a215147", + "productId": "58112286-9fc4-4ba3-9aaa-dd5c69be3e49", + "purchaseToken": "07b946ed-4204-4fa0-8424-6c47413a7df3", + "transactionId": "7d9c2e12-b2ea-4be4-96cf-bd90d8f062fb", "callbackParams": [ "\"event_token\", \"g3mfiw\"", "\"revenue_amount\", \"0.25\"" From da365f8fe267f1bce9751767ee84ed7867185b14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Wed, 2 Oct 2024 10:51:49 +0200 Subject: [PATCH 50/59] Add preinstall app guide --- .../cocos2dx/v5/features/preinstalled.mdoc | 120 ++++++++++++++++++ src/variables.json | 4 +- 2 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 src/content/docs/sdk/cocos2dx/v5/features/preinstalled.mdoc diff --git a/src/content/docs/sdk/cocos2dx/v5/features/preinstalled.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/preinstalled.mdoc new file mode 100644 index 000000000..e399bde2c --- /dev/null +++ b/src/content/docs/sdk/cocos2dx/v5/features/preinstalled.mdoc @@ -0,0 +1,120 @@ +--- +title: Send preinstalled app activity +description: Configure a campaign to send information from preinstalled apps. +slug: en/sdk/cocos2dx/features/preinstalled +versions: + - label: v5 + value: v5 + default: true + - label: v4 + value: v4 +redirects: + v4: /en/sdk/cocos2dx/v4 +--- + +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. + +Control whether preinstall measurement is enabled by calling the `setPreinstallTrackingEnabled` method of your `AdjustConfig2dx` instance with a `bool` argument. + +```cpp +#include "Adjust/Adjust2dx.h" + +std::string appToken = "{% $variables.config.token %}"; +std::string environment = AdjustEnvironmentSandbox2dx; + +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); +adjustConfig.setPreinstallTrackingEnabled(true); +Adjust2dx::initSdk(adjustConfig); +``` + +The Adjust SDK provides 5 methods for measuring preinstalled apps: + +- [System Properties](#system-properties). +- [Content provider](#content-provider). +- [System Installer Receiver](#system-installer-receiver). +- [World Readable Directory](#world-readable-directory). +- [Default link token](#default-link-token). + +## System properties {% #system-properties %} + +Original Equipment Manufacturer (OEM) partners can leverage Android system properties to attribute preinstalled apps. The OEM (Original Equipment Manufacturer) 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 {% #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 + +``` + +To access a list of preinstalled apps on the device, add the following to your `AndroidManifest.xml` file. + +```xml + + + + + +``` + +## System installer receiver {% #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 + + + + + +``` + +## World-readable directory {% #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. + +To give the Adjust SDK access to this information, call the `setPreinstallFilePath` method of your `AdjustConfig2dx` instance with the path of your file. + +```cpp +#include "Adjust/Adjust2dx.h" + +std::string appToken = "{% $variables.config.token %}"; +std::string environment = AdjustEnvironmentSandbox2dx; + +AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); +adjustConfig.setPreinstallFilePath("{% $variables.config.preinstallFilePath %}"); +Adjust2dx::initSdk(adjustConfig); +``` + +## Default link token {% #default-link-token %} + +Configuring a default link token enables you to attribute all preinstalls to a predefined Adjust link. Adjust records all information against this token until the attribution source changes. To set this up: + +1. [Create a new campaign link in Campaign Lab](https://help.adjust.com/en/article/links). + + ```http + https://app.adjust.com/{% $variables.config.defaultTracker %} + ``` + +1. Copy this token and assign it to the `DefaultTracker` property of your `AdjustConfig2dx` instance in your app delegate file. + + ```cpp + #include "Adjust/Adjust2dx.h" + + std::string appToken = "{% $variables.config.token %}"; + std::string environment = AdjustEnvironmentSandbox2dx; + + AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); + adjustConfig.setDefaultTracker("{% $variables.config.defaultTracker %}"); + Adjust2dx::initSdk(adjustConfig); + ``` + +1. Build and run your app. If you have logging enabled, you should see a message in your log + + ```text + Default tracker: '{% $variables.config.defaultTracker %}'. + ``` diff --git a/src/variables.json b/src/variables.json index 99a737ffb..6ba733f9d 100644 --- a/src/variables.json +++ b/src/variables.json @@ -4,7 +4,9 @@ "externalDeviceId": "1a42b171-faa5-46da-b5ae-6f4be6d05167", "defaultLink": "abc123", "attWaitingInterval": "30", - "fbAppId": "{YOUR_FB_APP_ID}" + "fbAppId": "{YOUR_FB_APP_ID}", + "defaultTracker": "{YOUR_LINK_TOKEN}", + "preinstallFilePath": "../EngagementFile.xml" }, "ids": { "gps_adid": "5962dfc1-3a53-4692-850b-22c4bf4311a5", From 7bf23135fad412e7df03236fd4dd42b4f8275b81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Wed, 2 Oct 2024 10:52:43 +0200 Subject: [PATCH 51/59] Update src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Uglješa Erceg --- src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc b/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc index 954f6cff6..47ec7daf1 100644 --- a/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc +++ b/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc @@ -89,7 +89,7 @@ To start using SDK v5, you need to add it as a dependency in your project. To do ``` 1. (**Android only**): download the latest `adjust-android.aar` from [the GitHub releases page](https://github.com/adjust/cocos2dx_sdk/releases/latest) and import it into your Android Studio project. -1. (**iOS only**): download the latest `AdjustSdk.xcframework` from [the GitHub releases page](https://github.com/adjust/cocos2dx_sdk/releases/latest) and link it in your Xcode project. +1. (**iOS only**): download the latest `AdjustSdk.framework` from [the GitHub releases page](https://github.com/adjust/cocos2dx_sdk/releases/latest) and link it in your Xcode project. ## Update the initialization method {% #update-the-init-method %} From 61e314e8fffa970179b8de887ca5a7de31a2bc70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Wed, 2 Oct 2024 11:18:39 +0200 Subject: [PATCH 52/59] Add signature library integration steps --- .../docs/sdk/migration/cocos2dx/v4-to-v5.mdoc | 36 +++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc b/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc index 47ec7daf1..748a59b80 100644 --- a/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc +++ b/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc @@ -86,11 +86,35 @@ To start using SDK v5, you need to add it as a dependency in your project. To do Classes/Adjust/AdjustDeeplink2dx.h Classes/Adjust/AdjustPurchaseVerificationResult2dx.h ) - ``` + ``` 1. (**Android only**): download the latest `adjust-android.aar` from [the GitHub releases page](https://github.com/adjust/cocos2dx_sdk/releases/latest) and import it into your Android Studio project. + 1. (**iOS only**): download the latest `AdjustSdk.framework` from [the GitHub releases page](https://github.com/adjust/cocos2dx_sdk/releases/latest) and link it in your Xcode project. +## Set up the Signature library {% #signature-setup %} + +To use the [SDK signature library](https://help.adjust.com/en/article/sdk-signature) in Cocos2dx, you need to add the Adjust Signature library to your project. + +### Android apps + +1. Download the latest `adjust-android-signature.aar` from [the Adjust Signature library GitHub repository](https://github.com/adjust/adjust_signature_sdk/releases/latest). +1. Add the `.aar` to your Android Studio project. +1. [Enforce signature validation](https://help.adjust.com/en/article/sdk-signature#enforce-signature-validation) in Adjust. +1. [Provide your app's SHA-1 fingerprints](https://help.adjust.com/en/article/sdk-signature#manage-your-certificate-fingerprints) prior to testing. + +### iOS apps + +1. Download the latest `AdjustSigSdk-iOS-Static.a` from [the Adjust Signature library GitHub repository](https://github.com/adjust/adjust_signature_sdk/releases/latest). +1. Link the `.a` in your Xcode project. +1. [Enforce signature validation](https://help.adjust.com/en/article/sdk-signature#enforce-signature-validation) in Adjust. + +## Update your app's privacy manifest (iOS only) {% #update-privacy-manifest %} + +To inform the App Store of the Adjust SDK's privacy requirements, you need to add Adjust's privacy manifest properties to your app's privacy manifest. + +Adjust's privacy manifest is available [on GitHub](https://github.com/adjust/ios_sdk/blob/master/Adjust/PrivacyInfo.xcprivacy). + ## Update the initialization method {% #update-the-init-method %} {% minorversion changed="v5" size="large" /%} @@ -118,7 +142,7 @@ The following APIs have been changed in SDK v5. ### Disable and enable the SDK {% #disable-enable-sdk %} -In SDK v4, you can enable and disable the SDK by calling `Adjust2dx::setEnabled` with a `boolean` value. +In SDK v4, you can enable and disable the SDK by calling `Adjust2dx::setEnabled` with a `bool` value. ```cpp Adjust2dx::setEnabled(false); // disable SDK @@ -235,7 +259,7 @@ adjustConfig.enableDeviceIdsReadingOnce(); ### Offline mode {% #offline-mode %} -In SDK v4, you can enable and disable offline mode the SDK by calling `Adjust2dx::setOfflineMode` with a `boolean` argument. +In SDK v4, you can enable and disable offline mode the SDK by calling `Adjust2dx::setOfflineMode` with a `bool` argument. ```cpp Adjust2dx::setOfflineMode(true); @@ -453,13 +477,13 @@ AdjustAdRevenue2dx adRevenue = AdjustAdRevenue2dx("applovin_max_sdk") | v4 | v5 | | --------------------------------------- | --------------------------------------- | -| `AdjustAdRevenueSourceAppLovinMAX` | `"applovin_max_sdk"` | +| `AdjustAdRevenueSourceAppLovinMAX` | `"applovin_max_sdk"` | | `AdjustAdRevenueSourceAdMob` | `"admob_sdk"` | | `AdjustAdRevenueSourceIronSource` | `"ironsource_sdk"` | -| `AdjustAdRevenueSourceAdMostSource` | `"admost_sdk"` | +| `AdjustAdRevenueSourceAdMostSource` | `"admost_sdk"` | | `AdjustAdRevenueSourceUnity` | `"unity_sdk"` | | `AdjustAdRevenueSourceHeliumChartboost` | `"helium_chartboost_sdk"` | -| `AdjustAdRevenueSourceAdx` | `"adx_sdk"` | +| `AdjustAdRevenueSourceAdx` | `"adx_sdk"` | | `AdjustAdRevenueSourcePublisher` | `"publisher_sdk"` | | `AdjustAdRevenueSourceTopOn` | `"topon_sdk"` | | `AdjustAdRevenueSourceMopub` | No longer supported | From 02ae5228c16f7bd515ec2c8dba9c2c2e6d50ebbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Wed, 2 Oct 2024 14:40:33 +0200 Subject: [PATCH 53/59] Update signature library steps and clean up code snippets --- .../sdk/cocos2dx/v5/features/privacy.mdoc | 38 ++----------------- src/content/docs/sdk/cocos2dx/v5/index.mdoc | 19 ++++++++-- 2 files changed, 19 insertions(+), 38 deletions(-) diff --git a/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc b/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc index 37d868bbb..a73b561cc 100644 --- a/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/features/privacy.mdoc @@ -70,15 +70,7 @@ Adjust2dx::initSdk(adjustConfig); ## Configure third party sharing options {% #configure-third-party-sharing-options %} -Adjust shares all metrics with all Self-Attributing Networks (SANs) and module partners you've configured for your app by default. You can configure and update your third party sharing settings at any time during the Adjust SDK lifecycle by instantiating an `AdjustThirdPartySharing2dx` object and passing it to `Adjust2dx::trackThirdPartySharing`. - -If you configure third party sharing settings and call `Adjust2dx::trackThirdPartySharing` before calling `Adjust2dx::initSdk`, Adjust will receive the third party sharing settings before the install session. - -You MUST configure your third party sharing settings before initializing the SDK to do the following: - -1. Configure the sharing of data with third parties **including the install session**. -1. [Configure Facebook Limited Data Use (LDU) settings](#manage-facebook-ldu). -1. [Communicate Google Digital Market Act (DMA) compliance](#dma-compliance). +You can use the Adjust SDK to record when a user changes their third-party sharing settings by instantiating an `AdjustThirdPartySharing2dx` object and passing it to `Adjust2dx::trackThirdPartySharing`. ### Instantiate a third party sharing object {% #instantiate-a-third-party-sharing-object %} @@ -104,26 +96,10 @@ AdjustThirdPartySharing2dx adjustThirdPartySharing = AdjustThirdPartySharing2dx( Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); ``` -### Disable third party sharing globally {% #disable-third-party-sharing-globally %} - -If you want to disable sharing information with all partners, including the initial install session, you MUST: - -1. Instantiate your `AdjustThirdPartySharing2dx` instance with a `false` argument. -1. Call `Adjust2dx::trackThirdPartySharing` **before** you call `Adjust2dx::initSdk`. - -The Adjust SDK caches the third party sharing update and sends it to Adjust **before** the install session information. - -```cpp -AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); -AdjustThirdPartySharing2dx adjustThirdPartySharing = AdjustThirdPartySharing2dx(false); -Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); -Adjust2dx::initSdk(adjustConfig); -``` - ### Configure per-partner sharing settings {% #configure-per-partner-sharing-settings %} {% callout type="important" %} -For SAN partners, you MAY pass the partner's name as the `partnerName`. For module partners, you MUST pass the partner ID. Adjust RECOMMENDS you pass the partner ID for both SANs and module partners. +For SAN partners, you MAY pass the partner's name as the `partnerName`. For other partners, you MUST pass the partner ID. {% /callout %} If you want to share metrics only with specific partners, or you want to configure which metrics to share with specific partners, you MUST do the following: @@ -194,7 +170,6 @@ If you want to stop sharing all metrics with a specific partner, pass the `all` AdjustThirdPartySharing2dx adjustThirdPartySharing = AdjustThirdPartySharing2dx(true); adjustThirdPartySharing.addPartnerSharingSetting("PartnerA", "all", false); Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); -Adjust2dx::initSdk(adjustConfig); ``` To re-enable sharing, pass the `all` key with a `true` value. @@ -203,7 +178,6 @@ To re-enable sharing, pass the `all` key with a `true` value. AdjustThirdPartySharing2dx adjustThirdPartySharing = AdjustThirdPartySharing2dx(true); adjustThirdPartySharing.addPartnerSharingSetting("PartnerA", "all", true); Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); -Adjust2dx::initSdk(adjustConfig); ``` To only share event data with a specific partner: @@ -216,7 +190,6 @@ AdjustThirdPartySharing2dx adjustThirdPartySharing = new AdjustThirdPartySharing adjustThirdPartySharing.addPartnerSharingSetting("PartnerA", "all", false); adjustThirdPartySharing.addPartnerSharingSetting("PartnerA", "event", true); Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); -Adjust2dx::initSdk(adjustConfig); ``` ### Add per-partner granular information {% #add-per-partner-granular-information %} @@ -243,12 +216,10 @@ adjustThirdPartySharing.addGranularOption("PartnerA", "foo", "bar"); Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); ``` -Granular options can be configured or updated at any time during the Adjust SDK lifecycle. If you configure granular options before calling `Adjust2dx::initSdk`, the Adjust SDK caches the value and sends it before the initial install. - #### Manage Facebook Limited Data Use {% #manage-facebook-ldu %} {% callout type="important" %} -You MUST configure these granular options and call `Adjust2dx::trackThirdPartySharing` **before** calling `Adjust2dx::initSdk`. +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. {% /callout %} Facebook provides a feature called Limited Data Use (LDU) to comply with the California Consumer Privacy Act (CCPA). 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. @@ -282,7 +253,6 @@ AdjustThirdPartySharing2dx adjustThirdPartySharing = AdjustThirdPartySharing2dx( adjustThirdPartySharing.addGranularOption("facebook", "data_processing_options_country", "1"); adjustThirdPartySharing.addGranularOption("facebook", "data_processing_options_state", "1000"); Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); -Adjust2dx::initSdk(adjustConfig); ``` #### Provide consent data to Google (Digital Markets Act compliance) {% #dma-compliance %} @@ -316,7 +286,6 @@ adjustThirdPartySharing.addGranularOption("google_dma", "eea", "1"); adjustThirdPartySharing.addGranularOption("google_dma", "ad_personalization", "1"); adjustThirdPartySharing.addGranularOption("google_dma", "ad_user_data", "0"); Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); -Adjust2dx::initSdk(adjustConfig); ``` If your user isn't in the EEA, you MUST set both `ad_personalization` and `ad_user_data` to `1`. If these values aren't set, Google won't claim attribution and will return an error. @@ -327,7 +296,6 @@ adjustThirdPartySharing.addGranularOption("google_dma", "eea", "0"); adjustThirdPartySharing.addGranularOption("google_dma", "ad_personalization", "1"); adjustThirdPartySharing.addGranularOption("google_dma", "ad_user_data", "1"); Adjust2dx::trackThirdPartySharing(adjustThirdPartySharing); -Adjust2dx::initSdk(adjustConfig); ``` ## Set URL strategy {% #set-url-strategy %} diff --git a/src/content/docs/sdk/cocos2dx/v5/index.mdoc b/src/content/docs/sdk/cocos2dx/v5/index.mdoc index fa93206d4..7eb1b2a4d 100644 --- a/src/content/docs/sdk/cocos2dx/v5/index.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/index.mdoc @@ -210,15 +210,28 @@ If you don't use Cocoapods, you can install the framework manually by fetching i To complete iOS setup, you MUST copy all Objective-C++ (`.h` and `.mm`) files to your Xcode project alongside the Cocos2d-x C++ files. Ensure that all `.mm` files are listed in the **Build Phases --> Compile Sources** section. +### Update your app's privacy manifest (iOS only) {% #update-privacy-manifest %} + +To inform the App Store of the Adjust SDK's privacy requirements, you need to add Adjust's privacy manifest properties to your app's privacy manifest. + +Adjust's privacy manifest is available [on GitHub](https://github.com/adjust/ios_sdk/blob/master/Adjust/PrivacyInfo.xcprivacy). + ## 5. Set up SDK Signature {% #set-up-sdk-signature %} -SDK v5 includes the [SDK signature library](https://help.adjust.com/en/article/sdk-signature). Follow the testing guide for [iOS](/en/sdk/ios/integrations/signature-library#test-your-app) and [Android](/en/sdk/android/integrations/signature-library#test-your-app) to ensure your integration works. +To use the [SDK signature library](https://help.adjust.com/en/article/sdk-signature) in Cocos2dx, you need to add the Adjust Signature library to your project. -Signature protection is inactive by default. To enable it, you need to: +### Android apps -1. [Enforce signature validation](https://help.adjust.com/en/article/sdk-signature#enforce-signature-validation). +1. Download the latest `adjust-android-signature.aar` from [the Adjust Signature library GitHub repository](https://github.com/adjust/adjust_signature_sdk/releases/latest). +1. Add the `.aar` to your Android Studio project. 1. [Provide your app's SHA-1 fingerprints](https://help.adjust.com/en/article/sdk-signature#manage-your-certificate-fingerprints) prior to testing. +### iOS apps + +1. Download the latest `AdjustSigSdk-iOS-Static.a` from [the Adjust Signature library GitHub repository](https://github.com/adjust/adjust_signature_sdk/releases/latest). +1. Link the `.a` in your Xcode project. +1. Add the [Signature library privacy manifest](https://github.com/adjust/adjust_signature_sdk/blob/main/Resources/iOS/PrivacyInfo.xcprivacy) properties to your app's privacy manifest. + ## 6. Integrate the Adjust SDK {% #integrate-the-adjust-sdk %} Once you've updated your project settings, you can integrate the Adjust SDK into your app. To do this: From e1fd7cd384e45e125b6ce0aab6e018008c8a695b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Wed, 2 Oct 2024 14:41:44 +0200 Subject: [PATCH 54/59] Add signature privacy manifest link --- src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc b/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc index 748a59b80..aca0c895d 100644 --- a/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc +++ b/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc @@ -100,14 +100,13 @@ To use the [SDK signature library](https://help.adjust.com/en/article/sdk-signat 1. Download the latest `adjust-android-signature.aar` from [the Adjust Signature library GitHub repository](https://github.com/adjust/adjust_signature_sdk/releases/latest). 1. Add the `.aar` to your Android Studio project. -1. [Enforce signature validation](https://help.adjust.com/en/article/sdk-signature#enforce-signature-validation) in Adjust. 1. [Provide your app's SHA-1 fingerprints](https://help.adjust.com/en/article/sdk-signature#manage-your-certificate-fingerprints) prior to testing. ### iOS apps 1. Download the latest `AdjustSigSdk-iOS-Static.a` from [the Adjust Signature library GitHub repository](https://github.com/adjust/adjust_signature_sdk/releases/latest). 1. Link the `.a` in your Xcode project. -1. [Enforce signature validation](https://help.adjust.com/en/article/sdk-signature#enforce-signature-validation) in Adjust. +1. Add the [Signature library privacy manifest](https://github.com/adjust/adjust_signature_sdk/blob/main/Resources/iOS/PrivacyInfo.xcprivacy) properties to your app's privacy manifest. ## Update your app's privacy manifest (iOS only) {% #update-privacy-manifest %} From c4f81672513fd82c3c646c37d68a373973e98516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Wed, 2 Oct 2024 15:03:12 +0200 Subject: [PATCH 55/59] Clarify that signature library is mandatory --- src/content/docs/sdk/cocos2dx/v5/index.mdoc | 16 ++++------------ .../docs/sdk/migration/cocos2dx/v4-to-v5.mdoc | 2 +- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/content/docs/sdk/cocos2dx/v5/index.mdoc b/src/content/docs/sdk/cocos2dx/v5/index.mdoc index 7eb1b2a4d..e2037fda0 100644 --- a/src/content/docs/sdk/cocos2dx/v5/index.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/index.mdoc @@ -180,18 +180,10 @@ To add support for the [Meta Install Referrer](https://developers.facebook.com/d ## 4. Configure iOS settings {% #ios-settings %} -To support iOS devices, you need to add the `Adjust.xcframework` framework to your project. To do this, specify which version you want to download in your `Podfile`: - -```rb -# Get pod from repository -pod 'Adjust', '~> {% $versions.ios.v5 %}' - -# Get source directly from GitHub -pod 'Adjust', :git => 'https://github.com/adjust/ios_sdk.git', :tag => '{% $versions.ios.v5 %}' -``` - -If you don't use Cocoapods, you can install the framework manually by fetching it from [the GitHub releases page](https://github.com/adjust/cocos2dx_sdk/releases). Once you've downloaded and extracted the archive, follow these steps to add the framework to your project: +To support iOS devices, you need to add the `Adjust.xcframework` framework to your project. To do this: +1. Download the `Adjust.xcframework` framework [from GitHub](https://github.com/adjust/cocos2dx_sdk/releases). +1. Extract the archive. 1. Open the project navigator. 1. Select your target. 1. Select the **Build Phases** tab. @@ -218,7 +210,7 @@ Adjust's privacy manifest is available [on GitHub](https://github.com/adjust/ios ## 5. Set up SDK Signature {% #set-up-sdk-signature %} -To use the [SDK signature library](https://help.adjust.com/en/article/sdk-signature) in Cocos2dx, you need to add the Adjust Signature library to your project. +The [SDK signature library](https://help.adjust.com/en/article/sdk-signature) encrypts information sent from the Adjust SDK to Adjust's servers. You MUST add the signature library to your project to use the Adjust SDK. ### Android apps diff --git a/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc b/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc index aca0c895d..58be70de0 100644 --- a/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc +++ b/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc @@ -94,7 +94,7 @@ To start using SDK v5, you need to add it as a dependency in your project. To do ## Set up the Signature library {% #signature-setup %} -To use the [SDK signature library](https://help.adjust.com/en/article/sdk-signature) in Cocos2dx, you need to add the Adjust Signature library to your project. +SDK v5 uses the [SDK signature library](https://help.adjust.com/en/article/sdk-signature) to encrypt information sent from the Adjust SDK to Adjust's servers. You MUST add the signature library to your project to use SDK v5. ### Android apps From 6de1eb6a6f07ed0ebe9cb8c3bb93768535229fef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Wed, 2 Oct 2024 15:08:56 +0200 Subject: [PATCH 56/59] Remove iOS-only note --- src/content/docs/sdk/cocos2dx/v5/index.mdoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/content/docs/sdk/cocos2dx/v5/index.mdoc b/src/content/docs/sdk/cocos2dx/v5/index.mdoc index e2037fda0..1dbf12572 100644 --- a/src/content/docs/sdk/cocos2dx/v5/index.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/index.mdoc @@ -169,10 +169,10 @@ To add support for the [Meta Install Referrer](https://developers.facebook.com/d ```cpp #include "Adjust/Adjust2dx.h" - + std::string appToken = "{% $variables.config.token %}"; std::string environment = AdjustEnvironmentSandbox2dx; - + AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); adjustConfig.setFbAppId("{% $variables.config.fbAppId %}"); Adjust2dx::initSdk(adjustConfig); @@ -202,7 +202,7 @@ To support iOS devices, you need to add the `Adjust.xcframework` framework to yo To complete iOS setup, you MUST copy all Objective-C++ (`.h` and `.mm`) files to your Xcode project alongside the Cocos2d-x C++ files. Ensure that all `.mm` files are listed in the **Build Phases --> Compile Sources** section. -### Update your app's privacy manifest (iOS only) {% #update-privacy-manifest %} +### Update your app's privacy manifest {% #update-privacy-manifest %} To inform the App Store of the Adjust SDK's privacy requirements, you need to add Adjust's privacy manifest properties to your app's privacy manifest. From bb5e33680d4de5d039f55aebd1006cfb425fb6c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Wed, 2 Oct 2024 15:46:15 +0200 Subject: [PATCH 57/59] Rework install steps --- src/content/docs/sdk/cocos2dx/v5/index.mdoc | 83 ++++++++++++--------- 1 file changed, 47 insertions(+), 36 deletions(-) diff --git a/src/content/docs/sdk/cocos2dx/v5/index.mdoc b/src/content/docs/sdk/cocos2dx/v5/index.mdoc index 1dbf12572..057a3cf58 100644 --- a/src/content/docs/sdk/cocos2dx/v5/index.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/index.mdoc @@ -16,19 +16,39 @@ redirects: The Adjust Android SDK enables you to record attribution, events, and more in your Cocos2d-x app. Follow the steps in this guide to set up your app to work with the Adjust SDK. -## 1. Get the Adjust SDK {% #get-the-adjust-sdk %} +## 1. Download project dependencies {% #download-project-dependencies %} -To use the Adjust SDK in your Cocos2d-x app, you need to add it to your project. You can download the latest version from the [GitHub releases page](https://github.com/adjust/cocos2dx_sdk/releases/latest). Extract the archive to a directory. +To get started with the Adjust SDK, you need to download the necessary dependencies to add them to your Cocos2d-x project. First: + +1. Download the latest source code archive from [the Adjust Cocos2d-x SDK GitHub repository](https://github.com/adjust/cocos2dx_sdk/releases/latest). +1. Unzip the archive. + +Next, download the relevant dependencies for your target platform or platforms. + +### Android + +1. Download the latest `adjust-android.aar` from [the Adjust Cocos2d-x SDK GitHub repository](https://github.com/adjust/cocos2dx_sdk/releases/latest). +1. Download the latest `adjust-android-signature.aar` from [the Adjust Signature library GitHub repository](https://github.com/adjust/adjust_signature_sdk/releases/latest). + +### iOS + +1. Download the latest `AdjustSdk.framework` from [the Adjust Cocos2d-x SDK GitHub repository](https://github.com/adjust/cocos2dx_sdk/releases/latest). +1. Download the latest `AdjustSigSdk-iOS-Static.a` from [the Adjust Signature library GitHub repository](https://github.com/adjust/adjust_signature_sdk/releases/latest). ## 2. Add the SDK to your project {% #add-the-sdk %} -Once you've extracted the release archive, follow these steps to add the Adjust SDK to your project: +Once you've downloaded the necessary dependencies, follow these steps to add the Adjust SDK to your Cocos2d-x project: + +1. Navigate to the unzipped SDK release archive. +1. Copy all C++ files from the `dist` directory to your Cocos2d-x project. -1. Navigate to the folder into which you extracted the archive. +Follow these steps to set up the Adjust SDK in your Android and iOS projects. -1. Copy all C++ files from the `dist` directory and add them to your Cocos2d-x project. +### Android -1. (**Android only**): add the paths of the C++ files to the `LOCAL_SRC_FILES` section of your `Android.mk` file. +1. Import the `adjust-android.aar` archive into your Android Studio project. + +1. Add the paths of the C++ files to the `LOCAL_SRC_FILES` section of your `Android.mk` file. ```make $(LOCAL_PATH)/../../../Classes/Adjust/AdjustConfig2dx.cpp \ @@ -94,9 +114,21 @@ Once you've extracted the release archive, follow these steps to add the Adjust ) ``` +1. Set up the SDK signature library. + + 1. Add the `adjust-android-signature.aar` to your Android Studio project. + 1. [Provide your app's SHA-1 fingerprints](https://help.adjust.com/en/article/sdk-signature#manage-your-certificate-fingerprints) prior to testing. + +### iOS + +1. Link the `AdjustSdk.framework` framework in your Xcode project. +1. Set up the SDK signature library. + 1. Link the `AdjustSigSdk-iOS-Static.a` in your Xcode project. + 1. Add the [Signature library privacy manifest](https://github.com/adjust/adjust_signature_sdk/blob/main/Resources/iOS/PrivacyInfo.xcprivacy) properties to your app's privacy manifest. + ## 3. Configure Android settings {% #android-settings %} -To support Android devices, you need to download the latest `adjust-android.aar` from [the GitHub releases page](https://github.com/adjust/cocos2dx_sdk/releases/latest) and import it into your Android Studio project. +Follow these steps to configure the Adjust SDK for Android devices. ### Permissions {% #android-permissions %} @@ -122,8 +154,8 @@ dependencies: { The install referrer is an attribution mechanism you can use to attribute an app install to a source. It consists of two parts: -- [x] A set of APIs from these app stores that allow developers to retrieve referral content in their apps. -- [x] A `referrer` parameter that app stores, such as Google Play and Huawei App Gallery, accept in their app page URLs on their store websites. Here is how the referrer parameter is populated: +- A set of APIs from these app stores that allow developers to retrieve referral content in their apps. +- A `referrer` parameter that app stores, such as Google Play and Huawei App Gallery, accept in their app page URLs on their store websites. Here is how the referrer parameter is populated: - When a user clicks on an Adjust link, the Adjust server passes a unique identifier called `reftag`. This identifier is assigned to the click and into the referrer parameter. To learn more about reftag, see the [Reftag article in the Help Center](https://help.adjust.com/en/article/reftag). - When you run [Google Ads](https://support.google.com/google-ads/answer/6357635?hl=en) campaigns, Google passes a unique identifier called `gclid` into the referrer parameter. You MUST enable **Auto-tagging** in your Google Ads account. @@ -180,16 +212,11 @@ To add support for the [Meta Install Referrer](https://developers.facebook.com/d ## 4. Configure iOS settings {% #ios-settings %} -To support iOS devices, you need to add the `Adjust.xcframework` framework to your project. To do this: +Follow these steps to configure the Adjust SDK for iOS devices. + +### Link additional frameworks {% #link-frameworks %} -1. Download the `Adjust.xcframework` framework [from GitHub](https://github.com/adjust/cocos2dx_sdk/releases). -1. Extract the archive. -1. Open the project navigator. -1. Select your target. -1. Select the **Build Phases** tab. -1. Expand the **Link Binary with Libraries** group. -1. Select the **+** button. -1. Select the `Adjust.xcframework` +Link the following frameworks to your Xcode project to give the Adjust SDK access to device-level information. | Framework | Purpose | Notes | | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | @@ -198,9 +225,9 @@ To support iOS devices, you need to add the `Adjust.xcframework` framework to yo | `StoreKit.framework` | Required to access the SKAdNetwork framework and for the Adjust SDK to handle communications with SKAdNetwork. | | | `AppTrackingTransparency.framework` | Required in iOS 14 and later to enable the Adjust SDK to wrap the ATT consent dialog and access the user's consent response. | You SHOULD NOT add this framework if your app targets the "Kids" category | -### Copy additional source files +### Copy additional source files {% #copy-source-files %} -To complete iOS setup, you MUST copy all Objective-C++ (`.h` and `.mm`) files to your Xcode project alongside the Cocos2d-x C++ files. Ensure that all `.mm` files are listed in the **Build Phases --> Compile Sources** section. +To complete iOS setup, you MUST copy all Objective-C++ (`.h` and `.mm`) files from the `dist` directory of the unzipped SDK archive to your Xcode project. Ensure that all `.mm` files are listed in the **Build Phases --> Compile Sources** section. ### Update your app's privacy manifest {% #update-privacy-manifest %} @@ -208,22 +235,6 @@ To inform the App Store of the Adjust SDK's privacy requirements, you need to ad Adjust's privacy manifest is available [on GitHub](https://github.com/adjust/ios_sdk/blob/master/Adjust/PrivacyInfo.xcprivacy). -## 5. Set up SDK Signature {% #set-up-sdk-signature %} - -The [SDK signature library](https://help.adjust.com/en/article/sdk-signature) encrypts information sent from the Adjust SDK to Adjust's servers. You MUST add the signature library to your project to use the Adjust SDK. - -### Android apps - -1. Download the latest `adjust-android-signature.aar` from [the Adjust Signature library GitHub repository](https://github.com/adjust/adjust_signature_sdk/releases/latest). -1. Add the `.aar` to your Android Studio project. -1. [Provide your app's SHA-1 fingerprints](https://help.adjust.com/en/article/sdk-signature#manage-your-certificate-fingerprints) prior to testing. - -### iOS apps - -1. Download the latest `AdjustSigSdk-iOS-Static.a` from [the Adjust Signature library GitHub repository](https://github.com/adjust/adjust_signature_sdk/releases/latest). -1. Link the `.a` in your Xcode project. -1. Add the [Signature library privacy manifest](https://github.com/adjust/adjust_signature_sdk/blob/main/Resources/iOS/PrivacyInfo.xcprivacy) properties to your app's privacy manifest. - ## 6. Integrate the Adjust SDK {% #integrate-the-adjust-sdk %} Once you've updated your project settings, you can integrate the Adjust SDK into your app. To do this: From 9aefdf56d9b246776f4c816c2762733d7e9a9e3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Wed, 2 Oct 2024 17:06:39 +0200 Subject: [PATCH 58/59] Update integration guide order --- src/content/docs/sdk/cocos2dx/v5/index.mdoc | 67 ++++++++------------- 1 file changed, 25 insertions(+), 42 deletions(-) diff --git a/src/content/docs/sdk/cocos2dx/v5/index.mdoc b/src/content/docs/sdk/cocos2dx/v5/index.mdoc index 057a3cf58..39f5f6b6e 100644 --- a/src/content/docs/sdk/cocos2dx/v5/index.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/index.mdoc @@ -16,41 +16,17 @@ redirects: The Adjust Android SDK enables you to record attribution, events, and more in your Cocos2d-x app. Follow the steps in this guide to set up your app to work with the Adjust SDK. -## 1. Download project dependencies {% #download-project-dependencies %} +## 1. Install the SDK {% #install-the-sdk %} -To get started with the Adjust SDK, you need to download the necessary dependencies to add them to your Cocos2d-x project. First: +To start using SDK v5, you need to add it as a dependency in your project. To do this: -1. Download the latest source code archive from [the Adjust Cocos2d-x SDK GitHub repository](https://github.com/adjust/cocos2dx_sdk/releases/latest). -1. Unzip the archive. +1. Download the SDK archive [from GitHub](https://github.com/adjust/cocos2dx_sdk/releases) -Next, download the relevant dependencies for your target platform or platforms. +1. Copy the C++ files from the `dist` directory and add them to your Cocos2d-x project -### Android +1. (**Android only**): add the paths of the C++ files to the `LOCAL_SRC_FILES` section of your `Android.mk` file. -1. Download the latest `adjust-android.aar` from [the Adjust Cocos2d-x SDK GitHub repository](https://github.com/adjust/cocos2dx_sdk/releases/latest). -1. Download the latest `adjust-android-signature.aar` from [the Adjust Signature library GitHub repository](https://github.com/adjust/adjust_signature_sdk/releases/latest). - -### iOS - -1. Download the latest `AdjustSdk.framework` from [the Adjust Cocos2d-x SDK GitHub repository](https://github.com/adjust/cocos2dx_sdk/releases/latest). -1. Download the latest `AdjustSigSdk-iOS-Static.a` from [the Adjust Signature library GitHub repository](https://github.com/adjust/adjust_signature_sdk/releases/latest). - -## 2. Add the SDK to your project {% #add-the-sdk %} - -Once you've downloaded the necessary dependencies, follow these steps to add the Adjust SDK to your Cocos2d-x project: - -1. Navigate to the unzipped SDK release archive. -1. Copy all C++ files from the `dist` directory to your Cocos2d-x project. - -Follow these steps to set up the Adjust SDK in your Android and iOS projects. - -### Android - -1. Import the `adjust-android.aar` archive into your Android Studio project. - -1. Add the paths of the C++ files to the `LOCAL_SRC_FILES` section of your `Android.mk` file. - - ```make + ```text $(LOCAL_PATH)/../../../Classes/Adjust/AdjustConfig2dx.cpp \ $(LOCAL_PATH)/../../../Classes/Adjust/AdjustAttribution2dx.cpp \ $(LOCAL_PATH)/../../../Classes/Adjust/AdjustProxy2dx.cpp \ @@ -114,17 +90,23 @@ Follow these steps to set up the Adjust SDK in your Android and iOS projects. ) ``` -1. Set up the SDK signature library. +1. (**Android only**): download the latest `adjust-android.aar` from [the GitHub releases page](https://github.com/adjust/cocos2dx_sdk/releases/latest) and import it into your Android Studio project. + +1. (**iOS only**): download the latest `AdjustSdk.framework` from [the GitHub releases page](https://github.com/adjust/cocos2dx_sdk/releases/latest) and link it in your Xcode project. + +## 2. Set up the Signature library {% #signature-setup %} + +SDK v5 uses the [SDK signature library](https://help.adjust.com/en/article/sdk-signature) to encrypt information sent from the Adjust SDK to Adjust's servers. You MUST add the signature library to your project to use SDK v5. - 1. Add the `adjust-android-signature.aar` to your Android Studio project. - 1. [Provide your app's SHA-1 fingerprints](https://help.adjust.com/en/article/sdk-signature#manage-your-certificate-fingerprints) prior to testing. +### Android apps -### iOS +1. Download the latest `adjust-android-signature.aar` from [the Adjust Signature library GitHub repository](https://github.com/adjust/adjust_signature_sdk/releases/latest). +1. Add the `.aar` to your Android Studio project. + +### iOS apps -1. Link the `AdjustSdk.framework` framework in your Xcode project. -1. Set up the SDK signature library. - 1. Link the `AdjustSigSdk-iOS-Static.a` in your Xcode project. - 1. Add the [Signature library privacy manifest](https://github.com/adjust/adjust_signature_sdk/blob/main/Resources/iOS/PrivacyInfo.xcprivacy) properties to your app's privacy manifest. +1. Download the latest `AdjustSigSdk-iOS-Static.a` from [the Adjust Signature library GitHub repository](https://github.com/adjust/adjust_signature_sdk/releases/latest). +1. Link the `.a` in your Xcode project. ## 3. Configure Android settings {% #android-settings %} @@ -201,10 +183,10 @@ To add support for the [Meta Install Referrer](https://developers.facebook.com/d ```cpp #include "Adjust/Adjust2dx.h" - + std::string appToken = "{% $variables.config.token %}"; std::string environment = AdjustEnvironmentSandbox2dx; - + AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); adjustConfig.setFbAppId("{% $variables.config.fbAppId %}"); Adjust2dx::initSdk(adjustConfig); @@ -231,9 +213,10 @@ To complete iOS setup, you MUST copy all Objective-C++ (`.h` and `.mm`) files fr ### Update your app's privacy manifest {% #update-privacy-manifest %} -To inform the App Store of the Adjust SDK's privacy requirements, you need to add Adjust's privacy manifest properties to your app's privacy manifest. +To inform the App Store of the Adjust SDK's privacy requirements, you need to merge your privacy manifest with Adjust's privacy manifests. -Adjust's privacy manifest is available [on GitHub](https://github.com/adjust/ios_sdk/blob/master/Adjust/PrivacyInfo.xcprivacy). +1. Add the [Adjust SDK privacy manifest on GitHub](https://github.com/adjust/ios_sdk/blob/master/Adjust/PrivacyInfo.xcprivacy) properties to your app's privacy manifest. +1. Add the [Signature library privacy manifest](https://github.com/adjust/adjust_signature_sdk/blob/main/Resources/iOS/PrivacyInfo.xcprivacy) properties to your app's privacy manifest. ## 6. Integrate the Adjust SDK {% #integrate-the-adjust-sdk %} From 454e67483b6a30f28de7e2c2bb6b420c2c3c495c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Wed, 2 Oct 2024 22:45:17 +0200 Subject: [PATCH 59/59] Minor wording changes --- src/content/docs/sdk/cocos2dx/v5/index.mdoc | 6 +++--- src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc | 7 +++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/content/docs/sdk/cocos2dx/v5/index.mdoc b/src/content/docs/sdk/cocos2dx/v5/index.mdoc index 39f5f6b6e..964ed0ad0 100644 --- a/src/content/docs/sdk/cocos2dx/v5/index.mdoc +++ b/src/content/docs/sdk/cocos2dx/v5/index.mdoc @@ -183,10 +183,10 @@ To add support for the [Meta Install Referrer](https://developers.facebook.com/d ```cpp #include "Adjust/Adjust2dx.h" - + std::string appToken = "{% $variables.config.token %}"; std::string environment = AdjustEnvironmentSandbox2dx; - + AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment); adjustConfig.setFbAppId("{% $variables.config.fbAppId %}"); Adjust2dx::initSdk(adjustConfig); @@ -215,7 +215,7 @@ To complete iOS setup, you MUST copy all Objective-C++ (`.h` and `.mm`) files fr To inform the App Store of the Adjust SDK's privacy requirements, you need to merge your privacy manifest with Adjust's privacy manifests. -1. Add the [Adjust SDK privacy manifest on GitHub](https://github.com/adjust/ios_sdk/blob/master/Adjust/PrivacyInfo.xcprivacy) properties to your app's privacy manifest. +1. Add the [Adjust SDK privacy manifest](https://github.com/adjust/ios_sdk/blob/master/Adjust/PrivacyInfo.xcprivacy) properties to your app's privacy manifest. 1. Add the [Signature library privacy manifest](https://github.com/adjust/adjust_signature_sdk/blob/main/Resources/iOS/PrivacyInfo.xcprivacy) properties to your app's privacy manifest. ## 6. Integrate the Adjust SDK {% #integrate-the-adjust-sdk %} diff --git a/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc b/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc index 58be70de0..3d0c26e19 100644 --- a/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc +++ b/src/content/docs/sdk/migration/cocos2dx/v4-to-v5.mdoc @@ -100,19 +100,18 @@ SDK v5 uses the [SDK signature library](https://help.adjust.com/en/article/sdk-s 1. Download the latest `adjust-android-signature.aar` from [the Adjust Signature library GitHub repository](https://github.com/adjust/adjust_signature_sdk/releases/latest). 1. Add the `.aar` to your Android Studio project. -1. [Provide your app's SHA-1 fingerprints](https://help.adjust.com/en/article/sdk-signature#manage-your-certificate-fingerprints) prior to testing. ### iOS apps 1. Download the latest `AdjustSigSdk-iOS-Static.a` from [the Adjust Signature library GitHub repository](https://github.com/adjust/adjust_signature_sdk/releases/latest). 1. Link the `.a` in your Xcode project. -1. Add the [Signature library privacy manifest](https://github.com/adjust/adjust_signature_sdk/blob/main/Resources/iOS/PrivacyInfo.xcprivacy) properties to your app's privacy manifest. ## Update your app's privacy manifest (iOS only) {% #update-privacy-manifest %} -To inform the App Store of the Adjust SDK's privacy requirements, you need to add Adjust's privacy manifest properties to your app's privacy manifest. +To inform the App Store of the Adjust SDK's privacy requirements, you need to merge your privacy manifest with Adjust's privacy manifests. -Adjust's privacy manifest is available [on GitHub](https://github.com/adjust/ios_sdk/blob/master/Adjust/PrivacyInfo.xcprivacy). +1. Add the [Adjust SDK privacy manifest](https://github.com/adjust/ios_sdk/blob/master/Adjust/PrivacyInfo.xcprivacy) properties to your app's privacy manifest. +1. Add the [Signature library privacy manifest](https://github.com/adjust/adjust_signature_sdk/blob/main/Resources/iOS/PrivacyInfo.xcprivacy) properties to your app's privacy manifest. ## Update the initialization method {% #update-the-init-method %}