> 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/advocate-program/manage-advocate-participant-experiences/edit-your-widget-or-microsite-html-and-css-for-advocate.md).

# Advocate用にウィジェットまたはマイクロサイトのHTMLとCSSを編集する

ブランドの外観や雰囲気により近づけるため、HTMLやCSSを追加してAdvocateのウィジェットやマイクロサイトをカスタマイズできます。Advocateに組み込まれているHTMLエディターを使えば、構造やスタイルを追加できるほか、一部のデフォルトコンポーネントを上書きして、さらに細かくカスタマイズすることもできます。

{% hint style="info" %}
**注**：カスタムHTML/CSSの編集は、一部のAdvocateエディションでのみご利用いただけます。アカウントをアップグレードしてこの機能を利用するには、 [サポート](mailto:saasquatch-support@impact.com) にお問い合わせください。
{% endhint %}

#### カスタムHTMLやCSSを使う理由

カスタムHTMLやインラインCSSを使うと、次のことができます。

* 会社のブランドガイドラインにより忠実に合わせる
* レイアウトや余白を変更する
* デフォルトのエディターで利用できる範囲を超えてスタイルを適用する
* ウィジェットまたはマイクロサイトの特定のコンポーネントのスタイルを上書きする

{% hint style="warning" %}
**重要**：カスタムコードによって発生した問題について、サポートチームが対応できる範囲には限りがあります。不明な点がある場合は、Advocateの導入担当チームまたはローンチ後のサポートチームにご相談ください。
{% endhint %}

#### HTMLまたはCSSを編集する

{% tabs %}
{% tab title="マイクロサイトを編集する" %}
組み込みのHTMLエディターを使ってHTMLやCSSを編集し、マイクロサイトをさらにカスタマイズできます。HTMLエディターを使うと、マイクロサイトのデザインをより柔軟に調整できます。ただし、カスタムHTMLやCSSで行った変更については、トラブルシューティングに対応できませんのでご注意ください。

1. 左側のナビゲーションメニューで、 ![\[Engage\] v2](https://paligoapp-cdn-eu1.s3.eu-west-1.amazonaws.com/impact/attachments/f01cdffa431a4d75ff09c130b66974d4-aa671735ec2b65af79961eaf59ab60af.svg) **\[Engage] → コンテンツ**.
2. マイクロサイトのカードで、 **コンテンツを編集**.
3. 「マイクロサイト」タブで、コードを編集するレイアウトまたはページを選択します。
4. 選択 ![](https://1458456015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-3364b389815e6386c73528dda541e583d2fe0c16%2F0eceeaaa32f185a9932075cd699744ed6b755396902ea2e4cabff73869cb9f6f.svg?alt=media)![](https://1458456015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-6104f36947b882897acb25b42d057dee1ebd572a%2F80d3875a58861553d70eb3df7d72c3e6820128c3d4212b3bb623e44832b6ee2c.svg?alt=media) **\[コードビュー]** 上部のメニューバーで
5. 必要に応じてHTMLやCSSを追加または変更します。
6. CSSは次の3つの方法で追加できます。

   * 外部CSSスタイルシートをインポートする
   * ページの先頭にある `<style>` タグ内に追加する：

   ```programlisting
   <style>
     p {
       color: blue;
     }

     .exampleClass {
       color: green;
       font-size: 25px;
       text-align: center;
     }

     #exampleId {
       color: red;
       font-size: 30px;
     }
   </style> 
   ```

   * 特定のHTML要素にスタイルを適用するため、インラインで追加する：

   ```programlisting
   <h3 style="font-size:30px;color:blue;">Get rewarded when your friend uses our product</h3> 
   ```
7. 選択 ![](https://1458456015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-1782d05738c13ec58eb6efb9c77d0c3e5ac96f02%2F309574593b8707c978ca25cd69a36a5a0faa4589103874c5ddc1dd96307e696e.svg?alt=media) **\[ペイントブラシ]** して更新内容をプレビューします。
8. 選択 **下書きを保存** して保存するか、 **公開** して変更を公開します。
   {% endtab %}

{% tab title="ウィジェットを編集する" %}
組み込みのHTMLエディターを使ってHTMLやCSSを編集し、ウィジェットをさらにカスタマイズできます。HTMLエディターを使うとウィジェットのデザインをより柔軟に調整できますが、カスタムHTMLやCSSによる変更については、トラブルシューティングのサポートを提供できませんのでご注意ください。

1. 左側のナビゲーションメニューで、 ![\[Engage\] v2](https://paligoapp-cdn-eu1.s3.eu-west-1.amazonaws.com/impact/attachments/f01cdffa431a4d75ff09c130b66974d4-aa671735ec2b65af79961eaf59ab60af.svg) **\[Engage] → コンテンツ**.
2. ［ *ウィジェット* ］カードで、 **［ウィジェットを編集］**.
3. ［ *プログラムウィジェット*］の下で、編集するウィジェットを選択します。

<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%2Fur4WJaahngh87vDtnZXg%2FScreenshot%202026-05-19%20at%2009.28.51.png?alt=media&amp;token=8f91133b-08f2-4c9b-9462-7e231dc80273" alt="" width="563"><figcaption></figcaption></figure></div>

1. 上部のメニューバーで ![](https://1458456015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-3364b389815e6386c73528dda541e583d2fe0c16%2F0eceeaaa32f185a9932075cd699744ed6b755396902ea2e4cabff73869cb9f6f.svg?alt=media)![](https://1458456015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-6104f36947b882897acb25b42d057dee1ebd572a%2F80d3875a58861553d70eb3df7d72c3e6820128c3d4212b3bb623e44832b6ee2c.svg?alt=media) **\[Brackets]**.
2. ページの本文にHTMLを追加または編集します。
3. CSSは次の3つの方法で追加できます。

   * 外部CSSスタイルシートをインポートする
   * ページの先頭にある `<style>` タグ内に追加する：

   ```programlisting
   <style>
     p {
       color: blue;
     }

     .exampleClass {
       color: green;
       font-size: 25px;
       text-align: center;
     }

     #exampleId {
       color: red;
       font-size: 30px;
     }
   </style> 
   ```

   * 特定のHTML要素にスタイルを適用するため、インラインで追加する：

   ```programlisting
   <h3 style="font-size:30px;color:blue;">Get rewarded when your friend uses our product</h3> 
   ```
4. 選択 ![](https://1458456015-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwMLlMoFBtKJa8ptd3zaw%2Fuploads%2Fgit-blob-1782d05738c13ec58eb6efb9c77d0c3e5ac96f02%2F309574593b8707c978ca25cd69a36a5a0faa4589103874c5ddc1dd96307e696e.svg?alt=media) **\[ペイントブラシ]** して更新内容をプレビューします。
5. 選択 **下書きを保存** して保存するか、 **公開** して変更を公開します。
   {% endtab %}
   {% endtabs %}

#### **CSSパーツを使ってコンポーネントを編集する**

ウィジェットやマイクロサイトに組み込まれているコンポーネントの中には、ビジュアルエディターでは完全にスタイルを設定できないものがあります。その場合、CSSパーツを使って外観を上書きし、より細かく調整できます。

高度なスタイル変更をご希望の場合は、impact.comのチームが可能な変更についてご案内し、関連するCSSパーツのセレクターを共有できます。CSSパーツを使ったコンポーネントの編集に関心がある場合は、担当の導入支援担当者またはローンチ後のサポートチームにお問い合わせください。


---

# 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/advocate-program/manage-advocate-participant-experiences/edit-your-widget-or-microsite-html-and-css-for-advocate.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.
