> 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/ja/nitsuitebitaidesuka/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/ja/nitsuitebitaidesuka/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、クリックトークン、またはトランザクションIDに使用されます。 | パートナー専用（パートナーのパフォーマンスレポートで表示）。         |
| `u5`                       | `audiences`                    | オーディエンスセグメント：対象顧客のメタデータ（詳細な形式は以下を参照）。                                | ブランドとパートナーの両方に表示されます。                  |

についてさらに詳しく知るには `sharedid` と `subId1` 動作については、以下を参照してください [パートナー向けのSub ID と Shared ID パラメータの説明](/partner/ja/nitsuitebitaidesuka/platform-features/tracking/tracking-links/link-parameters/sub-id-and-shared-id-parameters-explained-for-partners.md).

## オーディエンスパラメーターの設定（`u5` → `audiences`)

impact.com のリンクでは、オーディエンスのメタデータは `audiences` パラメータ（複数形）に入ります。2つのプラットフォームではメタデータの扱いが異なるため、旧来のペイロードをそのままコピーするとトラッキングが壊れます。

主な違い：

* **Rakuten Advertising（`u5`):** 標準の base64 でエンコードされた JSON *オブジェクト*、たとえば `{"41": "123,4567"}`.
* **impact.com（`audiences`):** JSON *配列*、たとえば `["123","4567"]`、base64url エンコードまたは生の URL エンコード済みペイロードを使用します。

次の2つの形式のいずれかを使用して、旧来の `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 エンコード）をちょうど1回だけ行う必要があります。
{% 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` となり、きれいな文字列になりません。エンコードは1回だけ行ってください。 |

## 開発者向けコードの青写真

この 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/ja/nitsuitebitaidesuka/getting-started/rakuten-advertising-to-impact.com-partner-migration-faq.md) — 移行中のアカウント連携、リンクリダイレクト、支払い、およびレポートについて回答を得る。
* [Rakuten から impact.com への用語リファレンス](/partner/ja/nitsuitebitaidesuka/getting-started/rakuten-to-impact.com-terminology-reference.md) — 各 Rakuten 用語に対応する impact.com の機能を見つけてください。
* [パートナー向けのSub ID と Shared ID パラメータの説明](/partner/ja/nitsuitebitaidesuka/platform-features/tracking/tracking-links/link-parameters/sub-id-and-shared-id-parameters-explained-for-partners.md) — Sub ID と Shared ID の仕組み、およびトラッキングでの一般的な使い方を学びます。
* [トラッキングリンクを作成する](/partner/ja/nitsuitebitaidesuka/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/ja/nitsuitebitaidesuka/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.
