adjust-icon

Deep linking

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 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:

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.

std::string appToken = "{YOUR_APP_TOKEN}";
std::string environment = AdjustEnvironmentSandbox2dx;
AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment);
adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose);
adjustConfig.setDeferredDeeplinkCallback([](std::string adjustDeeplink) {
// process adjustDeeplink
});
Adjust2dx::initSdk(adjustConfig);

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.

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.

AdjustDeeplink2dx adjustDeeplink = AdjustDeeplink2dx("url");
Adjust2dx::processDeeplink(adjustDeeplink);

Enable LinkMe

The Adjust SDK lets you copy deep link information from the device pasteboard. When combined with Adjust’s LinkMe solution, this feature enables deferred deep linking on devices running iOS 15 and above.

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.

std::string appToken = "{YOUR_APP_TOKEN}";
std::string environment = AdjustEnvironmentSandbox2dx;
AdjustConfig2dx adjustConfig = AdjustConfig2dx(appToken, environment);
adjustConfig.setLogLevel(AdjustLogLevel2dxVerbose);
adjustConfig.enableLinkMe();
Adjust2dx::initSdk(adjustConfig)

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.

Adjust2dx::getLastDeeplink([](std::string lastDeeplink) {
std::cout << "\nLast deeplink = " << lastDeeplink;
});