透過 Google 代碼管理工具使用 LINE Tag
若您要通過 Easystore 追蹤 Line 成效型廣告(LAP),您可透過 Google 代碼管理工具 (Google Tag Manager GTM) 來進行追蹤。
`免責聲明:``若商家使用 Google Tag Manager(或包含但不限於 Google 提供之其他服務,以下簡稱"第三方服務")進行埋設 LINE Tag,EasyStore 無法對第三方服務顯示資料之準確性、充分性或完整性負責,就第三方服務而顯示的任何錯誤、遺漏、缺失、延誤、中斷或任何其他瑕疵,EasyStore 亦不負擔任何責任。`
*
①登入 Google 代碼管理工具帳號。
② 點選總覽後點選「**新增代碼**」。

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


④ 前往 LINE Ads Platform 管理畫面,然後點選「**追蹤(LINE Tag)**」。

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

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

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


⑧ 於「**觸發條件**」中:
步驟 1 : 右上角點選編輯圖案。
步驟 2 : 點選「All Pages(網頁瀏覽)」為觸發條件。


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

*
現在您已置入基本代碼,接下來需安裝轉換代碼,可讓 LAP 廣告系統以此轉換為最終目標來做優化,並可追蹤到轉換廣告的成效。
①在 Google 代碼管理工具,點選總覽後點選「新增代碼」。

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


③ 前往「LINE Ads Platform」 管理畫面,然後點選「**追蹤(LINE Tag)**」。

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

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

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

⑦ 於「**觸發條件**」中:
步驟 1 : 點擊觸發條件

點選上方的 + 按鈕

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

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

⑧ 填寫轉換代碼網頁瀏覽的觸發條件
第一個變數選擇「Page Path」
第二個比對方式選擇「與規則運算方式相符」
第三個填入轉換頁面的網址填寫 /payments/.+/redirect

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

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

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

可參考 Google 官方說明:[https://support.google.com/tagmanager/answer/6107163?hl=zh-Hant](https://support.google.com/tagmanager/answer/6107163?hl=zh-Hant)
*
前往 EasyStore 後台》[安裝 Google Tag Manager (GTM) 擴充](https://www.easystore.co/zh-tw/apps/google-tag-manager)

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

或

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

**[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 代碼管理工具帳號。
② 點選總覽後點選「**新增代碼**」。

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


④ 前往 LINE Ads Platform 管理畫面,然後點選「**追蹤(LINE Tag)**」。

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

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

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


⑧ 於「**觸發條件**」中:
步驟 1 : 右上角點選編輯圖案。
步驟 2 : 點選「All Pages(網頁瀏覽)」為觸發條件。


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

*
**2. 安裝LINE Tag轉換代碼 (完成購買)**
現在您已置入基本代碼,接下來需安裝轉換代碼,可讓 LAP 廣告系統以此轉換為最終目標來做優化,並可追蹤到轉換廣告的成效。
①在 Google 代碼管理工具,點選總覽後點選「新增代碼」。

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


③ 前往「LINE Ads Platform」 管理畫面,然後點選「**追蹤(LINE Tag)**」。

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

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

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

⑦ 於「**觸發條件**」中:
步驟 1 : 點擊觸發條件

點選上方的 + 按鈕

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

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

⑧ 填寫轉換代碼網頁瀏覽的觸發條件
第一個變數選擇「Page Path」
第二個比對方式選擇「與規則運算方式相符」
第三個填入轉換頁面的網址填寫 /payments/.+/redirect

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

*
**3** . 如何發佈 GTM 代碼 (Tag)
當您成功設定 Tag 後,您會在首頁看到工作區變更數,您需要點擊提交》發佈

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

可參考 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)

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

或

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

更新時間: 12/01/2023
感謝!