AI prompts
Turn analytics insights into actionable fixes with AI assistance.
What are AI prompts?
When Glyphex identifies issues on your site (high bounce rate, poor mobile experience, etc.), it can generate detailed prompts that you can give to AI coding assistants like Claude Code or Cursor.
These prompts include your actual site metrics, so the AI can provide specific, actionable recommendations tailored to your situation.
How to use
Go to insights
From your site dashboard, click on the Insights tab in the navigation. This page shows automated analysis of your analytics data.
Find an issue to address
Insights are categorized as Issues (problems to fix), Wins (things going well), or Info (neutral observations). Use the filter pills to focus on issues.
Click "AI Prompt"
Each insight card has an AI Prompt button in the bottom right corner. Click it to open a panel with the generated prompt.
Copy and paste
Click the Copy button to copy the prompt to your clipboard. Then paste it into Claude Code, Cursor, or your preferred AI coding assistant.
Let AI help
The AI will analyze the context and suggest specific code changes, optimizations, or strategies to address the issue.
What's in a prompt?
Each generated prompt includes:
- Context - Your site domain, time range, and the specific issue identified
- Current metrics - Real numbers from your analytics (visitors, bounce rate, session duration)
- Investigation questions - Key questions to answer when diagnosing the issue
- Analysis approach - Recommended steps to investigate the problem
- Suggested actions - Prioritized fixes from quick wins to strategic changes
- Success metrics - Target numbers to aim for
Supported categories
AI prompts are available for these categories of insights:
| Category | Example issues |
|---|---|
| Bounce rate | High bounce rate, low continuation pages |
| Mobile | Poor mobile engagement, mobile bounce issues |
| Conversions | Low conversion rate, goal performance |
| Traffic | Traffic drops, source distribution |
| Content | Underperforming pages, content gaps |
| Geographic | Regional performance issues |
| SEO | Search traffic issues, ranking opportunities |
Compatible tools
The prompts are optimized for:
- Claude Code - Anthropic's CLI coding assistant
- Cursor - AI-powered code editor
- Any AI assistant that can understand structured prompts
Example workflow
You notice your site has a 75% bounce rate. Here's how AI prompts help:
- Glyphex shows "High bounce rate" as an issue in Insights
- Click AI Prompt to get a detailed analysis prompt with your metrics
- Copy the prompt into Claude Code in your project directory
- The AI analyzes your codebase and suggests specific fixes
- Implement the changes and monitor your bounce rate improvement
Use the API with AI tools
AI coding assistants like Claude Code and Cursor can fetch your analytics data directly using the Glyphex API. This lets AI analyze live data without copy-pasting.
1. Create an API key
Go to your site settings and create an API key under the API keys section. Save the key somewhere secure — it is only shown once.
2. Give the AI your key and endpoints
Paste this into your AI assistant to give it access to your analytics:
# Glyphex Analytics API Base URL: https://glyphex.io/api/v1 API Key: glx_your_key_here (use as Bearer token) # Available endpoints (all GET, all return JSON): /stats/overview - Visitors, pageviews, sessions, bounce rate, avg duration /stats/timeseries - Daily visitor and pageview counts /stats/pages - Top pages by views /stats/referrers - Top traffic sources /stats/channels - Traffic by channel (organic, direct, social, etc.) /stats/devices - Visitor breakdown by device type /stats/geo - Visitor breakdown by country /stats/events - Custom event counts /stats/utm - UTM source breakdown # Query parameters: range=24h|7d|30d|90d (default: 30d) limit=1-100 (default: 10, for pages/referrers/devices/geo/events/utm) country=US (filter by country) device=mobile (filter by device) # Example: curl https://glyphex.io/api/v1/stats/overview?range=7d \ -H "Authorization: Bearer glx_your_key_here"
3. Ask the AI to analyze your data
Example prompts you can use:
- "Fetch my analytics overview for the last 7 days and suggest improvements"
- "Check my top pages and bounce rate, then audit those pages for UX issues"
- "Pull my traffic sources and suggest how to improve organic search"
- "Get my device breakdown and check if my site has mobile issues"
Pro tip: Add to your CLAUDE.md
If you use Claude Code, add the API details to your project's CLAUDE.md file. This way Claude always has access to your analytics without you needing to paste the key each time.
Tips
Run in your project directory
For code-related fixes, paste the prompt while the AI has access to your codebase. This allows it to suggest specific file changes.
Address one issue at a time
Focus on fixing one insight before moving to the next. This makes it easier to measure the impact of each change.
Check back after changes
After implementing fixes, return to Insights in a few days to see if the issue has improved. The prompts include success metrics to measure against.
Data stays in the prompt
Your analytics data is included in the prompt text that you copy. Glyphex does not send data directly to any AI service. You control what gets shared.