ai-referral-analysis
How to track and measure traffic from ChatGPT, Claude, Perplexity, and Gemini in GA4. Exact dimension filters, regex patterns,…
Analyze GA4 ecommerce performance: purchase revenue, average order value, checkout funnel drop-off, and item revenue by acquisition channel.
Claude Code
$ npx -y skills add surendranb/google-analytics-mcp --skill ecommerce-analysis --agent claude-code
Codex
$ npx skills add surendranb/google-analytics-mcp --skill ecommerce-analysis -a codex -y
Cursor
$ npx skills add surendranb/google-analytics-mcp --skill ecommerce-analysis -a cursor -y
Gemini CLI
$ npx skills add surendranb/google-analytics-mcp --skill ecommerce-analysis -a gemini-cli -y
GitHub Copilot
$ npx skills add surendranb/google-analytics-mcp --skill ecommerce-analysis -a github-copilot -y
OpenCode
$ npx skills add surendranb/google-analytics-mcp --skill ecommerce-analysis -a opencode -y
Windsurf
$ npx skills add surendranb/google-analytics-mcp --skill ecommerce-analysis -a windsurf -y
name: ecommerce-analysis titleTag: "GA4 Ecommerce Analysis: Revenue, AOV & Drop-Offs" description: "Analyze GA4 ecommerce performance: purchase revenue, average order value, checkout funnel drop-off, and item revenue by acquisition channel."
Analyze e-commerce performance in Google Analytics 4: calculate revenue trends, average order value (AOV), item-level performance, and multi-step checkout funnel drop-offs.
GA4 e-commerce queries require exact API field names:
| Metric / Dimension | GA4 API Name | Type | Description | |---|---|---|---| | **Purchase Revenue** | `purchaseRevenue` | Metric | Gross transaction revenue | | **Transactions** | `ecommercePurchases` | Metric | Number of completed purchase events | | **Average Order Value** | `averagePurchaseRevenue` | Metric | Average revenue per transaction | | **Add to Cart** | `addToCarts` | Metric | Total add_to_cart events | | **Checkout Started** | `checkouts` | Metric | Total begin_checkout events | | **Cart-to-View Rate** | `cartToViewRate` | Metric | Percentage of item views added to cart | | **Purchase-to-View Rate** | `purchaseToViewRate` | Metric | Percentage of item views purchased | | **Item Views** | `itemsViewed` | Metric | Total times items were viewed | | **Item Revenue** | `itemRevenue` | Metric | Revenue generated by specific item | | **Items Purchased** | `itemsPurchased` | Metric | Number of units purchased | | **Item Name** | `itemName` | Dimension | Product title | | **Item Category** | `itemCategory` | Dimension | Product collection / category |
---
Track gross performance and transaction trends over time:
dimensions: ["date"] metrics: ["ecommercePurchases", "purchaseRevenue", "averagePurchaseRevenue"] date_range: last 30 days order_by: date ASC
---
Analyze conversion velocity across the purchase funnel:
dimensions: ["sessionDefaultChannelGroup"]
metrics: ["itemsViewed", "addToCarts", "checkouts", "ecommercePurchases",
"cartToViewRate", "purchaseToViewRate"]
date_range: last 30 days
order_by: ecommercePurchases DESC**Drop-off calculation:** `1 - (next_stage_count / current_stage_count)`. Identify whether the largest bottleneck is cart abandonment (view → cart) or checkout friction (checkout → purchase).
---
Identify revenue drivers and product-level conversion rates:
dimensions: ["itemName", "itemCategory"] metrics: ["itemsViewed", "addToCarts", "itemsPurchased", "itemRevenue"] date_range: last 30 days order_by: itemRevenue DESC limit: 20
---
Determine which marketing channels deliver the highest paying customers:
dimensions: ["sessionDefaultChannelGroup"] metrics: ["ecommercePurchases", "purchaseRevenue", "averagePurchaseRevenue"] date_range: last 30 days order_by: purchaseRevenue DESC
---
Copy-paste these prompts into Claude Code, Cursor, or Gemini CLI:
1. "Summarize our e-commerce performance for the past 30 days compared to the prior 30 days. Report purchaseRevenue, ecommercePurchases, and averagePurchaseRevenue." 2. "Audit our checkout funnel drop-off by acquisition channel over the last 60 days. Which channel experiences the highest cart-to-view rate and purchase rate?" 3. "List our top 15 products by gross revenue over the past 90 days. Include itemsPurchased, itemRevenue, and calculate the purchase-to-view conversion rate."
1. Open **Reports → Monetization → Ecommerce purchases**. 2. Review the table to view `Item revenue`, `Item purchase quantity`, and `Items viewed`. 3. To view the multi-step funnel, navigate to **Explore → Funnel exploration** and select the predefined *Purchase journey* template.
Model Context Protocol (MCP) server for Google Analytics 4: real-time query exploration, schema discovery, metric aggregation, and audience insights for AI agents. 🌐 Live Documentation & Web Portal:
How to track and measure traffic from ChatGPT, Claude, Perplexity, and Gemini in GA4. Exact dimension filters, regex patterns,…
Why session, user, and event metrics never match in GA4. Rules for pairing dimensions and metrics across user-scoped,…
Detect and filter automated bot spikes in Google Analytics 4. Patterns for datacenter ASN spikes, zero-second sessions, and…
How GA4 Default Channel Groups work, how to audit channel performance, and how to spot traffic falling into Unassigned or Direct…
Exact API field names for GA4 Data API queries. Avoid 400 errors from Universal Analytics names like ga:sessions or pageviews by…
Which dimensions and metrics can be queried together in GA4 without triggering incompatible scope errors. Matrix of user,…
Use this skill when the user requests to review, analyze, critique, or summarize academic papers, research articles, preprints,…
Research what people actually say about any topic in the last 30 days. Pulls posts and engagement from Reddit, X, YouTube,…
Estimates intracellular metabolic fluxes from steady-state carbon-13 isotope-tracing measurements using validated atom maps,…
Search literature across sources, verify or manage citations, and build MeSH strategies or citation-impact audits. Use for…