# Google Tag Manager | 安裝 Omnichat

## 步驟 1

[登入](https://app.easychat.co/) 到 Omnichat 管理員頁面

## 步驟 2

前往  通訊渠道  >  網站對話插件  >  [安裝對話插件](https://app.easychat.co/install.html)  頁面

1. 輸入安裝 Omnichat 的網站地址
2. 選擇你的 Omnichat 網頁插件應用顏色
3. 選擇你的 Omnichat 網頁插件應用語言
4. 複製 Omnichat 安裝代碼

<figure><img src="https://2493459343-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LaFmilpuDQ-f7VKjHCH%2Fuploads%2FaoSyIvfu43R5UBP241ik%2F%E6%88%AA%E5%9C%96%202023-05-26%20%E4%B8%8A%E5%8D%8811.53.21.png?alt=media&#x26;token=1a53557f-ef8c-4ed7-9bbd-48dca092ae89" alt=""><figcaption></figcaption></figure>

## 步驟 3

登入您的 Google Tag Manager 帳戶 [https://tagmanager.google.com](https://tagmanager.google.com/)

{% hint style="info" %}
請注意：若目前要安裝對話插件的網站為「自建官網」，或是之前未曾在網站中安裝過Google Tag Manager，請先參考[Google官方說明](https://support.google.com/tagmanager/answer/14842164)，將GTM容器安裝到您的網站中唷！
{% endhint %}

<figure><img src="https://2493459343-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LaFmilpuDQ-f7VKjHCH%2Fuploads%2Feqk7CcqhBwXmAieX0sq1%2Fimage.png?alt=media&#x26;token=0fb17c77-563a-4d54-8315-a8ee96ffc5ed" alt=""><figcaption></figcaption></figure>

## 步驟 4

添加新帳戶並設置 **帳戶名稱、國家/地區、容器名稱**，並在 「目標廣告平台」 選擇 **網路**

<figure><img src="https://2493459343-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LaFmilpuDQ-f7VKjHCH%2Fuploads%2F60CpToMne3l0kuWb3dhT%2F%E6%88%AA%E5%9C%96%202023-05-26%20%E4%B8%8A%E5%8D%8811.52.08.png?alt=media&#x26;token=4a060253-0c0a-4c4f-abec-6d3d12f37e16" alt=""><figcaption></figcaption></figure>

## 步驟 5

按添加**新增代碼**

<figure><img src="https://2493459343-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LaFmilpuDQ-f7VKjHCH%2Fuploads%2FCBiACSyd8T6JtGfSNSYt%2F%E6%88%AA%E5%9C%96%202023-05-26%20%E4%B8%8A%E5%8D%8811.49.32.png?alt=media&#x26;token=0c3cfe57-1254-4d6a-aed9-594e5f51e599" alt=""><figcaption></figcaption></figure>

## 步驟 6

輸入**標籤名稱(Tag name)**，然後按右上角的**編輯鉛筆(Edit Pencil)**

<figure><img src="https://2493459343-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LaFmilpuDQ-f7VKjHCH%2Fuploads%2Ff5ZvR0bZSlTOBt1tCuz0%2F%E6%88%AA%E5%9C%96%202023-05-26%20%E4%B8%8A%E5%8D%8811.58.52.png?alt=media&#x26;token=e16731cb-85c1-4d52-8087-adfe913a3528" alt=""><figcaption></figcaption></figure>

## 步驟 7

選擇 **自訂 HTML**

<figure><img src="https://2493459343-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LaFmilpuDQ-f7VKjHCH%2Fuploads%2F0Qbrff2jAGVI0rJyPVRD%2F%E6%88%AA%E5%9C%96%202023-05-26%20%E4%B8%8A%E5%8D%8811.45.04.png?alt=media&#x26;token=473a7e2d-cd91-4e5e-9788-9f7f555de7d7" alt=""><figcaption></figcaption></figure>

## 步驟 8

把步驟2的 Omnichat Javascript 代碼 貼到 HTML 輸入窗中

<figure><img src="https://2493459343-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LaFmilpuDQ-f7VKjHCH%2Fuploads%2F80QFvwcXGQ2DtCgHNgRl%2F%E6%88%AA%E5%9C%96%202023-05-26%20%E4%B8%8A%E5%8D%8811.46.47.png?alt=media&#x26;token=64ded4c9-45db-453f-9614-ef0d46fccecc" alt=""><figcaption></figcaption></figure>

## 步驟 9

按 觸發條件 ，然後按右上角的 **編輯鉛筆(Edit Pencil)**

<figure><img src="https://2493459343-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LaFmilpuDQ-f7VKjHCH%2Fuploads%2FyEHOiCFqnmf7SwVqjHWW%2F%E6%88%AA%E5%9C%96%202023-05-26%20%E4%B8%8A%E5%8D%8811.46.47.png?alt=media&#x26;token=35681c60-facd-4c1c-b37a-41fd331a111c" alt=""><figcaption></figcaption></figure>

選取 "**All Pages**"，並點選右上角 **新增**

<figure><img src="https://2493459343-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LaFmilpuDQ-f7VKjHCH%2Fuploads%2FNseCiA1tyAQbb8H6eYEC%2F%E6%88%AA%E5%9C%96%202023-05-26%20%E4%B8%8A%E5%8D%8811.47.07.png?alt=media&#x26;token=3f86116e-1e98-4731-a5e2-975855611501" alt=""><figcaption></figcaption></figure>

## 步驟 10

提交新版本並添加 "**版本名稱**", "**版本說明**" 並按 "**發布**"

<figure><img src="https://2493459343-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LaFmilpuDQ-f7VKjHCH%2Fuploads%2FgOEuSowHhxxx7UCSzFdG%2F%E6%88%AA%E5%9C%96%202023-05-26%20%E4%B8%8A%E5%8D%8811.48.27.png?alt=media&#x26;token=b5281719-b4c1-4604-8ba3-28abb35076fa" alt=""><figcaption></figcaption></figure>

## **完成！**


---

# 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.omnichat.ai/features/tong-xun-qu-dao/wang-zhan-dui-hua-cha-jian/install/google-tag-manager.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.
