> For the complete documentation index, see [llms.txt](https://docs.exoclick.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.exoclick.com/publishers/ja/saitotozn/neitibuno.md).

# ネイティブ広告の設定

作成する [ネイティブ広告](/publishers/ja/saitotozn/create-zone.md#recommendation-widget) ゾーンの作成は簡単ですが、非常に柔軟にカスタマイズできます。ニーズに応じて、ネイティブ広告ゾーンの設定には少し異なる手順を使えます:

* **シナリオ A**: 広告ゾーンを設定し、ネイティブ広告ゾーンの画像のアスペクト比を選び、その後、サイト上の広告ゾーンのサイズをそれに合わせるだけです。
* **シナリオ B**: カスタム画像サイズまたは比率に合わせて広告ゾーンを設定し、広告ゾーンがサイトと同じ見た目でぴったり収まるようにしたい場合です。
* **シナリオ C**: サイト上に特定サイズのゾーンがあり、それに収まり、見栄えのよい広告ゾーンを作成したい場合です。

どのシナリオを選んでも、最初に行う必要があるのはネイティブ広告ゾーンを作成することです。

## ネイティブ広告ゾーンの作成

パブリッシャーとしてログインしている場合は、 **サイトとゾーン**, **新しいゾーン**をクリックし、 **ネイティブ** セクションを展開して、ネイティブ広告フォーマットを選択します **レコメンドウィジェット** をクリックします **次へ**.

![ネイティブゾーンを作成](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/1lsZ4Ki3CIL173vBDbzo/assets/hires/create-zone-native.png)

ゾーンの詳細を入力して、 **次へ**.

{% tabs %}
{% tab title="シナリオ A: クイックレイアウト: アスペクト比を設定" %}
このシナリオでは、管理パネルで画像のアスペクト比を設定し、広告ゾーン全体のサイズを設定する必要はありません。 **クイックレイアウト**を使用すると、作成した広告ゾーンは配置したコンテナーのサイズに自動的に適応します。

{% stepper %}
{% step %}

### 手順 1

![ネイティブ手順 1](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/i4nnDybTXZj0jYx8l8ie/assets/hires/native/sca-step1.png)

を選択します。 **クイックレイアウト** タブを選択します。 **デスクトップレイアウト** セクションで、デスクトップに表示したい広告の列数と行数を設定します。
{% endstep %}

{% step %}

### 手順 2

![ネイティブ手順 2](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/XcQLr7Fi2GR8u2O7oLcD/assets/hires/native/sca-step2.png)

次に、 **画像設定** のドロップダウンから画像のアスペクト比を選択します。 **1:1**, **4:3** または **16:9**の間から選び、サイト上のサムネイルに合わせることができます。
{% endstep %}

{% step %}

### 手順 3

![ネイティブ手順 3](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/5LzyX7rTkfZEucmCbY04/assets/hires/native/sca-step3.png)

* アスペクト比を選択したら、チェックボックスを使ってテキストを表示するかどうかを選び、その表示位置を決めます。
* このテキストは **タイトル** と **説明文**で構成されています。必要であれば、 **タイトル** と **説明文** セクションでそれぞれ個別にオン/オフできます。
* 右側のプレビューで広告ゾーンの見た目を確認し、必要に応じて設定を再調整してください。
  {% endstep %}

{% step %}

### 手順 4

![ネイティブ手順 4](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/pXcT9dbHa7ocZdeuSgGC/assets/hires/native/sca-step4.png)

* 上記の手順 1〜3 を **モバイルレイアウト** セクションで繰り返し、モバイル向けに広告ゾーンを設定します。
  {% endstep %}

{% step %}

### 手順 5

![ネイティブ手順 5](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/aEaqn3SVREPSkqBxUCks/assets/hires/native/mobile-breaking-point.png)

* 画面右側の **デスクトップ** と **モバイル** の両方のプレビューを確認します。デスクトップ表示とモバイル表示の切り替え点は、 **モバイルのブレークポイント** のドロップダウンで **詳細オプション**.
* に設定できます。ブレークポイントは **800px** を iPad 用に、 **450px** をモバイル用に、そして **非レスポンシブ**に設定できます。ブレークポイントを変更すると、デスクトップレイアウトセクションの設定がデスクトップと iPad の両方に適用されるか、デスクトップのみになるかが変わります。
* プレビューの見た目に満足したら、 **作成**.
  {% endstep %}

{% step %}

### 手順 6

![ネイティブ手順 6](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/rlwldJZoXYmsGjD1utp6/assets/hires/native/scn_new.png)

* をコピーして **ゾーン HTML タグ** サイトに追加します。
* 広告ゾーンは、タグを入れたコンテナーの 100% に自動的に調整されます。つまり、コンテナーが大きいほど、ゾーンも広告も大きくなります。
  {% endstep %}
  {% endstepper %}
  {% endtab %}

{% tab title="シナリオ B: クイックレイアウト: カスタム画像サイズを設定" %}
このシナリオでは、画像サイズと広告の間隔を変更してサイトに合わせられるようにしたい場合です。これは、ネイティブ広告をサイトの編集コンテンツの一部のように見せたいときに行います。

{% stepper %}
{% step %}

### 手順 1

![ネイティブ手順 7](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/esjgXHOuLYDy2kSfiWXV/assets/hires/native/scb-step1.png)

* を選択します。 **クイックレイアウト** タブを選択します。 **デスクトップレイアウト** セクションで、デスクトップに表示したい広告の列数と行数を設定します。
  {% endstep %}

{% step %}

### 手順 2

![ネイティブ手順 8](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/9knI85T5uv4S2k0ennMD/assets/hires/native/scb-step2.png)

* で **画像設定** のドロップダウンから **カスタムサイズ** を選択し、サイトに合わせて画像の幅と高さを設定します。サイトにメタタグが含まれていてレスポンシブである場合、サイトを表示すると画面サイズが小さくなるにつれて画像もそれに応じて変化します。 **ウィジェットサイズ** と **画像サイズ** に関する情報は、プレビュー上部の右上に表示されます。
  {% endstep %}

{% step %}

### 手順 3

![ネイティブ手順 9](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/YWchSf0txs1p9pbnCBXb/assets/hires/native/scb-step3.png)

* 画像サイズを設定したら、 **テキスト** チェックボックスを使ってテキストを表示するかどうかを選び、その表示位置を選択します。
* 右側のプレビューで広告ゾーンの見た目を確認し、必要に応じて設定を再調整してください。
  {% endstep %}

{% step %}

### 手順 4

![ネイティブ手順 10](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/A8dhcTNINaI7ni1fz9Ho/assets/hires/native/scb-step4.png)

* 手順 1〜3 を **モバイルレイアウト** セクションで繰り返し、モバイル向けに広告ゾーンを設定します。
  {% endstep %}

{% step %}

### 手順 5

![ネイティブ手順 11](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/4EatUeZ6VmU4VsaUQpfE/assets/hires/native/scb_advance1.png)

* で **詳細オプション** セクションで繰り返し、各広告の周囲に何ピクセルの **縦方向の余白** と **横方向の余白** を入れるかを設定できます。

{% hint style="info" %}
**注**: これらの設定を変更すると、広告ゾーン全体のサイズが変わります。
{% endhint %}
{% endstep %}

{% step %}

### 手順 6

![ネイティブ手順 12](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/aEaqn3SVREPSkqBxUCks/assets/hires/native/mobile-breaking-point.png)

* 画面右側の **デスクトップ** と **モバイル** の両方のプレビューを確認します。デスクトップ表示とモバイル表示の切り替え点は、 **モバイルのブレークポイント** のドロップダウンで **詳細オプション**.
* に設定できます。ブレークポイントは **800px** を iPad 用に、 **450px** をモバイル用に、そして **非レスポンシブ**に設定できます。ブレークポイントを変更すると、デスクトップレイアウトセクションの設定がデスクトップと iPad の両方に適用されるか、デスクトップのみになるかが変わります。
* プレビューの見た目に満足したら、 **作成**.
  {% endstep %}

{% step %}

### 手順 7

![ネイティブ手順 13](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/rlwldJZoXYmsGjD1utp6/assets/hires/native/scn_new.png)

* をコピーして **ゾーン HTML タグ** サイトに追加します。
* サイト上の広告ゾーンのサイズが、今作成したゾーンのサイズと一致していることを確認してください。
  {% endstep %}
  {% endstepper %}
  {% endtab %}

{% tab title="シナリオ C: カスタムレイアウト: 固定ゾーンサイズを設定" %}
このシナリオでは、サイトに必要なサイズに合わせて広告ゾーンのサイズを設定し、広告が適切に表示されるように設定を調整したい場合です。

{% stepper %}
{% step %}

### 手順 1

![ネイティブ手順 13](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/JEhQvAhXNjExOj7GXOyw/assets/hires/native/scc-step1.png)

を選択します。 **カスタムレイアウト** タブを選択します。 **デスクトップレイアウト** セクションで、作成したい広告ゾーン全体の **幅** と **高さ** を設定します。
{% endstep %}

{% step %}

### 手順 2

![ネイティブ手順 14](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/WVwRdNmMUtNGQnymV67U/assets/hires/native/scc-step2.png)

次に、広告ゾーンに表示したい広告の **列数** と **行数** を選びます。右側のプレビューで、選択したサイズに対してどの設定が合うかを確認してください。
{% endstep %}

{% step %}

### 手順 3

![ネイティブ手順 15](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/oObBcmxtsFqPjD2pa1fl/assets/hires/native/scc-step3.png)

希望する列数と行数を選んだら、 **テキスト** チェックボックスを使ってテキストを表示するかどうかを選び、 **テキスト位置** のドロップダウンで表示位置を選択します。
{% endstep %}

{% step %}

### 手順 4

![ネイティブ手順 15](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/wdY8i3TWgXoyIWW3SYrW/assets/hires/native/scc-step4.png)

手順 1〜3 を **モバイルレイアウト** セクションで繰り返し、モバイル向けに広告ゾーンを設定します。
{% endstep %}

{% step %}

### 手順 5

![ネイティブ手順 16](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/aEaqn3SVREPSkqBxUCks/assets/hires/native/mobile-breaking-point.png)

* 画面右側の **デスクトップ** と **モバイル** の両方のプレビューを確認します。デスクトップ表示とモバイル表示の切り替え点は、 **モバイルのブレークポイント** のドロップダウンで **詳細オプション**.
* に設定できます。ブレークポイントは **800px** を iPad 用に、 **450px** をモバイル用に、そして **非レスポンシブ**に設定できます。ブレークポイントを変更すると、デスクトップレイアウトセクションの設定がデスクトップと iPad の両方に適用されるか、デスクトップのみになるかが変わります。
* プレビューの見た目に満足したら、 **作成**.
  {% endstep %}

{% step %}

### 手順 6

![ネイティブ手順 17](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/rlwldJZoXYmsGjD1utp6/assets/hires/native/scn_new.png)

をコピーして **ゾーン HTML タグ** サイトに追加します。
{% endstep %}
{% endstepper %}
{% endtab %}
{% endtabs %}

## モバイルのブレークポイントで非レスポンシブを選択する

* 詳細オプションでモバイルのブレークポイントを非レスポンシブに設定すると、以下のモーダルが画面に表示されます。

![非レスポンシブ2](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/AHKGWus2UFehm3E9QMTe/assets/hires/unresponsive2.png)

![非レスポンシブ3](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/MbemiUHb7Szd9C1r4JWZ/assets/hires/unresponsive3.png)

* モーダル内の **続行** をクリックすると、モバイルやタブレットを含むすべてのデバイスで広告にデスクトップレイアウトが適用されます。
* 非レスポンシブが選択されると、モバイルレイアウトはユーザーが編集できなくなります。
* 以前に保存されていない場合、画像設定はデフォルトのカスタムサイズ（幅 200px、高さ 200px）に更新されます。

## ネイティブ広告でカスタム CSS を使用する

![バナー](https://729358990-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGoSwRYjxsR1XS6va6yLj%2Fuploads%2FbUrcdZCax7qachURBVTS%2Fimage.png?alt=media\&token=75616bc9-e5e7-42a2-8c9b-34707a1e0bc2)

で **カスタム CSS** セクションでは、広告ゾーンがサイト上で正しく表示されるようにカスタム CSS を追加できます。最も重要な CSS クラスが開始点として用意されています。CSS について詳しくは [こちら](https://www.w3schools.com/css/default.asp).

{% hint style="info" %}
**注**：カスタム CSS の変更はプレビューには表示されず、サイト上でのみ表示されることに注意してください。
{% endhint %}

### ネイティブ広告用の CSS クラス

最初からボックス内に 5 つの CSS クラスが用意されており、必要に応じて追加のスタイルを貼り付けることができます。これら 5 つの CSS クラスは、次のようにネイティブ広告の最も重要な要素をスタイル設定します:

![ネイティブ広告 CSS](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/ThwwsRHFlTOSbIoMqI1E/assets/hires/native-ad-css-class.png)

| クラス                                | 動作                       |
| ---------------------------------- | ------------------------ |
| .msg-native-widget-outer-container | ウィジェットコンテナー全体をスタイル設定します。 |
| .msg-native-widget-item            | 各アイテムのコンテナーをスタイル設定します。   |
| .msg-native-widget-item-image      | 画像をスタイル設定します。            |
| .msg-native-widget-item-title      | タイトルテキストをスタイル設定します。      |
| .msg-native-widget-item-text       | 説明文をスタイル設定します            |

### 追加の CSS クラス

以下の追加 CSS クラスを使って、ネイティブ広告のスタイルを設定することもできます:

| クラス                                   | 動作                         |
| ------------------------------------- | -------------------------- |
| .msg-native-widget                    | ウィジェット全体を囲みます。             |
| .msg-native-widget-header             | ヘッダー要素を囲みます。               |
| .msg-native-widget-outer-container    | すべての広告を囲みます。               |
| .msg-native-widget-item-container     | 広告ボックスを囲みます。               |
| .msg-native-widget-item-image-wrapper | 広告ボックス内の画像を囲みます。           |
| .msg-native-widget-item-image-ratio   | 広告画像のアスペクト比を設定します。         |
| .msg-native-widget-item-content       | 広告ボックス内のすべてのテキストを囲みます。     |
| .msg-native-widget-item-content-box   | 広告ラッパーのタイトル、説明文、ブランドを囲みます。 |
| .msg-native-widget-item-brand         | 広告ブランドをスタイル設定します。          |

**例**

* 以下の例では、パブリッシャーが必要に応じてネイティブ広告ゾーンの設定で CSS スタイルを調整する方法を示します。

{% stepper %}
{% step %}

#### 1. テキストボックスを画像の上に配置する。

![ネイティブ広告 CSS の例](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/QFAzxUnKNOild5gSn0VS/assets/hires/native-ad-css-text-on-image.png)

```css

 .msg-native-widget-item-content {
      position: absolute !important;
      bottom: 0px  !important;
      z-index: 3  !important;
      top: unset  !important;
      height: 50px  !important;
      left: 15px;
   }

```

{% endstep %}

{% step %}

#### 2. テキストボックスのサイズを変更する。

![ネイティブ広告 CSS の例](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/qx3YHuopQjx13mXCcF6v/assets/hires/native-ad-css-size-of-text-box.png)

```css

 .msg-native-widget-item-content {
      height: 50px  !important;
   }

```

{% endstep %}

{% step %}

#### 3. テキストボックスを画像の上に配置し、透明度付きの背景をテキストボックスに追加する。

![ネイティブ広告 CSS の例](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/rrwKCULO65AOG3mF2Y5z/assets/hires/native-ad-css-text-on-image-with-background.png)

```css

 .msg-native-widget-item-content {
      position: absolute !important;
      bottom: 0px  !important;
      z-index: 3  !important;
      top: unset  !important;
      height: 50px  !important;
      background-color: black !important;
      opacity: 0.7 !important;
    }
.msg-native-widget-item-title {
    margin-left: 5px !important;
    padding-top: 3px !important;
    color: white !important;
    }
.msg-native-widget-item-text {
    margin-left: 5px !important;
    padding-top: 3px !important;
    color: white !important;
    }
.msg-native-widget-item-brand {
    margin-left: 5px !important;
    padding-top: 3px !important;
    color: white !important;
    }

```

{% endstep %}

{% step %}

#### 4. 画像の角を丸くする。

![ネイティブ広告 CSS の例](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/FwVaN0LAs4cUEaw1RaTy/assets/hires/native-ad-css-round-the-corners.png)

```css

 .msg-native-widget-item-image {
    border-radius: 5% !important;
    }   

```

{% endstep %}

{% step %}

#### 5. フォントのスタイルを設定する。これにより、パブリッシャーはサイト上で利用可能なフォントや、ゾーン設定で利用できるもの以外のフォントを使用できます。

![ネイティブ広告 CSS の例](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/4VgfwQ8IQHImagcqHtFr/assets/hires/native-ad-css-other-options.png)

```css

 .msg-native-widget-item-title, .msg-native-widget-item-text, .msg-native-widget-item-brand {
   font-family: fantasy !important;
   }

```

{% endstep %}

{% step %}

#### 6. 画像とテキストの間に余白を追加して、テキストを画像に近づけたり離したりできるようにすることです。padding-bottom を使ってテキストの下に余白を追加することもできます。

![ネイティブ広告 CSS の例](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/zusqVYVxOAml6RhFfaHw/assets/hires/native-ad-css-change-padding.png)

```css

 .msg-native-widget-item-content {
    padding: 30px !important;
    }

```

{% endstep %}

{% step %}

#### 7. テキストボックスの背景色をカスタマイズして、各画像の下にあるテキストボックスだけに反映し、画像とボックスの間のスペースは透明のままにするか、別の背景色にします。

![ネイティブ広告 CSS の例](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/H08catOYIpWoAcmXJHoh/assets/hires/native-ad-css-customise-background-color.png)

```css

 .msg-native-widget-item-content {
    background-color: #ABE1FA !important;
    padding: 10px !important;
}
.msg-native-widget-outer-container {
    background-color: white !important;
    padding: 10px !important;
}
.msg-native-widget-item-title {
    margin-left: 5px !important;
    padding-top: 3px !important;
    color: white !important;
    }
.msg-native-widget-item-text {
    margin-left: 5px !important;
    padding-top: 3px !important;
    color: white !important;
    }
.msg-native-widget-item-brand {
    margin-left: 5px !important;
    padding-top: 3px !important;
    color: white !important;
    }

```

{% endstep %}

{% step %}

#### 8. 画像とそのテキストボックスを囲む枠線を追加する。これにより、そのネイティブウィジェット内の各画像を区別しやすくなります。

![ネイティブ広告 CSS の例](https://content.gitbook.com/content/GoSwRYjxsR1XS6va6yLj/blobs/ZPr4F1I8Cbu9MhAnXpGy/assets/hires/native-ad-css-set-border.png)

```css

.msg-native-widget-item-container {
  border: 10px #0073B7 solid !important;
  padding: 10px !important;
}
.msg-native-widget-outer-container {
  margin: 10px !important;
}

```

{% endstep %}
{% endstepper %}


---

# 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://docs.exoclick.com/publishers/ja/saitotozn/neitibuno.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.
