Google Analytics – GA4
![](https://stoneip.info/wp-content/uploads/2022/05/Screenshot-2022-05-02-at-14.52.02-1024x510.jpg)
GTM 很簡單,每個你想加入的東西都放進 Tag 裡,這裡 GTM 就幫你紀錄。所以這次我們要弄 GA4,那就選擇上面的 Tag Configuration,然後選擇右邊的 Google Analytics : GA4 Configuration,即下圖。
![](https://stoneip.info/wp-content/uploads/2022/05/Screenshot-2022-05-02-at-14.50.44.jpg)
![](https://stoneip.info/wp-content/uploads/2022/05/Screenshot-2022-05-02-at-14.50.49.jpg)
然後,在 Measurement ID 那裡輸入 GA4 的 Measurement ID。這個 Measurement ID 尋找的位置在 Google Analytics > GA Property 裡的 Data Stream,然後第一行就有寫,是以「G-_____」開首的。
![](https://stoneip.info/wp-content/uploads/2022/05/Screenshot-2022-05-02-at-14.53.54-1024x304.jpg)
![](https://stoneip.info/wp-content/uploads/2022/05/Screenshot-2022-05-02-at-14.50.56-1024x181.jpg)
填寫後,進去下面的 Trigger,選擇「All Pages」即可。設定後應該是像下面的畫面一樣。
![](https://stoneip.info/wp-content/uploads/2022/05/Screenshot-2022-05-02-at-14.51.00.jpg)
Google Analytics – Universal Analytics(即將停止服務)
![](https://stoneip.info/wp-content/uploads/2022/05/Screenshot-2022-05-02-at-14.47.38-1024x227.jpg)
![](https://stoneip.info/wp-content/uploads/2022/05/Screenshot-2022-05-02-at-14.47.52.jpg)
至於舊的 Google Analytics Universal Analytics 做法相似,Tag 選擇「Google Analytics Universal Analytics」,然後下面的 Google Analytics Settings 要先開一個 Variable。其實就是要你輸入你的 Google Analytics Tracking ID。選擇「New Variable」,然後進去下圖頁面,輸入 GA 裡的「Tracking ID」。
![](https://stoneip.info/wp-content/uploads/2022/05/Screenshot-2022-05-02-at-14.47.48-1024x469.jpg)
![](https://stoneip.info/wp-content/uploads/2022/05/Screenshot-2022-05-02-at-14.48.04-1024x175.jpg)
在 Trigger 那裡同樣選擇「All Pages」,完成後應該是下面這樣的。
![](https://stoneip.info/wp-content/uploads/2022/05/Screenshot-2022-05-02-at-14.48.09.jpg)