> For the complete documentation index, see [llms.txt](https://help.impact.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.impact.com/partner/zh/ni-xiang-liao-jie-shen-me/getting-started/migrate-your-rakuten-advertising-tracking-to-impact.com.md).

# 将您的 Rakuten Advertising 跟踪迁移到 impact.com

本文向合作伙伴展示如何将其跟踪基础设施从 Rakuten Advertising (LinkShare) 迁移到 impact.com。可用它来映射动态参数、配置受众分群负载，并防止跟踪中断。有关账户关联、现有链接重定向和付款的问题，请参见 [Rakuten Advertising 到 impact.com：合作伙伴迁移 FAQ](/partner/zh/ni-xiang-liao-jie-shen-me/getting-started/rakuten-advertising-to-impact.com-partner-migration-faq.md).

## 链接结构对比

以下是旧版 Rakuten Advertising 跟踪链接如何转换为其原生 impact.com 对应链接：

```
旧版 Rakuten 链接 
https://click.linksynergy.com/fs-bin/click?id=[SID]&offerid=[MID]&type=3&subid=ABC&u1=QWERTYQWERTY&u5=eyI0MSI6ICIxMjMsNDU2NyJ9

impact.com 原生等效链接 
https://brand.sjv.io/c/[MPID]/[AdID]/[CampaignID]?sharedid=ABC&subId1=QWERTYQWERTY&audiences=WyIxMjMiLCI0NTY3Il0
```

## 参数映射参考

| Rakuten Advertising 参数 | impact.com 参数                | 用途和说明                                  | 报告可见性                  |
| ---------------------- | ---------------------------- | -------------------------------------- | ---------------------- |
| `subid`                | `sharedid` *（或 `subacctid`)* | 子合作伙伴 ID：标识下游子合作伙伴或子网络来源。              | 品牌和合作伙伴可见（支持自定义付款规则）。  |
| `u1`                   | `subId1`                     | 合作伙伴点击或会员 ID：用于唯一的忠诚度会员 ID、点击令牌或交易 ID。 | 仅合作伙伴可见（在合作伙伴绩效报告中可见）。 |
| `u5`                   | `audiences`                  | 受众分群：目标客户元数据（请参见下方详细格式）。               | 品牌和合作伙伴可见。             |

要了解更多关于 `sharedid` 和 `subId1` 如何工作，请参见 [合作伙伴的 Sub ID 和 Shared ID 参数说明](/partner/zh/ni-xiang-liao-jie-shen-me/platform-features/tracking/tracking-links/link-parameters/sub-id-and-shared-id-parameters-explained-for-partners.md).

## 受众参数配置（`u5` → `audiences`)

在 impact.com 链接中，受众元数据位于 `audiences` 参数（复数）中。由于两个平台处理元数据的方式不同，直接复制旧版负载会破坏你的跟踪。

核心区别：

* **Rakuten Advertising（`u5`):** 期望一个标准的 base64 编码 JSON *对象*，例如 `{"41": "123,4567"}`.
* **impact.com（`audiences`):** 期望一个 JSON *数组*，例如 `["123","4567"]`，使用 base64url 编码或原始的 URL 编码负载。

使用以下两种格式之一将你的旧版 `u5` 负载映射到 `audiences`:

{% tabs %}
{% tab title="方法 A：base64url 编码（推荐）" %}
impact.com 支持 base64url 字母表（RFC 4648 第 5 节）， *而不是* 标准 base64。

* 为何使用它：标准 base64 使用如下字符： `+`, `/`，并 `=`，Web 服务器在重定向期间可能会剥离或误解这些字符。base64url 会替换这些字符，因此跟踪保持干净。
  {% endtab %}

{% tab title="方法 B：URL 编码 JSON（更简单的代码集成）" %}
如果你的工程团队想避免重构标准 base64 库，你可以直接传递 JSON 数组，只要它只进行一次百分号编码（URL 编码）即可。
{% endtab %}
{% endtabs %}

## 受支持的负载转换示例

使用这些示例将旧版负载映射到 `audiences` 参数：

| 目标存储数据          | 原始 JSON 数组       | 旧版 Rakuten Advertising 方法（u5）  | 映射后的 impact.com 参数（audiences）                                                                         |
| --------------- | ---------------- | ------------------------------ | ----------------------------------------------------------------------------------------------------- |
| 123,4567        | `["123","4567"]` | `&u5=eyI0MSI6ICIxMjMsNDU2NyJ9` | `&audiences=WyIxMjMiLCI0NTY3Il0` *（base64url）* 或 `&audiences=%5B%22123%22%2C%224567%22%5D` *（URL 编码）* |
| 98765           | `["98765"]`      | `&u5=eyI0MSI6ICI5ODc2NSJ9`     | `&audiences=WyI5ODc2NSJd` *（base64url）*                                                               |
| 123,4567 (*数值*) | `[123,4567]`     | `&u5=eyI0MSI6WzEyMyw0NTY3XX0=` | `&audiences=WzEyMyw0NTY3XQ` *（base64url，去除填充位）*                                                       |

## 应避免的配置

你的验证脚本必须标记并阻止这些常见的格式错误：

| 查询参数示例                             | 为什么不受支持或会破坏跟踪                                              |
| ---------------------------------- | ---------------------------------------------------------- |
| `audiences=123,4567`               | *裸逗号列表。* 这不是有效的 JSON。                                      |
| `audiences=123`                    | *JSON 数字。* 会被解析为 JSON 数字，既不是数组也不是对象。                       |
| `audiences=WyJhw77DvsO%2BIl0%3D`   | *标准 base64。* 包含标准 base64 字符，例如 `+`，而 base64url 解码器不支持这些字符。 |
| `audiences=%255B%252212%2522%255D` | *双重百分号编码。* 解码后为 `%5B%2212%22%5D` 而不是干净的字符串。仅编码一次。          |

## 开发者代码蓝图

此 JavaScript 示例展示了如何将你的链接生成逻辑从 Rakuten Advertising 更新到 impact.com：

```javascript
// ❌ 旧版 RAKUTEN 链接逻辑 (u5)
const legacyAudience = {"41": "123,4567"};
const standardBase64 = btoa(JSON.stringify(legacyAudience)); // eyI0MSI6ICIxMjMsNDU2NyJ9
const rakutenLink = `https://click.linksynergy.com/fs-bin/click?id=AysPbYF8&u5=${encodeURIComponent(standardBase64)}`;

// impact.com 原生链接逻辑 (audiences)
const audienceArray = ["123", "4567"];
const jsonArrayString = JSON.stringify(audienceArray); // '["123","4567"]'

// 将标准 base64 转换为 base64url（替换 +、/ 并去除末尾的 =）
const base64UrlPayload = btoa(jsonArrayString)
  .replace(/\+/g, '-')
  .replace(/\//g, '_')
  .replace(/=+$/, ''); // WyIxMjMiLCI0NTY3Il0

const impactLink = `https://brand.sjv.io/c/123456/789012/3456?sharedid=ABC&subId1=QWERTYQWERTY&audiences=${base64UrlPayload}`;
```

## 更多资源

* [Rakuten Advertising 到 impact.com：合作伙伴迁移 FAQ](/partner/zh/ni-xiang-liao-jie-shen-me/getting-started/rakuten-advertising-to-impact.com-partner-migration-faq.md) — 在迁移期间获取有关账户关联、链接重定向、付款和报告的答案。
* [Rakuten 到 impact.com 术语参考](/partner/zh/ni-xiang-liao-jie-shen-me/getting-started/rakuten-to-impact.com-terminology-reference.md) — 查找与每个 Rakuten 术语对应的 impact.com 功能。
* [合作伙伴的 Sub ID 和 Shared ID 参数说明](/partner/zh/ni-xiang-liao-jie-shen-me/platform-features/tracking/tracking-links/link-parameters/sub-id-and-shared-id-parameters-explained-for-partners.md) — 了解 Sub ID 和 Shared ID 的工作方式，以及用于跟踪的常见用法。
* [创建跟踪链接](/partner/zh/ni-xiang-liao-jie-shen-me/platform-features/tracking/tracking-links/create-and-manage-links/create-tracking-links.md) — 获取品牌资产的 impact.com 跟踪链接，并附加跟踪参数。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.impact.com/partner/zh/ni-xiang-liao-jie-shen-me/getting-started/migrate-your-rakuten-advertising-tracking-to-impact.com.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
