Pango Help Center
About PangoCustomer Success StoriesContact Us
  • Pango Help Center
  • Pango Overview
  • User Guide
    • Module Account
      • Security
        • Đổi mật khẩu & Xác thực 2 lớp
        • API Account & Token
      • Activity
        • Thêm người dùng
        • Lịch sử xuất dữ liệu
        • Lịch sử đăng nhập
      • Admin
        • Organization Information
        • Custom UI
        • Password Policy
        • Session Policy
        • Data Masking
        • Localization
        • Terms of Use
        • General Setting
        • User Roles
        • Permission
        • Tạo Permission Group
        • Account Logs
        • Export Logs
        • Change Logs
        • Access Logs
    • Module CDP
      • Segment Builder
        • Tổng quan
        • Tạo AND - OR Condition Group
        • Aggregation
        • Operator
        • Include - Exclude
        • Auto Refresh
        • Push Segment vào Model/BigQuery
      • Data Ingestion
        • Kiểm thử Data Ingestion API
        • Dataset
          • Import data từ CSV/Excel
          • Import data từ Google Drive
          • Ingest Data vào từ folder vào CDP
      • Custom Model
        • Phân loại Data Type
        • Phân biệt Custom Model và System Model
        • Cơ chế Filter
      • Data Tracking
        • Web Log
        • Dữ liệu từ Weblog
        • Link Tracking
      • User Event
        • Tổng quan
        • Cấu trúc dữ liệu
      • Social
        • Dữ liệu từ Zalo & Facebook
        • Zalo OA Profile
        • Zalo Mini App Activities
        • Dashboard ZMA ver 1.0
        • Facebook PSID
      • Interaction Data
        • Email Interaction
        • Message Interaction
        • Facebook Event
        • Zalo OA Event
      • Contact
      • Customer Profile
        • Profile Info
        • Profile 360°
          • Customer Standard Template
          • Customer Detail View
      • Transaction
        • Abandoned Cart
        • Abandoned Cart Item
        • Purchase Order
        • Purchase Order Item
        • Purchase History
        • Purchase History Item
        • Product
    • Module Console
      • Authentication
        • OAuth Zalo
        • OAuth Google
        • OAuth Facebook
        • Facebook Developer
        • OAuth Tiktok
        • Google Drive
      • Connections
        • Advertising
          • Facebook Ads
          • Tiktok Ads
          • Google Ads
          • Đồng bộ dữ liệu lên Ads
        • Email
          • Sendinblue
          • SendGird
          • Mailchimp
          • SendPulse
        • SMS
          • Kết nối Vietguys SMS
        • Messenger
          • ZNS
            • Vietguys
          • Viber
        • Digital Gifts
          • Kết nối Topup
        • Social Network
          • Zalo OA
            • Tổng quan
            • Đồng bộ Zalo Profile
            • ZOA Sender Services
            • Zalo Mini App
              • Tổng quan
              • Phân loại
              • Xóa ZMA Logs
              • Setting Mini App
                • Event Restriction
                • Rules tại Event Restriction
                • Time Access Restriction
                • OTP Services
                • Custom UI
                • Mapping dữ liệu về Data Model
                • Mapping dữ liệu về User Event
            • UID Template
              • Tổng quan
              • UID Tư vấn
              • UID Giao dịch
              • UID Truyền Thông
              • Lỗi gửi tin UID
          • Facebook Fanpage
            • Tổng quan
        • Notification
          • Tạo Telegram Bot
          • Kết nối Telegram Bot
          • Enabled Notification
        • Cloud Storage
          • Firebase Cloud Messaging
        • Database
          • Tổng quan Google BigQuery
          • Đồng bộ dữ liệu với Bigquery
          • Truy vấn dữ liệu từ Google BigQuery
          • Kết nối Looker với Google BigQuery
        • Webhook
          • Kết nối Webhook
        • Postback API
          • PangoCDP Data
          • Access Data Api
          • Access Token Api
      • Data Model
        • Tổng quan
        • Tạo Model Category
        • Show/Hide System Model
        • Tạo Custom Model
        • Tạo Custom Fields
        • Phân quyền tương tác với Model
        • Populate & Contribute
        • Model ZMA Profile
        • SFTP Server
      • Z-Channel
        • Event List
          • Pango Form
          • Pango Scan
          • Pango Sell
          • Pango 1Touch
          • Pango Gift
          • Pango Reward
          • Pango Lucky Wheel
          • Pango Connect
        • Form Builder
          • Cấu trúc
          • Cách hoạt động
          • Elements
            • Basic Elements
              • Text, Title, Separator, Image, Link, ZMA Link, Space, Line
              • Textbox
              • Textarea, Switch, Date, Datetime
              • Droplist
              • Checkbox, Number
              • Radio
            • Pango Elements
              • Verify Phone
              • Show Latest BatchInc
              • Place Order, Order Information
              • QR Code
              • Voucher
              • FgF QR, Shop List
              • Distance, P-Wheels
              • Take Photo, Slideshow
              • Agree T&C, Upload File
              • Master Data, Share Link
              • H-List, V-List
              • H-List & V-List sử dụng Master Data
              • Carousel, Verify Code
              • Quiz, Youtube
              • Tags, Star Rating
              • Emotion, Territory
              • Single Card
              • Card List
              • Scan Bill & Bill Prize
              • Scan QR Code
              • QR Code Info
              • Lookup Info
            • ZMA Elements
              • Share
              • Post to Feed
              • Follow OA
              • Share UCL
              • Custom FOA
            • Pango Game
              • Lucky Spin
              • Tap Master
          • Thiết lập Controls
          • Display Notification Permission
          • Mapping dữ liệu về Data Model
        • ZMA Builder
          • Tạo Zalo Developer App
          • Đăng ký API
          • Đăng ký Webhook
          • Tạo Mini App trong ZDA
          • Kết nối OA vào ZDA
          • Tạo Zalo App
          • Tạo Mini App trong Zalo App
          • Thêm Admin vào Zalo App Builder
          • Tạo Default App
          • Xác thực ZMA và Zalo OA
          • Đồng bộ Gift Builder
          • Tạo Zalo Cloud Service
      • Pango Service
        • Task Completion
          • Tạo PTCR Missions
          • Cấu hình PTCR Missions
          • Theo dõi PTCR Missions
      • Pango Builder
        • Custom Page
          • Pango View
          • Widget
        • Pango CTA (pCTA)
      • Personalization
        • Pop-up trên Sell & 1Touch
    • Module ACT Console
      • ZMA Experience
        • Thiết lập Component
          • User Engagement Components
            • Lucky Wheel with double rewards
    • Module ACT
      • Codes
        • Gift Code
          • Batch Gift Code
          • Kịch bản trả Gift Code
        • Voucher
          • Tạo Batch Voucher
          • Import Voucher
          • Generate Voucher
          • Void Voucher
        • Digital Gifts
          • Batch Topup
          • Topup
          • Batch Digital Gift
          • Digital Gift
        • Codes
          • Batch Verify Code
          • Verify Code
        • QR Codes
          • Batch Product QR Codes
          • Product QR Code
          • Batch Identify QR Code
          • Identify QR Code
      • Master Data
        • Brands
        • Sales Channels
        • Products
          • Product Category
          • Product SKU
        • Batch QR Code
        • Common
          • Master Data
      • User Permission
      • Proof of Purchase
        • Promotion Scheme
        • Dừng phát quà cho luồng quét Bill QR
        • Tính điểm Reward khi thiết lập scheme luồng quét Bill QR
      • Integration
        • Sync Data về PangoCDP
      • Pango Scan
        • Tạo Campaign
        • Quản lý QR
        • Event từ Pango Scan
        • User Account
        • Pango Scan Config
        • Custom UI Config
          • Home Screen
          • Login Screen
          • Change Password Screen
          • Checkin Screen
          • Campaigns Screen
          • Result Screen
          • My QR Screen
      • Pango 1Touch
        • Tạo Campaign
        • Cấu hình Mini App
        • Event từ Pango 1Touch
        • Product
          • Default Product
          • Suggestion Product
          • Related Product
        • Order
          • Import & Export Order
          • Order Status Config
        • User & Item
          • Link data từ Model
        • Custom UI Config
          • Home Screen
          • User Chooses Shipping Screen
          • Shipping Address Screen
          • User Chooses Payment Screen
          • Order Confirmation Screen
        • Other Config
          • Shipping Info Config
          • Payment Config
          • Zalo Pixel Config
      • Pango Sell
        • Tạo Campaign
        • Cấu hình Mini App
        • Event từ Pango Sell
        • Product
          • Cấu hình Product
        • Order
          • Import & Export Order
          • Order Status
        • Promotion
          • Tạo Promotion
        • Custom UI Config
          • Home Screen
          • Order Confirmation Screen
          • Result Screen
        • Other Config
          • Shipping Info Config
          • Order Status Config
      • Pango Reward
        • Campaign
          • Tạo Campaign
          • Cấu hình Mini App
          • Scheme Gift
          • Schemes Rules
          • Gắn link App Scan của bên thứ 3
        • User Campaign
        • Orders
        • User Point
        • Event từ Pango Reward
        • Custom UI Config
          • General
          • Campaign List Screen
          • Campaign Info Screen
          • Type Friend Get Friend Detail Screen
          • Type Cumulative Purchase Detail Screen
          • Type Shop Cumulative Purchase Detail Screen
          • Type Scan Product QR Screen
          • Joined Screen
          • My Account Screen
      • Pango Wheel
        • Phân loại
        • Tạo Campaign
        • Schemes Gifts
        • Event từ Pango Wheel
        • Cách quản lý quà theo địa điểm
        • Custom UI Config
          • General
          • Home Screen
          • Home Screen Of Wheel Config
          • Home Screen Of Wheel Schemes
          • Quota Screen
          • Result Screen
          • Result Screen Out Of Gift Quota
          • Verify Code pop-up
      • Pango Gift
        • Merge Gift vào Developer App
        • Event từ Pango Gift
        • User & Gift
        • Gift Hunting
          • Tổng quan
          • Hiển thị Gift Hunt theo Label
        • Custom UI Config
          • Explore Screen
          • Home Screen
          • QR Info Screen
          • Voucher Info Screen
          • Wheel Gift Info Screen
          • Digital Gift Info Screen
          • Topup Info Screen
          • My Account Screen
          • General
          • Gắn link App Scan của bên thứ 3
      • Pango Connect
        • Tạo Campaign
        • Event từ Pango Connect
        • Custom UI Config
          • General
          • Shop Detail Screen
          • My Account Screen
          • Shop WishList Screen
    • Module DMA
      • Automation
        • Workflows
          • Tạo Workflow
          • Kích hoạt Workflow
          • Quản lý các Workflow
        • Instance & Schedule
        • Jobs & Trigger Event
        • Action Logs
        • Context value
        • Workflow Report
        • Elements
          • Start With
            • Tổng quan
            • Phân loại
            • Elements
              • Trigger Conditions
              • User event
              • Data Model
              • Personal Event
              • Contact List
              • Contact Segment
              • Pango Segment
              • Contact add to List
              • Contact add to Segment
          • Check Condition
            • Tổng quan
            • Elements
              • User Event
              • Context Data Filter
              • Data Model Filter
              • Segment Filter
              • Contact Filter
              • Email Opened
              • Email Clicked
              • Message Event
              • Opt-in Consent
          • Logic Action
            • Tổng quan
            • Elements
              • Split Group A/B/C
              • Waiting Time
              • Add Data To Model
              • Move Contact To Segment
              • Creat User Event
              • User Approval
              • Update Contact Tag
              • Update Contact Score
              • Update ZaloUID Tag
              • Update ZaloUID Score
              • Enrich Job Context Data
              • Enrich Data
          • Send Message
            • Tổng quan
            • Elements
              • SMS/ Viber/ ZNS
                • Ý nghĩa
                • Tạo SMS template
                • Gắn parameters vào SMS template
                • Tạo ZNS template
                • Gắn parameters vào ZNS template
                • Tạo Viber template
              • Zalo UUID
                • Ý nghĩa
                • Phân loại
                • Quản lý Template
                • UID Tư Vấn
                • Pango Link Tracking
              • Email
              • App Push (FCM)
              • Facebook Messenger
                • Ý nghĩa
                • Enrich Data
                • Dry Run
          • Give Gift
            • Tổng quan
            • Elements
              • ACT. Reward Point +/-
              • ACT. Drop Gift
              • ACT. Generate QR
              • ACT. Pango Wheel Link
              • ACT. Drop Topup
              • Digital Gift
              • ACT.Drop Game Play
          • Integration
            • Tổng quan
            • Elements
              • Facebook Audience
              • Google Audience
              • Criteo Audience
              • Telegram Noti
              • Pango Webhook
              • API Callback
      • Template
        • Sync Email Template
        • Quản lý Email Template
      • Phát hành Luckycode tăng dần
    • Thiết lập các Usecase tiêu biểu
      • Thiết lập chiến dịch Friend-Get-Friend
      • Campaign Sampling
      • Thiết lập và ứng dụng Pango Scan
      • Thiết lập Pango Gift
      • Campaign Lucky Wheel
      • Thiết lập Pango Form
      • Campaign Voucher Drop 2.0
      • Thiết lập QR Campaign Phân Bổ Quà Theo Địa Điểm PG Check in
      • Thiết lập điều kiện unlock cho Batch quà ACT
    • Operational Notes
  • Technical Doc
    • Web Tracking Code
    • Data Ingestion APIs
      • Authentication
      • Data Ingestion
      • Object Type
      • Custom Field
      • Custom Model
      • User Event
      • User Activity
      • Customer
      • Transaction
      • Lead
      • Call Log
      • Meta Data
      • Data Ingestion Callback
    • FCM Integration API
    • ZMA Integration APIs
    • Voucher Integration APIs
    • Gifting Platform
    • Retailer x Pango APIs
    • Access Data API
      • Pango Condition Filter API
  • Notifications
    • 🚀 Release Notes
      • [04/06/25] Weekly Release
      • [28/05/25] Weekly Release
      • [21/05/25] Weekly Release
      • [14/05/25] Weekly Release
      • [07/05/25] Weekly Release
      • [23/04/25] Weekly Release
      • [16/04/25] Weekly Release
      • [09/04/25] Weekly Release
      • [02/04/25] Weekly Release
      • [26/03/25] Weekly Release
      • [19/03/25] Weekly Release
      • [12/03/25] Weekly Release
      • [05/03/25] Weekly Release
      • [26/02/25] Weekly Release
      • [19/02/25] Weekly Release
      • [12/02/25] Weekly Release
      • [22/01/25] Weekly Release
      • [15/01/25] Weekly Release
      • [08/01/25] Weekly Release
      • [02/01/25] Weekly Release
      • [25/12/24] Weekly Release
      • [18/12/24] Weekly Release
      • [04/12/24] Weekly Release
      • [27/11/24] Weekly Release
      • [20/11/24] Weekly Release
      • [06/11/24] Weekly Release
      • [30/10/24] Weekly Release
      • [23/10/24] Weekly Release
      • [16/10/24] Weekly Release
      • [09/10/24] Weekly Release
      • [02/10/24] Weekly Release
      • [25/09/24] Weekly Release
      • [18/09/24] Weekly Release
      • [11/09/24] Weekly Release
      • [28/08/24] Weekly Release
      • [21/08/24] Weekly Release
      • [14/08/24] Weekly Release
      • [07/08/24] Weekly Release
      • [24/07/24] Weekly Release
      • [31/07/24] Weekly Release
      • [17/07/24] Weekly Release
      • [11/07/24] Weekly Release
      • [03/07/24] Weekly Release
      • [27/06/24] Weekly Release
      • [19/06/24] Weekly Release
      • [12/06/24] Weekly Release
      • [29/05/24] Weekly Release
      • [22/05/24] Weekly Release
      • [15/05/24] Weekly Release
      • [08/05/24] Weekly Release
      • [24/04/24] Weekly Release
      • [10/04/24] Weekly Release
      • [03/04/24] Weekly Release
      • Pango ZMA Builder
    • 🔄 Pango Process
      • Product Request Ticket Process (PRT)
      • User Event: nhận user_send_text từ ZOA
      • Customer 360°: Tech-Implement Profile
      • Xin thêm Quota Mini App cho Brand
    • 🔔 Issues Updates
      • [04/07/24] - ACT Issue Resolution Notice
      • [10/06/24] VNG Cloud Issue Resolved
      • [10/06/24] VNG Cloud Issue
      • [24/05/24] Network Issue Resolved
  • FAQ
Powered by GitBook
On this page
  • Tổng quan
  • 1. Tạo Measurement ID trên GA4
  • 2. Tạo Facebook Pixel
  • 3. Gắn code tracking Pango vào website
  • 4. Event Tracking
  • Đề xuất event của Google Analytics 4
  • Enhanced E-Commerce
  • Client Tracking Events

Was this helpful?

  1. Technical Doc

Web Tracking Code

Tài liệu này hướng dẫn bạn từng bước thực hiện thêm code tracking vào website để ghi nhận dữ liệu người dùng từ website về PangoCDP như User Cookie info, User Activities, Traffic Source, ...

PreviousTechnical DocNextData Ingestion APIs

Last updated 3 months ago

Was this helpful?

Tổng quan

PangoCDP cung cấp đoạn mã <Code tracking> để bạn gắn vào website, thông qua đoạn mã này Pango sẽ ghi nhận các dữ liệu từ webiste như thông tin cookie của user, thông tin tương tác của họ như xem trang, bấm vào các mục có gắn sự kiện trên site, thông tin về nguuồn truy cập của user.

1. Tạo Measurement ID trên GA4

Measurement ID là mã đo lường trong Google Analytics. Để tạo làm theo các bước sau

  • Copy Measurement ID vừa tạo để sử dụng cho bước #id-3.-add-google-tag-manager-to-site

2. Tạo Facebook Pixel

  • Copy Pixel Id để sử dụng cho bước #id-3.-add-google-tag-manager-to-site

3. Gắn code tracking Pango vào website

Copy đoạn code bên dưới thêm vào wwebsite của bạn <head> code </head>.

<script>window.dataLayer=window.dataLayer||[],dataLayer.push({measurementId:"MeasurementID",fbPixelId:"FacebookPixelId",orgId:"OrganizationID",enableGA4:!0,enableMetaPixel:!0,userId:"InternalUserId"}),function(b,d,e,a,g){b[a]=b[a]||[],b[a].push({"gtm.start":new Date().getTime(),event:"gtm.js"});var f=d.getElementsByTagName(e)[0],c=d.createElement(e);c.async=!0,c.src="https://www.googletagmanager.com/gtm.js?id="+g+("dataLayer"!=a?"&l="+a:""),f.parentNode.insertBefore(c,f)}(window,document,"script","dataLayer","GTM-M6MNVJG")</script>

Lưu ý: Bạn cần thay đổi các thông tin sau

  • Measurement ID (đã copy ở bước 1. Tạo Measurement ID trên GA4)

  • Facebook Pixel Id (đã copy ở bước 2. Tạo Facebook Pixel)

  • Organization ID: Mã này được cung cấp bởi Pango Team

  • Internal User ID: Là User ID của website (vd: Phone hoặc Email)

4. Event Tracking

Đề xuất event của Google Analytics 4

Enhanced E-Commerce

Client Tracking Events

select_item

Sử dụng khi người dùng chọn một mục từ danh sách, hãy gửi sự kiện select_item với mục đã chọn trong tham số như bên dưới

dataLayer.push({
    'event': 'pangoTrack',
    'eventAction': 'select_item',
    item_list_id: "related_products",
    item_list_name: "Related products",
    ecommerce: {
        items: [{
            item_id: "SKU_12345",
            item_name: "Stan and Friends Tee",
            affiliation: "Google Merchandise Store",
            coupon: "SUMMER_FUN",
            currency: "USD",
            discount: 2.22,
            index: 0,
            item_brand: "Google",
            item_category: "Apparel",
            item_category2: "Adult",
            item_category3: "Shirts",
            item_category4: "Crew",
            item_category5: "Short sleeve",
            item_list_id: "related_products",
            item_list_name: "Related Products",
            item_variant: "green",
            location_id: "L_12345",
            price: 9.99,
            quantity: 1
        }]
    }
})

view_item

Để đo số lần xem chi tiết mặt hàng, hãy gửi sự kiện view_item bất cứ khi nào người dùng xem màn hình chi tiết của mặt hàng.

dataLayer.push({
    'event': 'pangoTrack',
    'eventAction': 'view_item',
    ecommerce: {
        items: [{
            item_id: "SKU_12345",
            item_name: "Stan and Friends Tee",
            affiliation: "Google Merchandise Store",
            coupon: "SUMMER_FUN",
            currency: "USD",
            discount: 2.22,
            index: 0,
            item_brand: "Google",
            item_category: "Apparel",
            item_category2: "Adult",
            item_category3: "Shirts",
            item_category4: "Crew",
            item_category5: "Short sleeve",
            item_list_id: "related_products",
            item_list_name: "Related Products",
            item_variant: "green",
            location_id: "L_12345",
            price: 9.99,
            quantity: 1
        }]
    }
})

view_item_list

Khi người dùng nhận được danh sách kết quả, hãy gửi sự kiện view_item_list bao gồm tham số mảng items chứa các mục hiển thị

dataLayer.push({
    'event': 'pangoTrack',
    'eventAction': 'view_item_list',
    item_list_id: "related_products",
    item_list_name: "Related products",
    ecommerce: {
        items: [{
            item_id: "SKU_12345",
            item_name: "Stan and Friends Tee",
            affiliation: "Google Merchandise Store",
            coupon: "SUMMER_FUN",
            currency: "USD",
            discount: 2.22,
            index: 0,
            item_brand: "Google",
            item_category: "Apparel",
            item_category2: "Adult",
            item_category3: "Shirts",
            item_category4: "Crew",
            item_category5: "Short sleeve",
            item_list_id: "related_products",
            item_list_name: "Related Products",
            item_variant: "green",
            location_id: "L_12345",
            price: 9.99,
            quantity: 1
        }]
    }
})

add_to_cart

Đo lường một mặt hàng đang được thêm vào giỏ hàng bằng cách gửi sự kiện add_to_cart với các mặt hàng có liên quan trong một mảng mặt hàng.

dataLayer.push({
    'event': 'pangoTrack',
    'eventAction': 'add_to_cart',
    ecommerce: {
        items: [{
            item_id: "SKU_12345",
            item_name: "Stan and Friends Tee",
            affiliation: "Google Merchandise Store",
            coupon: "SUMMER_FUN",
            currency: "USD",
            discount: 2.22,
            index: 0,
            item_brand: "Google",
            item_category: "Apparel",
            item_category2: "Adult",
            item_category3: "Shirts",
            item_category4: "Crew",
            item_category5: "Short sleeve",
            item_list_id: "related_products",
            item_list_name: "Related Products",
            item_variant: "green",
            location_id: "L_12345",
            price: 9.99,
            quantity: 1
        }]
    }
})

remove_from_cart

Để đo thời điểm người dùng xóa một mặt hàng khỏi giỏ hàng, hãy gửi sự kiện remove_from_cart

dataLayer.push({
    'event': 'pangoTrack',
    'eventAction': 'remove_from_cart',
    ecommerce: {
        items: [{
            item_id: "SKU_12345",
            item_name: "Stan and Friends Tee",
            affiliation: "Google Merchandise Store",
            coupon: "SUMMER_FUN",
            currency: "USD",
            discount: 2.22,
            index: 0,
            item_brand: "Google",
            item_category: "Apparel",
            item_category2: "Adult",
            item_category3: "Shirts",
            item_category4: "Crew",
            item_category5: "Short sleeve",
            item_list_id: "related_products",
            item_list_name: "Related Products",
            item_variant: "green",
            location_id: "L_12345",
            price: 9.99,
            quantity: 1
        }]
    }
})

add_to_wishlist

Bạn cũng có thể đo lường thời điểm một mặt hàng được thêm vào danh sách yêu thích bằng cách gửi sự kiện add_to_wishlist với các mặt hàng có liên quan trong một mảng mặt hàng.

dataLayer.push({
    'event': 'pangoTrack',
    'eventAction': 'add_to_wishlist',
    ecommerce: {
        items: [{
            item_id: "SKU_12345",
            item_name: "Stan and Friends Tee",
            affiliation: "Google Merchandise Store",
            coupon: "SUMMER_FUN",
            currency: "USD",
            discount: 2.22,
            index: 0,
            item_brand: "Google",
            item_category: "Apparel",
            item_category2: "Adult",
            item_category3: "Shirts",
            item_category4: "Crew",
            item_category5: "Short sleeve",
            item_list_id: "related_products",
            item_list_name: "Related Products",
            item_variant: "green",
            location_id: "L_12345",
            price: 9.99,
            quantity: 1
        }]
    }
})

view_cart

Khi người dùng xem giỏ hàng, hãy gửi sự kiện view_cart với tất cả các mặt hàng trong giỏ hàng

dataLayer.push({
    'event': 'pangoTrack',
    'eventAction': 'view_cart',
    ecommerce: {
        items: [{
            item_id: "SKU_12345",
            item_name: "Stan and Friends Tee",
            affiliation: "Google Merchandise Store",
            coupon: "SUMMER_FUN",
            currency: "USD",
            discount: 2.22,
            index: 0,
            item_brand: "Google",
            item_category: "Apparel",
            item_category2: "Adult",
            item_category3: "Shirts",
            item_category4: "Crew",
            item_category5: "Short sleeve",
            item_list_id: "related_products",
            item_list_name: "Related Products",
            item_variant: "green",
            location_id: "L_12345",
            price: 9.99,
            quantity: 1
        }]
    }
})

begin_checkout

Đo lường bước đầu tiên trong quy trình thanh toán bằng cách gửi sự kiện begin_checkout với một hoặc nhiều mục được xác định bằng các trường có liên quan. Ở giai đoạn này, phiếu giảm giá cũng có thể được thêm vào toàn bộ đơn hàng bằng cách thêm nó vào sự kiện hoặc áp dụng cho một mặt hàng cụ thể bằng cách thêm nó vào các thành phần cụ thể trong mảng mặt hàng

dataLayer.push({
    'event': 'pangoTrack',
    'eventAction': 'begin_checkout',
    currency: "USD",
    value: 7.77,
    coupon: "SUMMER_FUN",
    ecommerce: {
        items: [{
            item_id: "SKU_12345",
            item_name: "Stan and Friends Tee",
            affiliation: "Google Merchandise Store",
            coupon: "SUMMER_FUN",
            currency: "USD",
            discount: 2.22,
            index: 0,
            item_brand: "Google",
            item_category: "Apparel",
            item_category2: "Adult",
            item_category3: "Shirts",
            item_category4: "Crew",
            item_category5: "Short sleeve",
            item_list_id: "related_products",
            item_list_name: "Related Products",
            item_variant: "green",
            location_id: "L_12345",
            price: 9.99,
            quantity: 1
        }]
    }
})

add_payment_info

Gửi sự kiện add_ payment_info khi người dùng gửi thông tin thanh toán của họ. Nếu có thể, hãy bao gồm payment_type với sự kiện này cho phương thức thanh toán đã chọn

dataLayer.push({
    'event': 'pangoTrack',
    'eventAction': 'add_payment_info',
    ecommerce: {
        currency: "USD",
        value: 7.77,
        coupon: "SUMMER_FUN",
        payment_type: "Credit Card",
        items: [{
            item_id: "SKU_12345",
            item_name: "Stan and Friends Tee",
            affiliation: "Google Merchandise Store",
            coupon: "SUMMER_FUN",
            currency: "USD",
            discount: 2.22,
            index: 0,
            item_brand: "Google",
            item_category: "Apparel",
            item_category2: "Adult",
            item_category3: "Shirts",
            item_category4: "Crew",
            item_category5: "Short sleeve",
            item_list_id: "related_products",
            item_list_name: "Related Products",
            item_variant: "green",
            location_id: "L_12345",
            price: 9.99,
            quantity: 1
        }]
    }
})

add_shipping_info

Khi người dùng chuyển sang bước tiếp theo trong quy trình thanh toán và thêm thông tin vận chuyển, hãy gửi sự kiện add_shipping_info. Sử dụng thông số shipping_tier để chỉ định tùy chọn giao hàng của người dùng, chẳng hạn như "Đường bộ", "Đường hàng không" hoặc "Ngày hôm sau"

dataLayer.push({
    'event': 'pangoTrack',
    'eventAction': 'add_shipping_info',
    ecommerce: {
        currency: "USD",
        value: 7.77,
        coupon: "SUMMER_FUN",
        shipping_tier: "Ground",
        items: [{
            item_id: "SKU_12345",
            item_name: "Stan and Friends Tee",
            affiliation: "Google Merchandise Store",
            coupon: "SUMMER_FUN",
            currency: "USD",
            discount: 2.22,
            index: 0,
            item_brand: "Google",
            item_category: "Apparel",
            item_category2: "Adult",
            item_category3: "Shirts",
            item_category4: "Crew",
            item_category5: "Short sleeve",
            item_list_id: "related_products",
            item_list_name: "Related Products",
            item_variant: "green",
            location_id: "L_12345",
            price: 9.99,
            quantity: 1
        }]
    },
    user_data: {
        email_address: 'ABC@XYZ.com',
        phone_number: '1234567890',
        address: {
            first_name: 'john',
            last_name: 'smith',
            city: 'menlopark',
            region: 'ca',
            district: '',
            ward: '',
            postal_code: '94025',
            country: 'usa'
        },
        'form_key': '',
        'form_name': '',
        'form_vs': '', //form version,
        'cf': '' //custom field
    },
    'cdpData': {
        properties: {
            'gender': 'male',
            'birthYear': '2000'
        }
    }
})

purchase

Đo lường giao dịch mua hàng bằng cách gửi sự kiện purchase với một hoặc nhiều mặt hàng được xác định bằng các trường liên quan

dataLayer.push({
    'event': 'pangoTrack',
    'eventAction': 'purchase',
    ecommerce: {
        transaction_id: "T_12345",
        affiliation: "Google Merchandise Store",
        value: 25.42,
        tax: 4.90,
        shipping: 5.99,
        currency: "USD",
        coupon: "SUMMER_SALE",
        items: [{
                item_id: "SKU_12345",
                item_name: "Stan and Friends Tee",
                affiliation: "Google Merchandise Store",
                coupon: "SUMMER_FUN",
                currency: "USD",
                discount: 2.22,
                index: 0,
                item_brand: "Google",
                item_category: "Apparel",
                item_category2: "Adult",
                item_category3: "Shirts",
                item_category4: "Crew",
                item_category5: "Short sleeve",
                item_list_id: "related_products",
                item_list_name: "Related Products",
                item_variant: "green",
                location_id: "L_12345",
                price: 9.99,
                quantity: 1
            },
            {
                item_id: "SKU_12346",
                item_name: "Google Grey Women's Tee",
                affiliation: "Google Merchandise Store",
                coupon: "SUMMER_FUN",
                currency: "USD",
                discount: 3.33,
                index: 1,
                item_brand: "Google",
                item_category: "Apparel",
                item_category2: "Adult",
                item_category3: "Shirts",
                item_category4: "Crew",
                item_category5: "Short sleeve",
                item_list_id: "related_products",
                item_list_name: "Related Products",
                item_variant: "gray",
                location_id: "L_12345",
                price: 20.99,
                promotion_id: "P_12345",
                promotion_name: "Summer Sale",
                quantity: 1
            }
        ]
    }
})

generate_lead

Đo lường hành động người dùng gửi biểu mẫu trong trang, sử dụng cdpData.properties cho các biến không được xác định trong user_data

dataLayer.push({
    'event': 'pangoTrack',
    'eventAction': 'generate_lead',
    user_data: {
        email_address: 'ABC@XYZ.com',
        phone_number: '1234567890',
        address: {
            first_name: 'john',
            last_name: 'smith',
            city: 'menlopark',
            region: 'ca',
            postal_code: '94025',
            country: 'usa'
        },
        'form_key': '',
        'form_name': '',
        'form_vs': '', //form version,
        'cf': 'cf_01=Value || cf_ts_02=Value || cf_ls_01=["tag1", "tag2"]',
    },
    'cdpData': {
        properties: {
            'gender': 'male',
            'birthYear': '2000'
        }
    }
});

// Timestamp: cf_ts_01, cf_ts_02,...
// Boolean: cf_b_01, cf_b_02
// Double: cf_d_01, cf_d_02
// Long: cf_l_01, cf_l_02
// ListL: ["tag1", "tag2"] : cf_ls_01, cf_ls_02, cf_ls_03
// Text: cf_01, cf_02, cf_03

select_promotion

Để cho biết người dùng đã nhấp vào một chương trình khuyến mãi, hãy gửi sự kiện select_promotion với mặt hàng đó làm thông số mặt hàng

dataLayer.push({
    'event': 'pangoTrack',
    'event': 'select_promotion',
    creative_name: "Summer Banner",
    creative_slot: "featured_app_1",
    location_id: "L_12345",
    promotion_id: "P_12345",
    promotion_name: "Summer Sale",
    'ecommerce': {
        'items': [{
            'item_name': 'Tri Blend Android T-Shirt', //One of item_id or  item_name is required for product or impression data. 
            'item_id': '123',
            'promotion_id': '12345',
            'price': '15.25',
            'item_brand': 'Google',
            'item_category': 'Apparel',
            'item_variant': 'Gray',
            'promotion_id': 'p1',
            'promotion_name': 'p1 name',
            'creative_name': 'creative name',
            'creative_slot': 'right',
            'location_id': 'l_11',
            'index': 1,
            'quantity': 1
        }]
    }
});

view_promotion

Thương mại điện tử bao gồm hỗ trợ đo lường số lần hiển thị và số lần nhấp chuột của các chương trình khuyến mãi nội bộ, chẳng hạn như các biểu ngữ được hiển thị để quảng cáo bán hàng.

Số lần hiển thị quảng cáo thường được đo bằng lượt xem màn hình ban đầu bằng cách gửi sự kiện view_promotion cùng với thông số mặt hàng để chỉ định mặt hàng được quảng cáo.

dataLayer.push({
    'event': 'pangoTrack',
    'event': 'view_promotion',
    creative_name: "Summer Banner",
    creative_slot: "featured_app_1",
    location_id: "L_12345",
    promotion_id: "P_12345",
    promotion_name: "Summer Sale",
    'ecommerce': {
        'items': [{
            'item_name': 'Tri Blend Android T-Shirt', //One of item_id or  item_name is required for product or impression data. 
            'Item_id': '123',
            'promotion_id': '12345',
            'price': '15.25',
            'item_brand': 'Google',
            'item_category': 'Apparel',
            'item_variant': 'Gray',
            'promotion_id': 'p1',
            'promotion_name': 'p1 name',
            'creative_name': 'creative name',
            'creative_slot': 'right',
            'location_id': 'l_11',
            'index': 1,
            'quantity': 1
        }]
    }
});

custom_event

Đo lường các sự kiện tùy chỉnh theo nhu cầu trong trang. Lưu ý quan trọng: {{custom_event}} và các biến thuộc tính cần phải là biểu thức chính quy [A-Za-z0-9_-]

dataLayer.push({
    'event': 'pangoTrack',
    'eventAction': '{{custom_event}}',
    user_data: {
       always_use: true, //PangoCDP will be identify user, default identify for only generate_lead event
       email_address: 'ABC@XYZ.com',
       phone_number: '1234567890',
    },
    'cdpData': {
        properties: {
            'objectType': 'banner',
            'objectId': 'banner1'
        }
    }
})

Tạo mã đo lượng Measurement ID -

Tạo Facebook Pixlel -

Xem danh sách event đề xuất từ Google Xem Analytics 4

Xem danh sách các event để đo lường cảu Google Analytics 4

Xem hướng dẫn tại đây
Xem hướng dẫn tại đây
tại đây
dành cho e-commerce tại đây
Mô hình hoạt động của tracking code
Copy mã Measurement ID bạn vừa tạo
Copy mã Pixel ID bạn vừa tạo