MinAI - Về trang chủ
Lý thuyết
9/1355 phút
Đang tải...

Marketing Attribution

Traffic source analysis, channel ROI, campaign effectiveness và marketing mix optimization

0

🎯 Mục tiêu bài học

TB5 min
Sau bài học này, bạn sẽ:
  • Phân tích traffic source effectiveness — kênh nào mang lại nhiều khách nhất
  • Tính Conversion Rate và Revenue theo từng marketing channel
  • Hiểu các Attribution Models: Last-click, First-click, Linear
  • So sánh ROI giữa các kênh marketing (Paid, Organic, Social, Email)
  • Phân tích hành vi khách hàng theo device type và thời gian
📋 Thông tin bài học
Thông tinChi tiết
⏱️ Thời lượng55 phút
📖 Chủ đề chínhTraffic Source, Channel ROI, Attribution, Device Analysis
💡 Kiến thức cần cóBài 01-08, SQL trung cấp
🎯 OutputMarketing channel performance report cho ShopVN
1

📖 Thuật ngữ quan trọng

TB5 min
Thuật ngữTiếng ViệtMô tả
Traffic SourceNguồn truy cậpKênh mà khách truy cập website (Direct, Organic, Paid...)
AttributionPhân bổ chuyển đổiXác định kênh marketing nào dẫn đến purchase
Last-clickCú click cuốiGán 100% conversion cho kênh cuối cùng trước mua
CACCustomer Acquisition CostChi phí để có được 1 khách hàng mới
ROASReturn on Ad SpendRevenue / Ad Spend — hiệu quả chi tiêu quảng cáo
OrganicTự nhiênTraffic từ tìm kiếm Google không trả tiền
PaidTrả phíTraffic từ quảng cáo Google Ads, Facebook Ads...
SocialMạng xã hộiTraffic từ Facebook, Instagram, TikTok
ReferralGiới thiệuTraffic từ website/blog khác giới thiệu
Bounce RateTỷ lệ thoát% sessions chỉ xem 1 trang rồi rời đi

Checkpoint

Traffic Source cho biết khách đến từ đâu. Attribution xác định kênh nào tạo ra conversion. CAC = Marketing Spend / New Customers. ROAS = Revenue / Ad Spend — ROAS trên 3x được coi là tốt.

2

📊 Traffic Source Analysis

TB5 min

Traffic Sources trong ShopVN

Marketing Channels trên ShopVN

📢Traffic Sources
🏠Owned Media
Direct (Type URL)
Email Marketing
🌐Earned Media
Organic Search
Referral Links
💰Paid Media
Paid Search/Display
Social Ads
Affiliate

Traffic Performance SQL

SQL
1-- Traffic source performance: sessions, conversion, revenue
2WITH source_sessions AS (
3 SELECT
4 traffic_source,
5 COUNT(DISTINCT session_id) AS sessions,
6 COUNT(DISTINCT CASE WHEN page_type = 'Product'
7 THEN session_id END) AS product_views,
8 COUNT(DISTINCT customer_id) AS unique_visitors,
9 ROUND(AVG(duration_seconds), 1) AS avg_duration,
10 ROUND(
11 SUM(CASE WHEN is_bounce = 1 THEN 1 ELSE 0 END) * 100.0
12 / COUNT(*), 1
13 ) AS bounce_rate_pct
14 FROM fact_page_views
15 WHERE YEAR(view_date) = 2024
16 GROUP BY traffic_source
17),
18source_orders AS (
19 SELECT
20 traffic_source,
21 COUNT(DISTINCT order_id) AS orders,
22 SUM(total_amount) AS revenue,
23 COUNT(DISTINCT customer_id) AS buying_customers,
24 ROUND(AVG(total_amount), 0) AS aov
25 FROM fact_orders
26 WHERE YEAR(order_date) = 2024
27 AND status = 'Delivered'
28 GROUP BY traffic_source
29)
30SELECT
31 s.traffic_source,
32 s.sessions,
33 s.unique_visitors,
34 COALESCE(o.orders, 0) AS orders,
35 COALESCE(o.revenue, 0) AS revenue,
36 COALESCE(o.aov, 0) AS aov,
37 s.bounce_rate_pct,
38 s.avg_duration,
39 ROUND(COALESCE(o.orders, 0) * 100.0 / NULLIF(s.sessions, 0), 2) AS conversion_rate_pct,
40 ROUND(COALESCE(o.revenue, 0) * 100.0
41 / NULLIF(SUM(COALESCE(o.revenue, 0)) OVER(), 0), 1) AS revenue_share_pct
42FROM source_sessions s
43LEFT JOIN source_orders o ON s.traffic_source = o.traffic_source
44ORDER BY revenue DESC;

Channel Performance Benchmark

ChannelSessions ShareConv RateAOVBounce Rate
Direct20-25%5-8%Cao25-35%
Organic20-25%4-6%TB-Cao30-40%
Paid20-30%3-5%TB35-45%
Social15-20%1-3%Thấp-TB45-60%
Email3-5%6-10%Cao20-30%
Affiliate5-10%3-5%TB35-45%
Referral5-10%3-5%TB30-40%
3

🎯 Attribution Models

TB5 min

Các mô hình phân bổ

Attribution Models phổ biến

🎯Last-click
🏁First-click
📊Linear
Time Decay
ModelMô tảƯu điểmNhược điểm
Last-click100% credit cho touchpoint cuốiĐơn giản, dễ implementBỏ qua awareness channels
First-click100% credit cho touchpoint đầuĐánh giá đúng awarenessBỏ qua closing channels
LinearCredit chia đều cho tất cả touchpointsCông bằngKhông phân biệt impact
Time DecayTouchpoint gần purchase được credit nhiều hơnRealisticPhức tạp hơn
ShopVN sử dụng Last-click Attribution

Trong dataset ShopVN, traffic_source trên fact_orderslast-click attribution — kênh cuối cùng trước khi đặt hàng. Đây là mô hình phổ biến nhất tại Việt Nam vì đơn giản và dễ đo lường.

Last-click Attribution trên ShopVN

SQL
1-- Last-click Attribution: revenue và orders theo source
2SELECT
3 traffic_source,
4 COUNT(DISTINCT order_id) AS orders,
5 SUM(total_amount) AS revenue,
6 ROUND(AVG(total_amount), 0) AS aov,
7 COUNT(DISTINCT customer_id) AS unique_buyers,
8 ROUND(
9 SUM(total_amount) * 100.0 / SUM(SUM(total_amount)) OVER(), 1
10 ) AS revenue_attribution_pct
11FROM fact_orders
12WHERE status = 'Delivered'
13 AND YEAR(order_date) = 2024
14GROUP BY traffic_source
15ORDER BY revenue DESC;

Checkpoint

Last-click Attribution gán 100% credit cho kênh cuối cùng trước purchase. Nó đơn giản nhưng đánh giá thấp awareness channels (Social, Display). Email và Direct thường có conversion rate cao nhất vì target khách đã biết brand.

4

📱 Device & Time Analysis

TB5 min

Hành vi theo Device

SQL
1-- Performance theo device type
2SELECT
3 o.device_type,
4 COUNT(DISTINCT o.order_id) AS orders,
5 SUM(o.total_amount) AS revenue,
6 ROUND(AVG(o.total_amount), 0) AS aov,
7 ROUND(
8 COUNT(DISTINCT o.order_id) * 100.0
9 / SUM(COUNT(DISTINCT o.order_id)) OVER(), 1
10 ) AS order_share_pct
11FROM fact_orders o
12WHERE o.status = 'Delivered'
13 AND YEAR(o.order_date) = 2024
14GROUP BY o.device_type
15ORDER BY orders DESC;

Hành vi theo ngày trong tuần

SQL
1-- Orders theo ngày trong tuần
2SELECT
3 t.day_name,
4 t.day_of_week,
5 COUNT(DISTINCT o.order_id) AS avg_daily_orders,
6 ROUND(AVG(o.total_amount), 0) AS aov,
7 ROUND(SUM(o.total_amount) / COUNT(DISTINCT t.date_key), 0) AS avg_daily_revenue
8FROM fact_orders o
9JOIN dim_time t ON o.order_date = t.date_key
10WHERE o.status = 'Delivered'
11 AND t.year = 2024
12GROUP BY t.day_name, t.day_of_week
13ORDER BY t.day_of_week;

Seasonality: Doanh số theo tháng

SQL
1-- Monthly revenue trend + YoY comparison
2SELECT
3 t.month,
4 t.month_name,
5 SUM(CASE WHEN t.year = 2024 THEN o.total_amount ELSE 0 END) AS revenue_2024,
6 SUM(CASE WHEN t.year = 2023 THEN o.total_amount ELSE 0 END) AS revenue_2023,
7 ROUND(
8 (SUM(CASE WHEN t.year = 2024 THEN o.total_amount ELSE 0 END)
9 - SUM(CASE WHEN t.year = 2023 THEN o.total_amount ELSE 0 END))
10 * 100.0
11 / NULLIF(SUM(CASE WHEN t.year = 2023 THEN o.total_amount ELSE 0 END), 0)
12 , 1) AS yoy_growth_pct
13FROM fact_orders o
14JOIN dim_time t ON o.order_date = t.date_key
15WHERE o.status = 'Delivered'
16GROUP BY t.month, t.month_name
17ORDER BY t.month;
Seasonality trong E-commerce VN

Doanh số cao nhất vào:

  • 📅 Tháng 11: Flash Sale 11.11 (Singles Day)
  • 📅 Tháng 12: Flash Sale 12.12 + Giáng sinh
  • 📅 Tháng 1-2: Tết Nguyên Đán
  • 📅 Tháng 6: Mid-year Sale 6.6

Doanh số thấp nhất: Tháng 3-4 (sau Tết, không có event lớn). DA cần adjust for seasonality khi so sánh MoM.

5

📋 Tổng kết

TB5 min

Kiến thức đã học

Chủ đềNội dung chính
Traffic Sources7 channels: Direct, Organic, Paid, Social, Email, Affiliate, Referral
Channel PerformanceSessions, Conversion Rate, Revenue, AOV theo từng channel
Attribution ModelsLast-click (đơn giản) vs First-click vs Linear vs Time Decay
Device AnalysisMobile chiếm 70%+ traffic, Desktop conversion cao hơn
Seasonality11.11, 12.12, Tết là peak periods

Key Takeaways

  1. Email có conversion cao nhất (6-10%) nhưng volume thấp — tăng email list
  2. Social có bounce rate cao nhất (45-60%) — cải thiện landing page
  3. Mobile chiếm 70%+ traffic nhưng conversion thấp — optimize mobile UX
  4. Seasonality mạnh — plan inventory và marketing budget theo mùa

Bài tiếp theo: Review & Sentiment Analysis →

🎉 Bạn đã hiểu Marketing Attribution! Module tiếp theo sẽ phân tích reviews và xây dựng dashboards.