Salesforce - Open Web Default
概述
了解 Email Studio。通过全球排名第一的电子邮件营销平台吸引您的客户。构建更智能的电子邮件—从基本的营销 campaign 到复杂的一对一消息。
1. 完成 Universal Email 先决条件
可能需要开发者
以下 Universal Email 先决条件包括提供 URI scheme 和其他可能需要开发人员的部分:
需要开发人员
以下 Universal Email 先决条件涉及应用代码更改:
2. 配置 Salesforce
在您的Salesforce帐户中启用仅网络默认标记
Work with your Salesforce and Branch Account Managers to enable web-only default tagging for your Salesforce BU, by providing your Salesforce account MID(s). Once enabled, all emails sent from those MIDs will click wrap every link with a click tracking domain using a
/u
path, which prevents the app from opening in iOS (Emails that have already been sent before enabling will open the app because they will not have/u
in the path).如果运行 Journey Builder / Triggered Sends,您必须执行以下操作之一以确保将 web-only 标记应用于这些电子邮件:
- 通过 Email Studio Triggered Send 操作后台 (Dashboard) 重新发布 journey triggered send
- 更新 Journey Builder 中的电子邮件活动
- 创建新的 journey 版本
保护您的Salesforce点击跟踪域
If your click tracking domain is not secure (i.e., secure domains will start with https://
), you will need to purchase an SSL SKU from your Salesforce Account Manager.
注意:请记住,Salesforce 可能需要4-6周来处理 SSL 证书请求。
在 Salesforce Marketing Cloud 中配置您的 AASA 文件
您的 Salesforce 帐户必须进行配置以正确处理 Universal Link。在 Email Studio 的 Send Management 部分下深度链接中配置设置。请确保您使用的帐户与正确的点击追踪域相对应。
- 输入 AppID 值
- Check the "Exclude Profile" and "Unsub Center" checkboxes to force links to these items to open in the browser and not the app, if desired.
- Click "Save" to save the configuration.
- 让 Salesforce 和 Branch 知道您已经完成了这一步,并您的技术客户经理确认一切正常。
3. 启用集成
要启用集成,您需要:
- 在左侧导航中,点击电子邮件 。
- 在电子邮件概述页面上,点击顶部的 Manager 选项卡。
- 找到您的 ESP,然后点击启用 。

Branch 会自动检测您在上述 Branch 帐户的初始设置过程中已经提供的所有全局链接设置。
If you have not set up your global link settings and redirect preferences, you will be prompted to do so at this time.
4. 提供点击追踪域
通过点击追踪域,您可以追踪打开电子邮件和点击链接的参与度。
如果您不确定点击追踪域(CTD)是什么,请查看一封你最近发送的电子邮件。如果将鼠标悬停在链接上或右键点击/复制链接地址,您将看到电子邮件中链接域与 HTML 中的 URL 不匹配。此域是您的 ESP 所使用的点击追踪域,为您提供点击报告。
Salesforce v1 Open App Default 集成要求您提供以下内容:
- 点击追踪域—通过 Salesforce 用于电子邮件链接的域
Remove
http://
orhttps://
when adding your click tracking domain in the Branch dashboard

请记住
- 您可以根据需要启用与多个 CTD 的集成,但是不能将同一 CTD 添加到多个 Branch 操作后台 (Dashboard) 或 ESP 集成中。
在点击下一步并继续进行验证与测试部分之前,请完成通过集成验证所需的以下部分。
5. 验证集成
生成 SSL 证书和 AASA 文件(仅 iOS)之后,您可以继续查看验证测试,修复所有问题,然后测试集成。
Branch 自动验证以下内容:
- 集成了 iOS SDK(必需)
- 集成了 Android SDK(必需)
- 深度链接已设置(必需)
- 点击追踪域已设置(必需)
- AASA 文件有效(必需)
- 已正确设置 SSL(必需)
- CNAME 指向 thirdparty.bnc.lt(视情况而定)
- 已设置 Universal Linking(必需)
- 托管的深度链接数据(可选)
- 正在追踪应用事件(可选)
- Android App Link(可选)

常见验证问题
CNAME 不指向 Branch
由于此集成要求 CNAME 指向 Salesforce,因此您总是会收到此错误。您可以放心地忽略。
无法正确设置 SSL
如果您在 SSL 证书验证方面遇到问题,那么原因通常是您的点击追踪域已经设置了 SSL,并且存在一些限制,使第三方无法代表您提交证书签名请求。
AASA 文件无效
幸运的是,最容易解决的错误恰恰是该错误的主要原因,它的问题取决于正确设置 SSL。通过解决 SSL 错误,AASA 文件错误应同时解决。
6. 测试集成
验证过程完成后,您可以通过生成测试链接来测试集成。 Branch 生成的测试链接是唯一的,因为它已经被转化为 Branch Link,并允许您进行测试而无需在 ESP 中创建电子邮件模板。实际上,一旦用户点击您的常规电子邮件模板链接,此转化就会在幕后进行。
要生成测试链接,您需要:
- 在验证和测试部分中,输入您的网站上的 URL。
- 点击获取测试链接 。
- 生成测试链接后,您可以通过以下方式分享它:
- 复制到剪贴板
- 短信
- 邮箱

生成测试链接后,请点击移动设备上的链接;不要忘记确认您的移动设备已经安装了该应用!
7. 生成电子邮件的 Branch Link
Domain Usage
Only use the app.link subdomain assigned to your app as the
branch_base_url
. Do not use custom subdomains or root domains.
1. 使用 Salesforce AMPscript 转化链接
通过 Salesforce AMPscript,我们会在 Salesforce 中添加新的内容区,以将您的电子邮件模板中的网页链接转化为 Branch Link。
-
Work with your Branch account manager to modify the following Salesforce AMPscript snippet, replacing
DOMAIN-HERE
with your Branch base domain (i.e., example.app.link):%%[ VAR @deeplink, @branch_base_url SET @branch_base_url = "https://DOMAIN-HERE/3p?%243p=e_et" SET @deeplink = CONCAT(@branch_base_url, CONCAT("&%24original_url=", URLEncode(@link_to_be_wrapped, 1, 1))) ]%%
-
After logging into Salesforce Marketing Cloud, click on Email Studio and then a sub-menu will appear. Click on Email in the dropdown menu:

- This will take you to the landing page for the Email section. Click on Content in the menu bar to navigate to the Content section:

- 在“内容”部分,您将在左侧看到文件夹列表。右键点击 我的内容 文件夹,然后在内容构建器菜单中选择 创建文件夹 :

- Name the folder
Branch
:

- 创建文件夹后,在右上角点击“创建”按钮,然后点击“内容块” ,最后点击“自由格式” :

- 在“自由格式”屏幕上,粘贴先前生成的代码段:

-
点击保存。
-
In the Create Free Form window that appears, enter
deeplink
in the text field named Content Name. Click on Save after you enter the text:

- 现在,您将返回到“内容”部分的文件夹列表,其中列出了文件Deeplink :
您现在已经成功创建了深度链接 AMPscript。
代码片段
The snippet below will follow this format. The code below also has a placeholder for
@branch_base_url
. Replace it with yours.
%%[ VAR @deeplink, @branch_base_url SET @branch_base_url = "BASE URL FROM BRANCH" SET @deeplink = CONCAT(@branch_base_url, CONCAT("&%24original_url=", URLEncode(@link_to_be_wrapped, 1, 1))) ]%%
配置您的 Salesforce 电子邮件模板
本节介绍如何将现有电子邮件模板中的各个链接转化为 Branch 深度链接。您需要对要转化为 Branch 深度链接的电子邮件模板中的所有链接执行此操作。
例如,如果您决定将下面的链接转化为 Branch Link:
<a href="https://branch.io/product/1234/"> I want it! </a>
This is what the link will look like in the email template, after you added the AMPscript to convert it into a Branch link:
%%[ SET @link_to_be_wrapped = "https://branch.io/product/1234/" ContentAreaByName("My Contents\branch\deeplink") ]%%
<a href="%%=RedirectTo(@deeplink)=%%">Example link</a>
使用 AMPscript 将链接转化为 Branch Link 的过程如下(此流程将链接转化为单独的文档,然后将其粘贴回最终模板中):
-
登录到 Salesforce Marketing Cloud
-
Click on Email Studio and then a sub-menu will appear. Click on Email in the dropdown menu:
-
This will take you to the landing page for the Email section. Click on Content in the menu bar to navigate to the Content section:
-
前往包含您的电子邮件的文件夹,然后打开一个现有的电子邮件。确保电子邮件采用 HTML 布局,如下所示:
-
Choose a link that you want to convert to a Branch deep link. Copy the text right after the
href=
in your email template, and paste it into a separate document. In the example, it is:"https://branch.io/product/1234/"
-
添加
%%[ SET @link_to_be_wrapped =
before the link in your separate document. In the example, this is now:%%[ SET @link_to_be_wrapped =
"https://branch.io/product/1234/"
-
添加
ContentAreaByName("My Contents\branch\deeplink"")]%%
after the link:%%[ SET @link_to_be_wrapped = "https://branch.io/product/1234/"
ContentAreaByName("My Contents\branch\deeplink"")]%%
-
From the original link in your template, copy the text from and including
<a
until thehref=
. Add it to the text after%%
in the last step. Please include the<a
but not thehref=
:%%[ SET @link_to_be_wrapped = "https://branch.io/product/1234/" ContentAreaByName("My Contents\branch\deeplink"") ]%%
<a style="_any css can be added here_"
-
添加
href="%%=RedirectTo(@deeplink)=%%"
to the end:%%[ SET @link_to_be_wrapped = "https://branch.io/product/1234/" ContentAreaByName("My Contents\branch\deeplink"") ]%% <a style="_any css can be added here_"
href="%%=RedirectTo(@deeplink)=%%"
-
From the original link in your template, copy the end of the tag, the link text, and the closing tag (
>I want it!</a>
in the example) and add it to the end:%%[ SET @link_to_be_wrapped = "https://branch.io/product/1234/" ContentAreaByName("My Contents\branch\deeplink"") ]%% <a style="_any css can be added here_" href="%%=RedirectTo(@deeplink)=%%"
>I want it!</a>
-
Copy your final result from the separate document back into your email template, replacing everything inside and including the
<a></a>
tags in the template. -
对您要转换化 Branch 深度链接的电子邮件模板中的所有链接重复此操作。
链接转化摘要
Wherever you use
<a>
tags in your email templates, replace those with AMPscript to convert the web URLs into Branch links. The AMPscript references the Content Area setup earlier.%%[SET @link_to_be_wrapped = "ADD YOUR LINK HERE" ContentAreaByName("My Contents\branch\deeplink"")]%% <a href="%%=RedirectTo(@deeplink)=%%">Click Me</a>
For example,
Before:
<a href="https://branch.io/product/1234">Example link</a>
之后:
%%[ SET @link_to_be_wrapped = "https://branch.io/product/1234" ContentAreaByName("My Contents\branch\deeplink") ]%%
<a href="%%=RedirectTo(@deeplink)=%%">Example link</a>
After you convert links into Branch links in your email templates, you must also add Salesforce's link attribute mc-deep-link="true"
to your link tags to ensure the app opens in iOS:
<a mc-deep-link="true" href="https://my.app.link/3p?$3p=e_et&$original_url=..." > Open App </a>
内容区域文件夹
Make sure your
deeplink
Content Area is in the right folder. Either change the folder to "My Contents" or change the path used by "ContentAreaByName" in the Branch script.
2. 使用 Branch Quick Link
添加 "$3p":"e_et"
to the deep link data of any links you use in email to ensure Universal Link and click tracking works as expected. Then add any other deep link keys you need for your specific deep link use cases.
After you insert Branch links into your email templates, you must also add Salesforce's link attribute mc-deep-link="true"
to your link tags to ensure the app opens in iOS:
<a mc-deep-link="true" href="https://my.app.link/3p?$3p=e_et&$original_url=..." > Open App </a>
高级
[可选]使用 Branch Link 追踪网页链接
这种集成使您无法立即通过 Branch 追踪网页链接,它将通过 Salesforce 执行。如果您需要追踪网页链接,有几种变通方法来进行追踪。这些 Branch Link 将打开网站,而不是应用。
创建 Branch 网页追踪链接的方法:
方法1:修改后的 Branch Quick Link
- In the Branch Dashboard, create a Quick Link.
- 添加 campaign 标记以进行追踪。
- 在深度链接选项卡中,将 has_app = false 和 $ web_only = true 添加到链接数据。

-
在重定向选项卡中,设置网页重定向以作后备。选择适用于Android,iOS 和桌面的 wweb URL,然后添加要重定向的 URL。
-
After the link is created, add
_webonly
to the app.link domain.
* Ex: If the link created is https://branchster.app.link/weblinktest, convert it to https://branchster_webonly.app.link/weblinktest.
方法2:Branch Long Link
Start with your app.link domain, and add _webonly
to it.
- Ex: If your app.link domain is https://branchster.app.link, convert it to https://branchster_webonly.app.link
将 has_app = false 和 $web_only=true 作为查询参数添加。
在链接中添加 〜campaign 标签。
- Ex: (https://branchster_webonly.app.link/?has_app=false&$web_only=true&~campaign=email-test-cam)[https://branchster_webonly.app.link/?has_app=false&$web_only=true&~campaign=email-test-cam]
Add the URI encoded web redirect link as $fallback_url.
* Ex: (https://branchster_webonly.app.link/?has_app=false&$web_only=true&~campaign=email-test-cam&$fallback_url=https%3A%2F%2Fwww.myweblink.com%2F)[https://branchster_webonly.app.link/?has_app=false&$web_only=true&~campaign=email-test-cam&$fallback_url=https%3A%2F%2Fwww.myweblink.com%2F]
Branch 操作后台 (Dashboard) 上的分析
要查看电子邮件 campaign 的效果并将其细分,使用〜campaign 标签标记这些链接非常重要。这将有助于删除重复数字,从而查看下游事件。您可以在任何操作后台 (Dashboard) 视图的任何比较和筛选项中添加 campaign 标签。