# GTMのプレビューモードでWicleのタグが配信されているか確認する

Wicleのタグ配信にGTM（Googleタグマネージャー）を使用している場合は、[GTMのプレビューモード](https://support.google.com/tagmanager/answer/6107056?hl=ja)で、Wicleのタグが正しく配信されていることを確認してください。

## 確認手順 <a href="#steps" id="steps"></a>

1. GTMの管理画面で「プレビュー」ボタンをクリックする
2. タグを設置したサイトのURLを入力し、サイトを開く
3. Tag Assistantの画面で、Wicleのタグが「Tags Fired」（配信済み）に表示されているか確認する

## タグが配信されていない場合 <a href="#not-fired" id="not-fired"></a>

以下のよくある原因を確認してください。

### トリガーの設定不備 <a href="#trigger-issue" id="trigger-issue"></a>

* トリガーが「All Pages」に設定されているか確認してください。特定のページのみに限定している場合、それ以外のページではタグが配信されません。
* カスタムトリガーを使用している場合、条件が正しく設定されているか確認してください。

### タグ・コンテナの公開忘れ <a href="#publish-issue" id="publish-issue"></a>

* GTMのタグを作成・変更した後、\*\*コンテナを公開（パブリッシュ）\*\*しないと本番環境には反映されません。
* プレビューモードでは未公開の変更も確認できますが、実際のユーザーには反映されません。公開忘れにご注意ください。

### タグの設定内容の確認 <a href="#tag-config" id="tag-config"></a>

* タグの種類が「カスタムHTML」になっているか確認してください。
* タグのHTMLに記述した計測タグのコードが正しいか確認してください。[計測タグの設置手順（GTM）](/initial-setting/tag.md#gtm)をご参照ください。

## GTM以外のタグマネージャーを使用している場合 <a href="#other-tag-managers" id="other-tag-managers"></a>

他のタグマネージャー（Yahoo!タグマネージャー等）を使用している場合も、同様にタグの配信状況を確認してください。一般的な確認ポイントは以下のとおりです。

* タグの配信条件（トリガー）が正しく設定されているか
* タグが公開されているか
* タグのコード内容が正しいか


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wicle.io/other/troubleshoot/tag/check-gtm-preview-mode.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
