SEO — Control Center & GSC
SEO control center, GSC OAuth, PageSpeed, rank tracking và AI visibility.
SEO — Control Center & GSC
Module SEO là trung tâm: audit on-page, kỹ thuật, PageSpeed, GSC, rank tracking và AI visibility.
Control Center
/dashboard/seo — audit, issues, recommendations
GSC Integration
OAuth, analytics, trends, device/country/page
Tracking
Rank (Serper) + AI visibility (Sellm) + competitor gap
Bạn tìm thấy gì ở đâu
| Trang | Đường dẫn | Mô tả |
|---|---|---|
| SEO Overview | /dashboard/seo | Control center, aggregated view + sites |
| Opportunities | /dashboard/seo/opportunities | Keyword gaps, refresh opportunities |
| Pages | /dashboard/seo/pages | Inventory pages, audit per URL |
| Actions | /dashboard/seo/actions | Recommendations → accept → tạo plan item |
| GSC Callback | /dashboard/seo/gsc-callback | OAuth callback, exchange code (client component) |
Đường dẫn legacy /dashboard/seo-old vẫn tồn tại nhưng không dùng cho tenant mới — hãy dùng /dashboard/seo.
Kết nối Google Search Console
Lấy URL: bấm Connect GSC trong
/dashboard/seo → getGscAuthUrl trả Google OAuth URL với state nonce.Authorize: đăng nhập Google, chọn property, cho phép.
Callback: Google redirect về
/dashboard/seo/gsc-callback?code=...&state=... → connectGscSimple/exchangeGscCode validate nonce, mã hoá tokens.Chọn property:
listGscSites / getGscPropertyOptions → confirmGscProperty (admin) để chốt site.Xem data:
getGscDashboardData, getSearchAnalytics (clicks, impressions, CTR, position), breakdowns Device/Country/Page/Trends.GSC callback phải validate state chống CSRF. Tokens mã hoá, không bao giờ hiện ra client. Nếu đổi property, phải disconnectGsc rồi connect lại.
Kiểm tra kỹ thuật & Nội dung
| Check | Cách gọi | Mô tả |
|---|---|---|
| On-Page | runOnPageScan / analyzeOnPage | Audit per URL, tính computeOnPageScore |
| PageSpeed | runPageSpeed / runBothStrategies | Mobile + desktop, LCP, CLS |
| Technical | runTechnicalSeo | DNS, SSL, robots.txt, sitemap |
| Save/History | saveScan / getScanHistory / getLatestScan | Lưu và xem lịch sử scans |
Rank Tracking & AI Visibility
| Chức năng | API | Mô tả |
|---|---|---|
| Rank | findDomainPosition (Serper) → syncRankTracking / getRankTracking | Tìm vị trí 1-100 trong SERP, lưu snapshot |
| AI Visibility | getLatestCompletedRun (Sellm) → syncAiVisibility / getAiVisibility | Mức độ xuất hiện trong AI answers |
| Competitor Gap | analyzeCompetitorGap → getCompetitorGap | So sánh gaps với competitor domain |
| Geo | runGeoObservation / getGeoObservationJob | Kiểm tra visibility theo location |
Recommendations → Actions
- Hệ thống tự
deriveSeoRecommendationstừ GSC + audit + rank + issues →listRecommendations - Bạn xem
getRecommendation→ bấm Accept →acceptRecommendation→ tạoSeoActionvà link vào Monthly Plan - Theo dõi
getActionExecutionContext,updateActionStatus,assignAction(admin),getActionVerification
Quản lý Sites & Audits
| Chức năng | Mô tả |
|---|---|
listSites / saveSiteUrl / verifySite | Quản lý sites đã scan/configure |
listPages / getPageDetail | Pages được audit |
listIssues / getIssueSummary / getIssueDetail / updateIssueStatus | Issues (type, severity, page) |
runFullAudit / queueAudit / getAuditStatus / cancelAudit / retryAudit | Audit async — runFullAudit trả audit_run_id, poll getAuditStatus đến completed/failed |
listRecommendations / listActions / createAction | Recommendations và actions |
getSeoOverview / getControlCenter / getDashboard | Tổng quan aggregated |
Mọi bảng SEO đều tenant-scoped qua org_id. Dùng getWorkspaceStatus để biết GSC/audit/recommendations đã sẵn sàng chưa trước khi generate Monthly Plan.