Repository navigation
Description
Problem
Prompt suggestions currently come from three places: LLM generation, heuristics, and real Search Console demand (#650). Search Console answers one question — what are people typing into a search box — which is a proxy for what they might ask an AI engine.
Once the GA4 traffic pipeline (Phase 3) exists, two signals become available that Search Console structurally cannot provide, because they describe behaviour rather than search volume:
-
Pages that make money but have no prompt coverage. The brand's best-converting entry pages are known from the customer's own analytics. If nothing in the tracked prompt set would surface those pages in an AI answer, that is a commercial blind spot, stated in the customer's own numbers: "Your third highest-revenue page has no prompt tracking. Nobody asking an AI about this category finds you."
-
Pages AI engines already send traffic to. If ChatGPT or Claude already refers visitors to a page, that topic is demonstrably answerable by an AI engine and the brand is already a candidate source for it. Tracking prompts around it turns an accident into a measured position.
The two are complements: the first finds what is missing, the second finds what is working. Search Console demand stays as the third, orthogonal signal.
Proposal
Add Google Analytics as a suggestion source, feeding the existing pipeline rather than building a parallel one.
Storage. prompt_suggestions.source currently allows ('llm', 'heuristic', 'gsc'); add 'ga'. One small numbered migration.
Two generators.
- Revenue blind spots — rank the brand's landing pages by conversions and revenue over the sync window, drop the ones already covered by a tracked prompt, and suggest prompts for the rest.
- AI momentum — take the pages AI sources referred traffic to, apply the same coverage filter, suggest prompts for what is uncovered.
Derive the prompt from the page, not from the URL or a product name. The site crawler already used by Site Audit and the content pipeline can fetch a URL and read its title, category and purpose. Product names are usually SKUs ("ANS-2400 Pro Black") that nobody asks an AI about; the useful prompt sits at the category and need level ("best noise-cancelling headphones", "headphones for running"). Reading the page is how we get there — and it is why this works without a product catalogue at all.
Exclude pages that cannot yield a sensible prompt. Checkout, cart, order confirmation, login, account and thank-you pages produce revenue attribution but no answerable question. A GA4 purchase event fires on the confirmation page, so without this filter the highest-revenue "page" in most shops is /checkout.
Show the reason. Every suggestion carries the evidence that produced it — "3rd by revenue, not tracked", "ChatGPT referred 44 sessions here last month" — the same way Search Console suggestions carry their volume. This is the difference between a suggestion a customer acts on and one they dismiss.
Out of scope
- The traffic surface itself (charts, KPI cards, the AI Traffic page).
- Changing how Search Console suggestions work.
- Automatically adding suggested prompts to tracking — suggestions stay suggestions.
Acceptance criteria
- With a mapped GA4 property and synced traffic, the prompt suggestion card includes suggestions derived from the brand's own analytics, labelled with their source and reason.
- Suggestions are generated from page content, not from URL slugs or raw product names.
- Transactional pages (checkout, cart, confirmation, account, login) never produce suggestions.
- Brands already tracking a prompt that covers a page do not get a duplicate suggestion for it.
- Brands without the Analytics connection, without synced traffic, or on a self-host without Composio credentials see exactly what they see today.
- A property without ecommerce tracking still produces suggestions, using conversions and AI-referred traffic instead of revenue.
Depends on
The GA4 traffic pipeline landing first — the suggestions read the table it creates.
Activity
feat(prompts): suggest prompts from the pages analytics says are wort…