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 whether the user already has your app installed on their device:

  • Direct deep linking: Occurs if the user already has your app installed. The link takes them directly to the page specified in the link.
  • Deferred deep linking: Occurs if the user doesn’t have your app installed. The link takes them to an app store to install the app first. After installation, the app opens to the page specified in the link.

Set up deep linking

In order to set up deep linking in your Solar2d / Corona app, please follow the official platform guide.

To reattribute a user, pass the deep link that opened your app as a parameter to the processDeeplink method call.

Method signature
function processDeeplink(deeplink)
local function onSystemEvent(event)
if event.type == "applicationOpenURL" then
print("App opened via URL: " .. event.url)
local adjustDeeplink = {}
adjustDeeplink.deeplink = event.url
adjust.processDeeplink(adjustDeeplink)
end
end
Runtime:addEventListener("system", onSystemEvent)

Deferred deep linking

Configuration table key
isDeferredDeeplinkOpeningEnabled;

The SDK opens deferred deep links by default. No additional setup is required. You can disable this behavior by setting the isDeferredDeeplinkOpeningEnabled key in your configuration table to false.

local adjust = require "plugin.adjust"
adjust.initSdk({
appToken = "YourAppToken",
environment = "SANDBOX",
logLevel = "VERBOSE",
isDeferredDeeplinkOpeningEnabled = false
})

You can configure the Adjust SDK to call a function when it receives a deferred deep link by using the setDeferredDeeplinkCallback method. This function receives the deep link as a string argument.

local adjust = require "plugin.adjust"
-- make sure to set the callback before calling initSdk
adjust.setDeferredDeeplinkCallback(function(event)
print("Deferred deep link: " .. event.message)
end)
-- ...
adjust.initSdk({
appToken = "YourAppToken",
environment = "SANDBOX",
logLevel = "VERBOSE"
})

Enable LinkMe

The Adjust SDK can 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 later.

When a user clicks a LinkMe URL, they have the option to copy the link information to their system pasteboard. The Adjust SDK can then read this data and route the user to the correct page in your app.

To enable pasteboard checking, set the isLinkMeEnabled key to true in your configuration table:

local adjust = require "plugin.adjust"
adjust.initSdk({
appToken = "YourAppToken",
environment = "SANDBOX",
logLevel = "VERBOSE",
isLinkMeEnabled = true
})

An optional referrer URL can help track the source of a deep link or app open for better attribution or reattribution. This is useful for channels like SEO or organic search, where Adjust links are not directly used. If the client’s root domain has Android App Links implemented and triggers an app open, attribution may rely on signals coming from the referrer URL.

If your app is able to obtain this information internally (see how it’s done on iOS and Android), you can pass the referrer information to the SDK as described below:

local adjust = require "plugin.adjust"
adjustDeeplink = {}
adjustDeeplink.deeplink = "your-deep-link"
adjustDeeplink.referrer = "your-referrer"
adjust.processDeeplink(adjustDeeplink)