ディープリンクを作成して、ユーザーをアプリ内の特定の場所に誘導します。Adjust SDKは、ユーザーがデバイスにアプリをインストール済みかどうかによって、異なるロジックを使用します。
- ダイレクトディープリンクは、ユーザーがアプリをすでにデバイスにインストールしている場合に使用されます。そのリンクは、リンクで指定されたページにユーザーをリダイレクトします。
- ディファードディープリンクは、ユーザーがアプリをデバイスにインストールしていない場合に使用されます。そのリンクは、ユーザーをアプリストアに送り、アプリを先にインストールしてもらいます。ユーザーがアプリをインストールすると、リンクで指定されたページが開きます。
SDKは、ユーザーがリンクからアプリを起動した後にディープリンクの情報を読み取ることができます。
ディープリンクを設定する
ユーザーがアプリをインストールしている場合、ユーザーがディープリンク情報を含むリンクをクリックするとアプリが起動します。Adjust SDKには、ディープリンク情報を解析してアプリ全体で利用するためのツールが備わっています。
ディープリンクは、アプリレベルで設定する必要があります。使用するプラットフォームに合わせて、以下のリンク先のディープリンク設定手順に従ってください。
ディープリンクを使用したリアトリビューション
ユーザーをリアトリビュートするには、ディープリンクURLでADJDeeplink
/ AdjustDeeplink
オブジェクトをインスタンス化し、 Adjust.processDeeplink
メソッドにパスする必要があります。 Adjust SDKは次に、ディープリンク内の新しいアトリビューションデータを検索します。SDKが新しい情報を見つけた場合、その情報をAdjustのサーバーに転送し、リアトリビューションを行います。
iOS
+ (void)processDeeplink:(ADJDeeplink *)deeplink
ディープリンクによるAdjustのリアトリビューションを有効にするには、アプリデリゲートコールバックの1つでディープリンクを取得したら、必ずAdjust.processDeeplink
メソッドを呼び出してください。
func application(application:UIApplication!, didFinishLaunchingWithOptions launchOptions:NSDictionary!) -> Bool {
GeneratedPluginRegistrant.registerWithRegistry(self)
// Override point for customization after application launch.
return super.application(application, didFinishLaunchingWithOptions:launchOptions)
func application(application:UIApplication!, openURL url:NSURL!, sourceApplication:String!, annotation:AnyObject!) -> Bool {
let deeplink = ADJDeeplink(deeplink: url)!
Adjust.processDeeplink(deeplink)
func application(application:UIApplication!, continueUserActivity userActivity:NSUserActivity!, restorationHandler:([AnyObject]!)->Void) -> Bool {
if (userActivity.activityType() == NSUserActivityTypeBrowsingWeb) {
let deeplink = ADJDeeplink(deeplink: userActivity.webpageURL())!
Adjust.processDeeplink(deeplink)
#import <AdjustSdk/AdjustSdk.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GeneratedPluginRegistrant registerWithRegistry:self];
// Override point for customization after application launch.
return [super application:application didFinishLaunchingWithOptions:launchOptions];
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
[Adjust processDeeplink:[ADJDeeplink alloc] initWithDeeplink:url]];
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<uiuseractivityrestoring>> *restorableObjects))restorationHandler {
if ([[userActivity activityType] isEqualToString:NSUserActivityTypeBrowsingWeb]) {
[Adjust processDeeplink:[ADJDeeplink alloc] initWithDeeplink:[userActivity webpageURL]]];
Android
public static void processDeeplink(AdjustDeeplink deeplink)
ディープリンクによるAdjustのリアトリビューションを有効にするには、アクティビティでディープリンクを取得したら、必ずAdjust.processDeeplink
メソッドを呼び出してください。
import com.adjust.sdk.flutter.AdjustSdk
import io.flutter.embedding.android.FlutterActivity
// Used for post flutter 1.12 Android projects
//import io.flutter.app.FlutterActivity
class MainActivity : FlutterActivity() {
// Either call make the call in onCreate.
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// GeneratedPluginRegistrant.registerWith(this)
// Used only for pre flutter 1.12 Android projects
Intent intent = getIntent()
Uri data = intent.getData()
Adjust.processDeeplink(new AdjustDeeplink(data), this)
// Or make the call in onNewIntent.
override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
Uri data = intent.getData()
Adjust.processDeeplink(new AdjustDeeplink(data), this)
import com.adjust.sdk.flutter.AdjustSdk;
import io.flutter.embedding.android.FlutterActivity; // Used for post flutter 1.12 Android projects
//import io.flutter.app.FlutterActivity; // Used for pre flutter 1.12 Android projects
public class MainActivity extends FlutterActivity {
// Either call make the call in onCreate.
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// GeneratedPluginRegistrant.registerWith(this); Used only for pre flutter 1.12 Android projects
Intent intent = getIntent();
Uri data = intent.getData();
Adjust.processDeeplink(new AdjustDeeplink(data), this);
// Or make the cakll in onNewIntent.
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
Uri data = intent.getData();
Adjust.processDeeplink(new AdjustDeeplink(data), this);
ディファードディープリンク
bool? isDeferredDeeplinkOpeningEnabled;
SDKはデフォルトでディファードディープリンクを開きます。追加設定はありません。ConfigインスタンスのisDeferredDeeplinkOpeningEnabled
プロパティを false に設定することで非有効化にすることができます。
AdjustConfig adjustConfig = new AdjustConfig('{YourAppToken}', AdjustEnvironment.sandbox);
adjustConfig.isDeferredDeeplinkOpeningEnabled = false;
Adjust.initSdk(adjustConfig);
ディファードディープリンクのコールバックを設定する
typedef void DeferredDeeplinkCallback(String? deeplink);
DeferredDeeplinkCallback? deferredDeeplinkCallback;
関数をconfigインスタンスのdeferredDeeplinkCallback
プロパティに追加することで、Adjust SDKがディファードディープリンクを受け取った際に、関数を呼び出すように設定することができます。この関数は、ディープリンクをString
引数で受け取ります。
AdjustConfig adjustConfig = new AdjustConfig('{YourAppToken}', AdjustEnvironment.sandbox);
adjustConfig.deferredDeeplinkCallback = (String? deeplink) {
print('[Adjust]: Received deferred deeplink: ' + deeplink);
Adjust.initSdk(adjustConfig);
例
この例では、ユーザーがディファードディープリンクを開いたときに、ディープリンクのアドレスをログに記録する方法を示しています。
import 'package:adjust_sdk/adjust.dart';
import 'package:adjust_sdk/adjust_config.dart';
initPlatformState() async {
new AdjustConfig('2fm9gkqubvpc', AdjustEnvironment.sandbox);
config.logLevel = AdjustLogLevel.verbose;
config.deferredDeeplinkCallback = (String? uri) {
print('[Adjust]: Received deferred deeplink: ' + uri!);
LinkMeを有効化する
Adjust SDKでは、デバイスのペーストボードからディープリンクの情報をコピーすることが可能です。AdjustのLinkMeソリューションを組み合わせることで、iOS 15以降のデバイスでディファードディープリンクを有効化することができます。
ユーザーがLinkMeのURLをクリックすると、そのリンク情報をシステムのペーストボードにコピーするオプションがあります。Adjust SDKを使用してシステムのペーストボードを読み、ディープリンクの情報を確認することができます。ディープリンクがある場合、SDKはユーザーをアプリ内の正しいページに転送します。
アプリ内でペーストボードの確認を有効化するには、ConfigオブジェクトのisLinkMeEnabled
プロパティをtrue
に設定します。
AdjustConfig adjustConfig = new AdjustConfig('{YourAppToken}', AdjustEnvironment.sandbox);
adjustConfig.isLinkMeEnabled = true;
Adjust.initSdk(adjustConfig);