> 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/brand/ja/what-would-you-like-to-learn-about/platform-features/ads/manage-ads/test-a-dynamic-content-ad.md).

# 動的コンテンツ広告をテスト

コンテンツ広告を保存したら、リダイレクト経路が想定どおりに機能することをテストできます。最も簡単な方法は、テスト用のパートナーアカウントにコンテンツ広告を送信することです。

{% stepper %}
{% step %}

## パートナーアカウントに共有する

1. 左側のナビゲーションメニューで、 ![](https://1458456015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-230534471fef5f40808e921e41ee44e4a06ded03%2Fe6cb9548999afdc1ed3ce4942e4cb5b45b5cecbd323267aac2a7cd1915fccc09.svg?alt=media) **\[エンゲージ] → コンテンツ → 広告**.
2. 画面で *広告* 一覧からコンテンツ広告を見つけ、 **共有**.
3. 画面で *広告を送信* フィールドを見つけ、 *パートナー* フィールドで **検索ボックス** を使ってテスト用のパートナーアカウントを追加します。
4. 画面下部で、 **広告を送信**.

<div data-with-frame="true"><figure><img src="https://1458456015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2FvvrhYMCmtKuUpvVMu6HD%2FScreenshot%202026-05-08%20at%2011.00.50.png?alt=media&amp;token=363283dd-5885-400d-a21e-b9bf06e308bf" alt="" width="375"><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

## パートナーアカウントでテストする

1. 新しいブラウザー（またはシークレットタブ）で、 **サインイン** して、テスト用のパートナーアカウントにログインします。
2. 上部のナビゲーションメニューで、 **コンテンツ → アセット**.
3. 広告を選択し、表示されたモーダルで **アセットコード → コードをコピー**.
   * コードブロックで、絶対リンクがトラッキングリンクに変わっていることを確認します。
     {% endstep %}

{% step %}

## 検証エラーのトラブルシューティング

コンテンツ広告を [作成または更新](https://help.impact.com/brand/ja/what-would-you-like-to-learn-about/platform-features/ads/create-an-asset.md) すると、次のエラーメッセージが表示されることがあります。解決方法は次のとおりです。

| 検証エラー                     | 説明                                                                                                                                              |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| *「置換可能なリンクがありません」*        | impact.com は、 *コンテンツ* フィールド内に置換可能なリンクを検出できません。リンクにはプロトコルを含める必要があります。 `http` を使用するリンクは、自動的に `https`.                                             |
| *「広告名を空にすることはできません」*      | コンテンツ広告の名前を *名前* フィールドに入力してください。                                                                                                                |
| *「アンカーのURLが絶対URLではありません」* | 「コンテンツ」内に、絶対URLではないリンクが少なくとも1つあります。絶対URLは、 *コンテンツ* から始まる完全なパスを使用します。 `http://` または `https://`。構文上の問題がないか確認します。たとえば、前後にスペースがないか確認してください `href=`. |
| {% endstep %}             |                                                                                                                                                 |
| {% endstepper %}          |                                                                                                                                                 |

## 動的コンテンツ広告の例

以下の *サンプルコード* には、次の要素が含まれています。

* テキストボックスと「送信」ボタンを含むHTMLフォーム
* 他のコンテンツとは独立してフォームのスタイルを設定する埋め込みCSS
* ウィジェット用の `<div>` コンテナ
* impact.comのトラッキングリンクを動的に作成し、クエリ文字列パラメーターを追加するJavaScript関数
* システムがスクリプトを受け入れるための `<noscript>` タグ。これは、クリエイティブに外部リンクがない場合に必要です（このタグがないと、クリエイティブをアップロードしようとした際にエラーが発生します）。

  実際には、これらの要素の多くをウェブサイトでホストまたは埋め込むことができます。impact.comは、動的コンテンツ用の外部HTML、CSS、JavaScriptファイルをサポートしています。
* JavaScriptコードは動的トークンを使用してトラッキングURLを生成し、検索語句をクエリ文字列パラメーターとして追加します。
* コンテンツに絶対URLがないため、 `{domain}`, `{irpid}`, `{iradid}`および `{ircid}` を動的トークンとして使用してトラッキングリンクを生成します。生成されたリンクには、プログラムのトラッキングドメイン、パートナーID、広告ID、プログラムIDの値が設定されます。利用可能なすべてのトークンについては、 [動的トークンのリファレンス](#dynamic-token-reference) をご覧ください。
* クリックすると、顧客はimpact.comを経由してからランディングページに転送されます。この例では、 `https://www.example.com`

<details>

<summary>サンプルコード</summary>

```html
<style type="text/css">  
#search-widget-container 
{    font-family:"Verdana";
     padding:20px;     
     width:280px;    
     height:75px;
     margin:30px;
     background:#FFFFFF;
     border:1px solid #BBBDBF;
     border-radius:6px;
     box-shadow:5px 5px 2px rgba(0,0,0,0.1);   }   
     #submitbutton 
     {background:#fff;
     color:#3B91CF;
     font-weight:bold;
     font-size:12px;
     padding:5px:
     border-radius:6px;
     border:1px solid #3B91CF;
     cursor:pointer;   }   
    #submitbutton:hover {    
     background:#3B91CF;
     color:#fff;  }
     #searchbox {
      width:200px;
      margin:10px 10px 10px 0px;   }
</style>
<div id='search-widget-container'>
<img src="http://www.impactradius.com/wp-content/uploads/2014/05/impact-radius-logo.png" width="150px">  
<form><input name='searchTerm' 
   id='searchBox'
   type='text' 
   placeholder='ウェブサイトを検索'>
    <input onClick="searchFunction()" 
     type='submit' 
     value='送信'
     id='submitbutton'>
 </form>
</div>
<script type="text/javascript">
function searchFunction() {  
// 検索ボックスにユーザーが入力した値を取得 
var searchTerm = document.getElementById("searchBox").value;  
var landingPage = "http://{domain}/c/{irpid}/{iradid}/{ircid}?p.searchTerm=";
// landingPage の末尾に searchTerm を追加
var completeURL = landingPage.concat(searchTerm);
// 顧客を最終的な完全URLに移動させる
window.location.href = completeURL;   } 
</script>
<noscript>
<a href=”http://www.example.com”>スクリプト無効時のリンク</a>
</noscript>
```

</details>

<details>

<summary>動的トークンのリファレンス</summary>

| トークン                    | 対応箇所                     | 説明                                                |
| ----------------------- | ------------------------ | ------------------------------------------------- |
| `{irpid}`               | アセットコンテンツ / インプレッションピクセル | パートナーのimpact.comパートナーIDが入力されます。                   |
| `{iradid}`              | アセットコンテンツ / インプレッションピクセル | 広告に割り当てられた広告IDが入力されます。                            |
| `{ircid}`               | アセットコンテンツ / インプレッションピクセル | プログラムに割り当てられたimpact.comプログラム（またはキャンペーン）IDが入力されます。 |
| `{subId1}` - `{subId3}` | アセットコンテンツ                | パートナーのSubIdの値（トラッキングとレポートに使用）が入力されます。             |
| `{sharedId}`            | アセットコンテンツ                | レポート用のパートナーのSharedId値が入力されます。                     |
| `{domain}`              | アセットコンテンツ / インプレッションピクセル | プログラムのトラッキングドメインが入力されます。                          |
| `{timestamp}`           | アセットコンテンツ                | 広告の取得時のタイムスタンプ（Unixエポック形式）が入力されます。                |
| `{randint}`             | アセットコンテンツ / インプレッションピクセル | 広告の取得時にランダムに生成された整数が入力されます。                       |

</details>


---

# 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/brand/ja/what-would-you-like-to-learn-about/platform-features/ads/manage-ads/test-a-dynamic-content-ad.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.
