Hướng dẫn setup tracking GA4 với Google Tag Manager (GTM)
1. Tạo GA4 và lấy Measurement ID
Section titled “1. Tạo GA4 và lấy Measurement ID”



Copy và lưu lại Measurement ID như hình trên.
2. Tạo Google Analytics GA4 và GA4 Purchase Event ở GTM
Section titled “2. Tạo Google Analytics GA4 và GA4 Purchase Event ở GTM”Tạo Google Analytics GA4
Section titled “Tạo Google Analytics GA4”

Tạo GA4 Purchase Event
Section titled “Tạo GA4 Purchase Event”1. Tạo Template cho Items
Section titled “1. Tạo Template cho Items”

2. Tạo Variables
Section titled “2. Tạo Variables”
Thực hiện tạo variable cho dataLayerTransactionValue


Thực hiện tương tự cho các variables còn lại bao gồm:
dataLayerTransactionCoupon

dataLayerTransactionCurrency

dataLayerTransactionID

dataLayerTransactionShipping

dataLayerTransactionTax

Tạo variable cho dataLayerTransactionItems theo hướng dẫn như hình

Kiểm tra sau khi hoàn tất như hình dưới:

3. Tạo GA4 Purchase event Tag
Section titled “3. Tạo GA4 Purchase event Tag”

Thực hiện chính xác như hình bên dưới sau đó chọn Save

Setup Trigger cho tag

Kiểm tra lần cuối, sau đó click Submit
