Files
Ho Ngoc Hai 76d75c753b Migrate
2026-05-23 18:37:02 +07:00
..
2026-05-23 18:37:02 +07:00
2026-05-23 18:37:02 +07:00

Ads Analytics Service - Dịch vụ Phân tích Quảng cáo

Microservice cung cấp báo cáo, dashboard và insights cho chiến dịch quảng cáo.

Tổng Quan

Ads Analytics Service tổng hợp và phân tích dữ liệu quảng cáo:

  • Real-time Reporting - Báo cáo thời gian thực
  • Custom Reports - Báo cáo tùy chỉnh theo nhu cầu
  • Audience Insights - Phân tích đối tượng
  • Performance Insights - Khuyến nghị tối ưu hóa

Yêu Cầu

Yêu cầu Phiên bản
.NET SDK 10.0.101+
Docker 24.0+
ClickHouse 23.8+ (khuyến nghị)
PostgreSQL 15+

Bắt Đầu Nhanh

cd services/ads-analytics-service-net
docker-compose up -d

Cấu Trúc Dự Án

ads-analytics-service-net/
├── src/
│   ├── AdsAnalyticsService.API/
│   │   ├── Controllers/
│   │   │   ├── MetricsController.cs
│   │   │   ├── ReportsController.cs
│   │   │   └── InsightsController.cs
│   │   └── Application/
│   │
│   ├── AdsAnalyticsService.Domain/
│   │   └── AggregatesModel/
│   │       ├── MetricsAggregate/
│   │       ├── ReportAggregate/
│   │       └── InsightAggregate/
│   │
│   └── AdsAnalyticsService.Infrastructure/
│
└── AdsAnalyticsService.slnx

Metrics

Metric Mô tả
Impressions Số lần hiển thị
Clicks Số lần click
CTR Click-through rate
CPC Cost per click
CPM Cost per 1000 impressions
Conversions Số chuyển đổi
CPA Cost per acquisition
ROAS Return on ad spend

API Endpoints

Metrics

Method Endpoint Mô tả
GET /api/v1/ads-analytics/campaigns/{id}/metrics Metrics chiến dịch
GET /api/v1/ads-analytics/adsets/{id}/metrics Metrics Ad Set
GET /api/v1/ads-analytics/ads/{id}/metrics Metrics Ad

Reports

Method Endpoint Mô tả
GET /api/v1/ads-analytics/reports Danh sách báo cáo
POST /api/v1/ads-analytics/reports Tạo báo cáo custom
POST /api/v1/ads-analytics/reports/schedule Lên lịch báo cáo
GET /api/v1/ads-analytics/reports/{id}/export Export báo cáo

Breakdown Dimensions

Method Endpoint Mô tả
GET /api/v1/ads-analytics/campaigns/{id}/breakdown?by=age Phân tích theo tuổi
GET /api/v1/ads-analytics/campaigns/{id}/breakdown?by=gender Phân tích theo giới tính
GET /api/v1/ads-analytics/campaigns/{id}/breakdown?by=placement Phân tích theo vị trí
GET /api/v1/ads-analytics/campaigns/{id}/breakdown?by=device Phân tích theo thiết bị

Insights

Method Endpoint Mô tả
GET /api/v1/ads-analytics/insights/audience Audience insights
GET /api/v1/ads-analytics/insights/performance Khuyến nghị tối ưu

Tích Hợp

Service Tích hợp
ads-serving-service Consume impression/click data
ads-tracking-service Consume conversion data
ads-manager-service Campaign metadata

Cấu Hình

Biến Mô tả
DATABASE_URL PostgreSQL/ClickHouse connection
RABBITMQ_URL RabbitMQ connection

Giấy Phép

Độc quyền - GoodGo Platform