在此頁面上:瞭解如何在電子郵件和簡訊內容中編寫深層連結、在Adobe Journey Optimizer中設定這些連結,以及處理iOS和Android應用程式中的追蹤連結,讓收件者進入正確的應用程式內畫面。
深層連結可協助您將收件者從電子郵件或簡訊訊息帶至行動應用程式中的特定畫面或內容片段。 它有助於引導人們直接使用預期的應用程式內體驗,而不需透過網頁瀏覽器或應用程式商店路由,讓歷程保持在相關性和品牌上。
收件者按一下深層連結時,就會直接導向至預期的應用程式內內容 — 假設您已完成:
/ee/v1/mclick/*)深層連結iOS和Android,以確保相容性和點選追蹤。編寫深層連結 authoring
電子郵件 authoring-email
對於電子郵件訊息,您有兩個選項可插入深層連結:
-
電子郵件Designer:確定連結追蹤已啟用。 選取您要連結的元素(文字、按鈕或影像),按一下內容工具列中的插入連結,然後選擇 深層連結 以輸入深層連結URL。 進一步瞭解插入連結
-
Personalization編輯器(程式碼):使用下列程式碼片段,將深層連結直接插入HTML:
code language-html <a class="arc-link" data-nl-type="DEEPLINK" href="<<deeplink_url>>" id="acr-link-7821368" style="text-decoration:underline;" target="_blank" data-tracking-type="DEEPLINK">Click Here</a>note tip TIP 將 <<deeplink_url>>取代為您實際的深層連結URL,並為每個區塊使用唯一的id以避免衝突。
簡訊 authoring-sms
對於SMS,深層連結是使用個人化編輯器中的Url協助程式功能來撰寫。 在本節中瞭解如何新增簡訊內容的連結。
若要在SMS內容中插入深層連結,請使用下列語法:
{{url originalUrl='<<url>>' type='DEEPLINK' action='CLICK'}}
<<url>>取代為您實際的深層連結URL。Journey Optimizer中的設定 configuration
若要在行動應用程式的電子郵件和簡訊中使用深層連結,請完成下列設定步驟。
/ee/v1/mclick/*下的URL,由Adobe代管並解析。行動應用程式實施 mobile-implementation
本節說明如何使用Adobe Journey Optimizer實作行動深層連結,以便在典型的 HTTPS 設定中(通用連結和應用程式連結),單一URL可以:
- 安裝應用程式時,在行動應用程式內開啟特定畫面,或
- 未安裝應用程式時開啟您的網站作為遞補。
為您的訊息啟用連結追蹤後,Journey Optimizer會繼續追蹤這些點按,將它們納入報告中,而且如果您在訊息上執行這些點按,則可以在內容實驗中使用它們。
本節提供深層連結的常見實作模式。 確切的設定取決於應用程式架構和路由架構。
iOS (通用連結) ios-implementation
-
在Xcode中,透過簽署與功能 > +功能 > 關聯的網域來選取您的目標。
-
為您委派的子網域新增專案,例如:
code language-text applinks:www.mybusiness.com applinks:data.email.mybusiness.com -
在應用程式中處理通用連結,並從回應標題取得原始連結。
accordion 範例:iOS 13+搭配場景 code language-swift class SceneDelegate: UIResponder, UIWindowSceneDelegate { func scene(_ scene: UIScene, continue userActivity: NSUserActivity) { guard userActivity.activityType == NSUserActivityTypeBrowsingWeb, let incomingURL = userActivity.webpageURL else { return } handleUniversalLink(url: incomingURL) } private func handleUniversalLink(url: URL) { // Only handle AJO tracked mobile clicks guard url.host == "data.email.mybusiness.com", url.path.hasPrefix("/ee/v1/mclick") else { // Could also handle direct www.mybusiness.com links here return } resolveTrackedUrlAndRoute(url) } private func resolveTrackedUrlAndRoute(_ trackedUrl: URL) { var request = URLRequest(url: trackedUrl) request.httpMethod = "GET" URLSession.shared.dataTask(with: request) { _, response, error in guard error == nil, let httpResponse = response as? HTTPURLResponse, let locationValue = httpResponse.allHeaderFields["Location"] as? String, let finalUrl = URL(string: locationValue) else { return } DispatchQueue.main.async { self.routeToDestination(finalUrl) } }.resume() } private func routeToDestination(_ url: URL) { // Example: map URL paths to screens // https://www.mybusiness.com/dashboard/offers/coupons // → OffersViewController for Coupons } }
mclick URL上執行 GET 並讀取**Location標題,然後根據最終** URL路由。mclick URL;這會破壞深層連結的目的。Android (應用程式連結) android-implementation
-
在您的Android應用程式中新增應用程式連結意圖篩選器。
code language-xml <activity android:name=".DeepLinkActivity" android:exported="true"> <intent-filter android:autoVerify="true"> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="https" android:host="data.email.mybusiness.com" android:pathPrefix="/ee/v1/mclick" /> </intent-filter> </activity> -
實作深層連結處理常式。
accordion 在Kotlin: code language-kotlin class DeepLinkActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) val trackedUri = intent?.data if (trackedUri == null || trackedUri.host != "data.email.mybusiness.com" || !trackedUri.path.orEmpty().startsWith("/ee/v1/mclick")) { finish() return } resolveTrackedUrlAndRoute(trackedUri) } private fun resolveTrackedUrlAndRoute(trackedUri: Uri) { lifecycleScope.launch(Dispatchers.IO) { try { val finalUrl = followRedirect(trackedUri.toString()) withContext(Dispatchers.Main) { routeToDestination(finalUrl) finish() } } catch (e: Exception) { // Optionally log error, fallback to browser finish() } } } private fun followRedirect(trackedUrl: String): Uri { val client = OkHttpClient.Builder() .followRedirects(false) // We want to read Location ourselves .build() val request = Request.Builder() .url(trackedUrl) .get() .build() client.newCall(request).execute().use { response -> val location = response.header("Location") ?: throw IllegalStateException("Missing Location header") return Uri.parse(location) } } private fun routeToDestination(finalUri: Uri) { // Example: interpret https://www.mybusiness.com/dashboard/offers/coupons // and open the correct Activity / Fragment } }
mclick URL並使用**Location**標頭來決定最終目的地。followRedirects(false)來控制重新導向處理,並視需要準確地記錄分析。建議作法 deeplink-best-practices
- 使用穩定路徑:偏好可復原應用程式UI變更的路由(例如
/account/orders而非/tab/3/view/2)。 - 將追蹤的路徑列入帳戶:啟用連結追蹤時,點按的連結可能會使用追蹤的路徑模式(例如
/ee/v1/mclick/)。 請確定您的路由器可在解析追蹤的連結後剖析最終URL。 - 讓引數維持可預測:定義一致的引數配置(例如
?orderId=12345)。 - 避免URL中的敏感資料:請勿將機密或個人資料直接放入深層連結URL中。
- 測試您的深層連結:傳送證明,然後按一下已安裝應用程式之裝置上的深層連結。
- 在真實裝置上進行驗證:在實體裝置上進行驗證時,通用連結和追蹤連結解析行為會比在模擬器上更可靠。
- 驗證應用程式端路由:如果深層連結未開啟預期的畫面,請驗證應用程式端路由和URL格式(主機/路徑/查詢和URL編碼)。
- 請記得應用程式初始化:應用程式連結/通用連結行為在安裝及開啟應用程式至少一次後最為可靠。
疑難排解和常見問答( FAQ) troubleshooting-faq
- 驗證URL是否與您的應用程式註冊要處理的主機及路徑模式相符,包括在啟用連結追蹤時追蹤的點選路徑(例如
/ee/v1/mclick/下的路徑)。 - 針對iOS通用連結和Android應用程式連結,請確認網域關聯(AASA /
assetlinks.json)已正確設定且可供存取。 - 在真實裝置上進行測試(模擬器/模擬器對於連結關聯可能會有不同的行為)。
- 確認應用程式端路由器正確剖析URL路徑/查詢。
- 檢查URL編碼:保留的字元應使用URL編碼。
- 驗證引數名稱和值符合路由器的預期。
- 如果您的網站可以提供相同的HTTPS URL,則連結會在應用程式未安裝時開啟網頁作為遞補(相應地設定您的網頁目的地和路由)。
-
使用深層連結建立校訂,在iOS和Android裝置(已安裝或未安裝的情況)上按一下。
-
驗證:
- 最終電子郵件或簡訊連結值(主機/路徑/查詢)
- 作業系統層級的關聯(如果使用通用連結/應用程式連結)
- 應用程式內路由結果
assetlinks.json設定。appname://path)?appname://path),但建議的方法是通用連結或應用程式連結(https://),符合此頁面設定與實作區段中的HTTPS設定。mclick URL上執行GET時,您在Journey Optimizer中設定的UTM引數會包含在Location標頭中傳回的最終URL中,以便您將其用於應用程式內分析。/ee/v1/click/ URL的使用者體驗為何?mclick流程以應用程式深層連結處理。This section contains structured knowledge intended to support interpretation, retrieval, and question answering related to this topic.
For complete understanding, this information should be combined with the documentation on this page. Neither source is intended to stand alone; the page describes the feature, while this section provides additional context that helps disambiguate terminology, intent, applicability, and constraints.
- TL;DR: This page explains how to author deep links in email and SMS content, configure them in Journey Optimizer, and handle the tracked links in iOS and Android apps so recipients land on the right in-app screen.
Intents:
- Author a deep link in email (Email Designer or Personalization editor code) and in SMS (Url helper function)
- Complete the Journey Optimizer configuration for universal links (iOS) and app links (Android)
- Implement mobile app handling of tracked
mclicklinks in iOS and Android - Follow recommended practices and troubleshoot deep links that do not open the app or the expected screen
- Test deep links end-to-end by sending a proof and clicking on real devices
Glossary:
- Deep link: A link that takes recipients from an email or SMS message directly to a specific screen or content in a mobile app (product-specific)
- Universal links (iOS) / App links (Android): HTTPS-based deep links the configuration on this page applies to (product-specific)
- AASA / assetLinks.json: The association files hosted on your delegated subdomain for iOS (AASA) and Android (assetLinks.json) (product-specific)
/ee/v1/mclick/*: Tracked URLs that Adobe hosts and resolves for deep link clicks when link tracking is enabled (product-specific)
Guardrails:
- Deep links will not work unless you complete both the configuration and the mobile app implementation steps on this page.
- Deep linking is supported for both iOS and Android using tracked URLs (
/ee/v1/mclick/*) for compatibility and click tracking. - The configuration section applies when you use universal links (iOS) and app links (Android), which are HTTPS-based deep links.
- Tracked deep link clicks use URLs under
/ee/v1/mclick/*, which Adobe hosts and resolves, and apply when link tracking is enabled for the message. - For non-tracked links, the URL is not rewritten through Adobe systems; you must configure universal links or app links on your own domains and hosting.
- The app must perform a GET on the
mclickURL and read theLocationheader, then route based on the final URL; do not simply open themclickURL in a browser. - Hosting the AASA (iOS) and assetLinks.json (Android) files requires contacting Adobe Customer Care with the delegated subdomain and app bundle ID; Android also requires the SHA-256 certificate fingerprint.
Terminology:
- Canonical name: Deep link — Acronym: n/a — variants: deeplink, Deeplink (Insert link option)
- Synonyms: “universal links” (iOS) and “app links” (Android) = the HTTPS-based deep link setup
- Do not confuse: “
/ee/v1/mclick/*” (tracked deep link flow handled as an app deep link) ≠ “/ee/v1/click/” (opens in the device’s default web browser, standard click tracking) - Do not confuse: “tracked links” (rewritten through Adobe, use
mclick) ≠ “non-tracked links” (not rewritten; configured on your own domains)
FAQ:
- Q: What must be done before deep links work? — Complete both the configuration steps in Journey Optimizer and the mobile app implementation steps for iOS and Android.
- Q: How should the app handle the tracked link? — Perform a GET on the
mclickURL, read theLocationheader, and route based on the final URL; do not open themclickURL directly in a browser. - Q: What happens if the app is not installed? — If the same HTTPS URL can be served by your website, the link can open a web page as a fallback.
- Q: Are UTM parameters available in the app? — Yes; UTM parameters configured in Journey Optimizer are included in the final URL returned in the
Locationheader. - Q: How do I test end-to-end? — Send a proof (create a proof with a deep link) and click it on iOS and Android devices, for both installed and not-installed scenarios, validating on real devices.
- Q: Should I use a custom URL scheme like
appname://path? — You can, but the recommended approach is a universal link or app link (https://) matching the HTTPS-based setup on this page.