feat: add Search panel to dashboard and enrich Search tab
Dashboard: compact Search Performance panel showing top 5 queries, clicks, impressions, and avg position alongside Campaigns. Search tab: clicks/impressions trend chart, top query position tracker cards, and new queries badge.
This commit is contained in:
@@ -77,3 +77,22 @@ export async function getGSCQueryPages(siteId: string, query: string, startDate:
|
||||
export async function getGSCPageQueries(siteId: string, page: string, startDate: string, endDate: string): Promise<GSCQueryResponse> {
|
||||
return apiRequest<GSCQueryResponse>(`/sites/${siteId}/gsc/page-queries?page=${encodeURIComponent(page)}&start_date=${startDate}&end_date=${endDate}`)
|
||||
}
|
||||
|
||||
export interface GSCDailyTotal {
|
||||
date: string
|
||||
clicks: number
|
||||
impressions: number
|
||||
}
|
||||
|
||||
export interface GSCNewQueries {
|
||||
count: number
|
||||
queries: string[]
|
||||
}
|
||||
|
||||
export async function getGSCDailyTotals(siteId: string, startDate: string, endDate: string): Promise<{ daily_totals: GSCDailyTotal[] }> {
|
||||
return apiRequest<{ daily_totals: GSCDailyTotal[] }>(`/sites/${siteId}/gsc/daily-totals?start_date=${startDate}&end_date=${endDate}`)
|
||||
}
|
||||
|
||||
export async function getGSCNewQueries(siteId: string, startDate: string, endDate: string): Promise<GSCNewQueries> {
|
||||
return apiRequest<GSCNewQueries>(`/sites/${siteId}/gsc/new-queries?start_date=${startDate}&end_date=${endDate}`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user