在此页面上:了解如何在电子邮件和短信内容中创作深层链接,在Adobe Journey Optimizer中配置这些链接,并在iOS和Android应用程序中处理跟踪链接,以便收件人登陆正确的应用程序内屏幕。
深层链接可帮助您将收件人从电子邮件或短信消息引导至移动应用程序中的特定屏幕或内容片段。 它有助于将用户直接引导至所需的应用程序内体验,而无需通过Web浏览器或应用商店路由他们,因此该历程始终相关且符合品牌要求。
当您的收件人单击深层链接时,他们会直接转到预期的应用程序内内容 — 前提是您已完成:
/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
对于短信,使用个性化编辑器中的Url帮助程序功能创作深层链接。 在本节中了解如何添加指向短信内容的链接。
要在短信内容中插入深层链接,请使用以下语法:
{{url originalUrl='<<url>>' type='DEEPLINK' action='CLICK'}}
<<url>>替换为您的实际深层链接URL。Journey Optimizer中的配置 configuration
要在移动应用程序的电子邮件和短信中使用深层链接,请完成以下配置步骤。
/ee/v1/mclick/*下的URL,Adobe会托管这些URL并对其进行解析。移动应用程序实施 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标头,然后基于final** 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编码)。
- 请牢记应用初始化:应用链接/通用链接行为在安装并打开应用至少一次后最为可靠。
疑难解答和常见问题 troubleshooting-faq
- 验证URL是否与注册应用程序以处理的主机模式和路径模式匹配,包括在启用链接跟踪时跟踪的点击路径(例如
/ee/v1/mclick/下的路径)。 - 对于iOS通用链接和Android应用程序链接,请确认域关联(AASA /
assetlinks.json)已正确配置且可访问。 - 在真实设备上测试(模拟器/仿真器可能会因链路关联而表现出不同的行为)。
- 确认应用端路由器正确解析URL路径/查询。
- 检查URL编码:保留字符应该使用URL编码。
- 验证参数名称和值是否与路由器的预期相符。
- 如果您的网站可以提供相同的HTTPS URL,则当未安装应用程序时,该链接会打开网页作为回退措施(相应地配置Web目标和路由)。
-
使用深层链接创建验证,然后在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.