Chatspark
K
K

Per-Page Suggested Prompts

Show visitors different suggested questions depending on which page they are viewing. A visitor on your pricing page sees pricing-related prompts. A visitor on your support page sees support-related ones. No code required.

5 min read

Updated April 2026

Overview

Suggested Prompts are the clickable conversation starters that appear in the chat widget before a visitor sends their first message. By default, your agent shows the same prompts on every page.

Per-Page Suggested Prompts let you replace those defaults with prompts that are specific to the page the visitor is currently on. When a visitor navigates to a page that matches one of your URL rules, the widget automatically swaps in the relevant prompts.

Note
Per-Page Suggested Prompts are available on the Plus plan and above.

Setting Up URL Rules

  1. Go to your AI Agent settings and open the Settings tab.
  2. Scroll to Per-Page Suggested Prompts and click Add URL Rule.
  3. Enter a URL pattern. This is a partial match. For example, entering /pricing matches any page whose URL contains /pricing.
  4. Enter up to four prompts for this page, or click Generate Prompts to let your AI agent create them from your training data.
  5. Click Add Rule to save it.

You can configure up to five URL rules per agent.

URL pattern matching
Patterns use a simple contains check against the full page URL. A pattern of /pricing matches https://example.com/pricing and https://example.com/pricing/enterprise. Make your patterns specific enough to avoid unintended matches.

Generating Prompts

Each URL rule has a Generate Prompts button. Click it and ChatSpark will search your training data for content that is specific to that URL and generate four contextually relevant prompts.

If your training data includes pages that were crawled from that URL, those pages are used first for the most relevant results. If no matching pages are found, the generator falls back to a broader search of your training data.

One-time generation
Prompts can only be generated once per rule. After generation, edit them manually if you want to make changes. This prevents accidental overwrites of prompts you have already refined.

Widget Behavior

When a visitor is on a page that matches one of your active URL rules, the widget shows the prompts from that rule instead of your default suggested prompts. The swap happens automatically, including on single-page applications that update the URL without a full page reload.

If a visitor navigates away from a matching page to a page that does not match any rule, the default prompts return.

Priority over A/B Testing
Per-Page Prompts take priority over A/B Testing variant prompts. If a visitor is assigned to Variant B and lands on a page with a matching URL rule, they see the page-specific prompts rather than the Variant B prompts.

Example

A software company has three URL rules configured:

  • Pattern: /pricingPrompts: “What plan is right for me?”, “Is there a free trial?”, “Can I switch plans later?”, “Do you offer discounts?”
  • Pattern: /featuresPrompts: “Which features are included?”, “Does this integrate with my CRM?”, “How does the AI learn from my data?”, “Can I try a live demo?”
  • Pattern: /supportPrompts: “How do I reset my password?”, “Where are my invoices?”, “How do I add a team member?”, “What is your response time?”

A visitor who arrives on the pricing page immediately sees pricing-related questions. They do not have to guess what the agent can help with. If they navigate to the features page, the prompts update automatically.

Previous

AI Agent Triggers

Next

A/B Testing for AI Agents