> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://support.easystore.co/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# 透過 Google 代碼管理工具使用 LINE Tag

若您要通過 Easystore 追蹤 Line 成效型廣告(LAP)，您可透過 Google 代碼管理工具 (Google Tag Manager GTM) 來進行追蹤。

### **[1. 安裝LINE Tag基本程式代碼 （全網）](#h_d28db1da52)**

### **[2. 安裝LINE Tag轉換代碼 （完成購買）](#h_c9b63d0dbb)**

### **[3. 如何發佈 GTM 代碼 (Tag)](#h_a2a5467f75)**

### **[4. 在 EasyStore 安裝 Google Tag Manager (GTM) 擴充](#h_89ccd9c2c1)**

**`免責聲明：`**`若商家使用 Google Tag Manager（或包含但不限於 Google 提供之其他服務，以下簡稱"第三方服務"）進行埋設 LINE Tag，EasyStore 無法對第三方服務顯示資料之準確性、充分性或完整性負責，就第三方服務而顯示的任何錯誤、遺漏、缺失、延誤、中斷或任何其他瑕疵，EasyStore 亦不負擔任何責任。`

* * *

## **1. 安裝LINE Tag基本程式代碼 （全網）**

①登入 Google 代碼管理工具帳號。

② 點選總覽後點選「**新增代碼**」。

![](https://storage.crisp.chat/users/helpdesk/website/e88db9e46166c800/15c81dbc-61e7-4bcd-a891-3591d0_rxmhjt.png)

③ 點選「**自訂 HTML**」 代碼，然後左上角輸入容器代碼名稱，以下用”**LINE-基本程式代碼**”為範例。

![](https://storage.crisp.chat/users/helpdesk/website/32cf72aae1b73800/8e80f31d-ce1d-4a74-ba49-b965e7_1ezz2tq.png)

![](https://storage.crisp.chat/users/helpdesk/website/305760a4e4751600/d409a1ec-6c1e-4a5c-919c-8bc377_1p0f38q.png)

④ 前往 LINE Ads Platform 管理畫面，然後點選「**追蹤（LINE Tag）**」。

![](https://storage.crisp.chat/users/helpdesk/website/7db16634991f1400/9b7c18c4-b01c-44c3-9be7-fabdd4_1jnuhvs.png)

⑤ 於基本程式碼，點選右上方「**複製**」按鈕即可複製完整的基本程式碼。

![](https://storage.crisp.chat/users/helpdesk/website/998675057a26b800/01b52202-0bbe-4bcb-8caf-d77aba_1q9l6tz.png)

⑥ 返回 Google 代碼管理工具，將基本程式碼貼到 HTML容器。

![](https://storage.crisp.chat/users/helpdesk/website/dfa99d57aa2a4000/1494068b-a1da-4db0-9929-852165_j4qbg4.png)

⑦ 點選「**進階設定**」展開後，「**代碼觸發選項**」下拉選單中點選「**每個網頁一次**」。

![](https://storage.crisp.chat/users/helpdesk/website/62a6bb698ce5e000/06074e6f-d512-4a2a-9609-d02fdd_1ga4uvz.png)

![](https://storage.crisp.chat/users/helpdesk/website/8ec125c63e693000/0655f4c6-42b5-4027-a634-43aea0_147w2le.png)

⑧ 於「**觸發條件**」中：

步驟 1 : 右上角點選編輯圖案。

步驟 2 : 點選「All Pages（網頁瀏覽）」為觸發條件。

![](https://storage.crisp.chat/users/helpdesk/website/38125600246acc00/8744eea8-27d6-4ed4-ba43-e42e9a_13ps8p5.png)

![](https://storage.crisp.chat/users/helpdesk/website/3243e60a7651f400/cca82f3d-c525-40b8-9432-de5a3e_ceku0k.png)

⑨ 點選右上角「**儲存**」按鈕後，即可完成該代碼建立。

![](https://storage.crisp.chat/users/helpdesk/website/fe226c2da084e000/11f8d59f-2d7d-4187-ad9a-b76220_tfne0f.png)

* * *

## **2. 安裝LINE Tag轉換代碼 （完成購買）**

現在您已置入基本代碼，接下來需安裝轉換代碼，可讓 LAP 廣告系統以此轉換為最終目標來做優化，並可追蹤到轉換廣告的成效。

①在 Google 代碼管理工具，點選總覽後點選「新增代碼」。

![](https://storage.crisp.chat/users/helpdesk/website/ab2e18700bb15800/1d9a4d01-dbcb-426a-a253-7f4b3d_1wmud1l.png)

② 點選「**自訂 HTML**」 代碼，然後左上角輸入容器代碼名稱「**LINE－轉換代碼**」。

![](https://storage.crisp.chat/users/helpdesk/website/86504eabcb1a6000/bc368a74-a18b-4bd8-9789-eff87a_1uimeep.png)

![](https://storage.crisp.chat/users/helpdesk/website/b03b15c330540000/118326a3-a3e8-43e1-8c6b-63348f_zjwhi.jpeg)

③ 前往「LINE Ads Platform」 管理畫面，然後點選「**追蹤（LINE Tag）**」。

![](https://storage.crisp.chat/users/helpdesk/website/674f59f763dce800/8a734b48-84d5-4cbe-a252-0ad505_14x3b8m.png)

④ 於「**追蹤（LINE Tag）**」往下滑找到轉換代碼，點選右上方「**複製**」按鈕即可複製完整的轉換代碼。

![](https://storage.crisp.chat/users/helpdesk/website/54aaf3e3c3ef0c00/9c91839c-b499-4e9a-a25a-66c28f_3p92b.jpeg)

⑤ 返回 Google 代碼管理工具，將轉換代碼貼到 HTML 容器。

![](https://storage.crisp.chat/users/helpdesk/website/7e90a7f70ba51800/076dd10a-6c8c-4630-b594-cbeb14_1j1udnu.jpeg)

⑥ 於「進階設定」展開後，點選「代碼觸發選項」下拉選單中的「每個事件一次」，於「代碼觸發順序」展開後，於下方的方塊選擇打勾「LINE-轉換代碼」觸發前先觸發 「LINE-基本程式代碼」，以確保此「LINE-轉換代碼」在「LINE-基本程式代碼」後觸發

![](https://storage.crisp.chat/users/helpdesk/website/2540de1c13c08000/470c38b0-a3a6-4f78-9aeb-c27aef_1pl8uiy.png)

⑦ 於「**觸發條件**」中：

步驟 1 : 點擊觸發條件

![](https://storage.crisp.chat/users/helpdesk/website/44dc96f9d7d9e000/766f4fc0-f948-43c7-8fca-57b409_opvjai.png)

點選上方的 + 按鈕

![](https://storage.crisp.chat/users/helpdesk/website/ecb99959fe72b000/c5939146-e2a3-4cff-960b-d6903c_19psqsy.png)

步驟 2 : 點選「**網頁瀏覽**」為觸發條件。

![](https://storage.crisp.chat/users/helpdesk/website/e227892f3d80c000/0dcec75a-9870-4349-8f42-daf96d_9ec9m3.png)

步驟 3 : 於「這項觸發條件的啟動時機」，點選「**部分的網頁瀏覽**」。

![](https://storage.crisp.chat/users/helpdesk/website/6f0e8adf05258800/aeb651da-8cb6-47c3-b094-768936_1trrcyh.png)

⑧ 填寫轉換代碼網頁瀏覽的觸發條件

第一個變數選擇「Page Path」

第二個比對方式選擇「與規則運算方式相符」

第三個填入轉換頁面的網址填寫 `/payments/.+/redirect`

![](https://storage.crisp.chat/users/helpdesk/website/559ed0663e028c00/3c173ccb-4291-44a3-afaf-c9d49d_18l71nf.png)

⑨ 點選右上角「**儲存**」按鈕後，即可完成該代碼建立。

![](https://storage.crisp.chat/users/helpdesk/website/ab29f82a84ea3000/92748845-bf81-4d83-91e6-af7be1_14591ht.png)

* * *

## **3** **. 如何發佈 GTM 代碼 (Tag)**

當您成功設定 Tag 後，您會在首頁看到工作區變更數，您需要點擊提交》發佈

![](https://storage.crisp.chat/users/helpdesk/website/9b4520822ad09000/ff12199f-e5f8-41c5-842f-cb83a6_rcvl3x.png)

1.  選取 [發佈及建立版本]
    
2.  檢查「工作區變更」部分，確認一切設定都正確無誤
    
3.  輸入 [版本名稱] 和 [版本說明]
    
4.  如果代碼管理工具設為使用多個環境，請到「發佈到環境」部分選取要發佈到哪個環境
    
5.  發佈
    

![](https://storage.crisp.chat/users/helpdesk/website/835abbe843625800/bad1d154-b7f2-455a-9fc6-9f0e47_p4sdfv.png)

可參考 Google 官方說明：[https://support.google.com/tagmanager/answer/6107163?hl=zh-Hant](https://support.google.com/tagmanager/answer/6107163?hl=zh-Hant)

* * *

## **4. 在 EasyStore 安裝 Google Tag Manager (GTM) 擴充**

前往 EasyStore 後台》[安裝 **Google Tag Manager (GTM) 擴充**](https://www.easystore.co/zh-tw/apps/google-tag-manager)

![](https://storage.crisp.chat/users/helpdesk/website/d81ed8fadcda4800/d4d9300b-2f36-4bce-b340-9a39f9_16yi2te.png)

回到您的 GTM 後台，可在以下截圖獲得您的 GTM Container ID

![](https://storage.crisp.chat/users/helpdesk/website/7c090ca5f5ef9400/f0dd048c-4b87-4afa-ab48-640336_psly70.png)

或

![](https://storage.crisp.chat/users/helpdesk/website/1f3f8a97f52b8a0/b57b14cd-2bb5-4df8-b5a5-fd7f9d_1u1s5z5.png)

然後再回到 Easystore GTM 擴充裡貼上 Container ID 即可

![](https://storage.crisp.chat/users/helpdesk/website/b999c8b9d528a000/c09bcfb9-9327-4d9d-a4ca-4007b9_u5m57.png)