ecommerce-analysis

ecommerce-analysis is a skill for Claude Code from surendranb/google-analytics-mcp. It costs 22 tokens per session (622 once invoked), scanned A, original, MIT.

A guide to analysing online-shop activity in Google Analytics 4, including revenue, purchases, average order value, and the steps from viewing a product to buying it.

In plain words
What is it for?
Use it to report sales results, calculate conversion and average order value, and find drop-offs between product views, carts, checkout, and purchases.
Why use it?
It shows which standard GA4 field names to use and helps reveal where shoppers leave the purchase process.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the google-analytics-mcp plugin — 18 skills, 1 MCP server shipped together

Good fit Use it to report sales results, calculate conversion and average order value, and find drop-offs between product views, carts, checkout, and purchases.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/surendranb/google-analytics-mcp/ecommerce-analysis
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add surendranb/google-analytics-mcp --skill ecommerce-analysis
Clone the repo
git clone --depth 1 https://github.com/surendranb/google-analytics-mcp

Made for: Claude Code.

Or install google-analytics-mcp, the plugin that ships this one along with the rest of its 18 skills, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ecommerce-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/surendranb/google-analytics-mcp/ecommerce-analysis/github.svg)](https://agentmods.dev/skills/surendranb/google-analytics-mcp/ecommerce-analysis)
Your own site
<a href="https://agentmods.dev/skills/surendranb/google-analytics-mcp/ecommerce-analysis"><img src="https://agentmods.dev/badge/skills/surendranb/google-analytics-mcp/ecommerce-analysis/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ecommerce-analysis

Your own site · 80×15
<a href="https://agentmods.dev/skills/surendranb/google-analytics-mcp/ecommerce-analysis"><img src="https://agentmods.dev/badge/skills/surendranb/google-analytics-mcp/ecommerce-analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 622 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.00622
Opus 5.5 $0.00009 $0.00249
Sonnet 5.5 $0.00004 $0.00124
Haiku 4.5 $0.00002 $0.00062

Measured 1mo ago against content hash d3ec2ccb84c9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ecommerce-analysis scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/ecommerce-analysis/SKILL.md · 79 lines

How it starts

The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Ecommerce Analysis

Revenue, conversion rate, AOV, and funnel drop-off using GA4 ecommerce events.

When to use

  • You have purchase, add_to_cart, begin_checkout events in GA4
  • You want to measure revenue, conversion rate, or average order value
  • You want to find where users drop off in the purchase funnel

Correct metric and dimension names

GA4 ecommerce uses specific API names — do not guess:

Concept GA4 API name
Revenue purchaseRevenue
Transactions ecommercePurchases
AOV averagePurchaseRevenue
Add to cart addToCarts
Checkout started checkouts
Cart-to-view rate cartToViewRate
Purchase-to-view rate purchaseToViewRate
Item views itemsViewed
Item revenue itemRevenue
Items purchased itemsPurchased
Product name itemName
Product category itemCategory
Transaction ID transactionId

Step 1 — Revenue overview

dimensions: ["date"]
metrics: ["ecommercePurchases", "purchaseRevenue", "averagePurchaseRevenue"]
date_range: last 30 days
order_by: date ASC

Step 2 — Funnel: views → cart → checkout → purchase

dimensions: ["sessionDefaultChannelGroup"]
metrics: ["itemsViewed", "addToCarts", "checkouts", "ecommercePurchases",
          "cartToViewRate", "purchaseToViewRate"]
date_range: last 30 days
order_by: ecommercePurchases DESC

Drop-off between stages = 1 - (next_stage / current_stage). The biggest drop-off is the highest-leverage fix.

Step 3 — Top products

dimensions: ["itemName", "itemCategory"]
metrics: ["itemsViewed", "addToCarts", "itemsPurchased", "itemRevenue"]
date_range: last 30 days
order_by: itemRevenue DESC

Step 4 — Revenue by channel

dimensions: ["sessionDefaultChannelGroup"]
metrics: ["ecommercePurchases", "purchaseRevenue", "averagePurchaseRevenue"]
date_range: last 30 days
order_by: purchaseRevenue DESC

Incompatible combinations to avoid

  • itemId or itemSku cannot be combined with session-level metrics
  • ecommercePurchases cannot be combined with eventCount in the same query
  • Use separate queries for item-level and session-level analysis

Read the full file on GitHub · 79 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 79 lines · 22 tokens per session scan A d3ec2ccb84c9

Subscribe to this mod's changes

ecommerce-analysis is a skill published in the GitHub repository surendranb/google-analytics-mcp (243 stars, last pushed 5d ago), licensed MIT. It adds 22 tokens to every session and 622 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

tiktok-shopping-ads-guide

This skill should be used when the user asks to "set up TikTok Shop ads", "create dynamic product ads on TikTok", "fix TikTok product feed errors", "build collection ads on TikTok", or mentions "TikTok Shopping", "Video Shopping Ads", or "TikTok product catalog". Do NOT use for: general TikTok creative strategy (use…

Ad-Superpowers/ad-superpowers-plugin · 113 tokens

ga4-revenue-analysis

This skill should be used when the user asks to "analyze GA4 revenue", "review product performance", "build a checkout funnel", or mentions "purchase journey insights", "e-commerce KPI dashboard", or "revenue trends in GA4". Do NOT use for: e-commerce event implementation (use ga4-ecommerce-setup), promotion and…

Ad-Superpowers/ad-superpowers-plugin · 87 tokens

google-ads-shopping-feed-optimizer

This skill should be used when the user asks to "optimize Shopping feed", "fix product disapprovals", "improve product titles", "set up custom labels", or mentions "Merchant Center", "feed rules", "product data quality", or "free listings optimization". Do NOT use for: Shopping campaign structure advice (use…

Ad-Superpowers/ad-superpowers-plugin · 107 tokens

meta-catalog-optimizer

This skill should be used when the user asks to "optimize product catalog", "improve catalog ad performance", "fix catalog feed issues", or mentions "Advantage+ Catalog Ads", "product set strategy", or "catalog feed optimization". Do NOT use for: campaign structure (use campaign-structure-advisor), creative…

Ad-Superpowers/ad-superpowers-plugin · 92 tokens

ecommerce-funnel-optimizer

This skill should be used when the user asks to "build an e-commerce ad funnel", "optimize retargeting windows", "set ROAS targets by funnel stage", "recover abandoned carts with ads", or mentions "dynamic product ads", "Advantage+ Catalog Ads", or "seasonal ad strategy". Do NOT use for: single-platform campaign…

Ad-Superpowers/ad-superpowers-plugin · 106 tokens

ga4-data-layer-guide

This skill should be used when the user asks to "set up a Data Layer", "implement GTM Data Layer", "push data to dataLayer", or mentions "e-commerce Data Layer", "Data Layer debugging", or "dataLayer structure". Do NOT use for: GA4 property setup (use ga4-property-setup-guide), event tracking without Data Layer (use…

Ad-Superpowers/ad-superpowers-plugin · 101 tokens