mirror of
https://github.com/AJaySi/ALwrity.git
synced 2026-04-25 00:45:54 +03:00
[PR #430] Add bounded query-page opportunities to GSC analytics and normalization #736
Labels
No labels
AI Content Agents
AI Content Strategy
AI Content planning
AI Marketing Tools
AI SEO
AI personalization
AI writer
ALwrity Copi-lot
Alwrity web search
Anthropic
DeepSeek
Gemini AI
Integration
LLM
OnBoarding
OnBoarding
RAG knowledgebase Memory
bug
documentation
enhancement
good first issue
help wanted
invalid
openai
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ALwrity#736
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/AJaySi/ALwrity/pull/430
Author: @AJaySi
Created: 3/12/2026
Status: 🔄 Open
Base:
main← Head:codex/extend-gsc-data-retrieval-and-processing📝 Commits (1)
04612c7Add bounded query-page opportunities to GSC analytics flow📊 Changes
3 files changed (+68 additions, -5 deletions)
View changed files
📝
backend/api/content_planning/services/content_strategy/autofill/normalizers/analytics_normalizer.py(+2 -0)📝
backend/services/analytics/handlers/gsc_handler.py(+36 -0)📝
backend/services/gsc_service.py(+30 -5)📄 Description
Motivation
Description
QUERY_PAGE_OPPORTUNITIES_ROW_LIMIT = 2500andQUERY_PAGE_OPPORTUNITIES_MAX_WINDOW_DAYS = 90and use them for the GSC['query','page']request to bound rows and date window inbackend/services/gsc_service.py._get_query_page_opportunity_windowto derive a bounded start/end date for the query+page request and includedquery_page_data.requested_windowmetadata in the returned analytics payload.query_page_opportunitiesprocessing inbackend/services/analytics/handlers/gsc_handler.pyto transform query+page rows into a prioritized list (fields:query,page,clicks,impressions,ctr,position) sorted by opportunity and capped (top 100) for downstream consumption, and included this field in both success and error/partial responses.backend/api/content_planning/services/content_strategy/autofill/normalizers/analytics_normalizer.pyto pass throughquery_page_opportunitiesinto the normalized analytics structure.Testing
python -m compileall backend/services/gsc_service.py backend/services/analytics/handlers/gsc_handler.py backend/api/content_planning/services/content_strategy/autofill/normalizers/analytics_normalizer.py, which completed successfully.Codex Task
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.