GA4 Ecommerce Performance Tracker

See which channels and devices actually drive revenue. Get ecommerce metrics by channel with a pivot view showing exactly where your money comes from.

Ecommerce analyticsRevenue attributionChannel performanceDevice analysis

The Challenge

You know your total revenue number. But when someone asks which channel drives the most revenue on mobile vs desktop, you end up building custom GA4 explorations, adding segments, and exporting to spreadsheets. The pivot tables in GA4 are clunky. Getting a clean channel-by-device revenue view takes 30 minutes of clicking, and you have to redo it every time.

What This Prompt Does

Pull Ecommerce Metrics

Gets revenue, transactions, conversion rate, and AOV by channel

Cross-Tabulate Revenue

Runs a pivot report showing revenue by channel and device category

Rank Channels

Orders channels by revenue contribution and highlights conversion rates

Find Opportunities

Flags high-traffic channels with low conversion for optimization

The Prompt

The Prompt

Task

Use @Google Analytics/Run ReportName it "Google Analytics/Run Report" and call it with @Google Analytics/Run Report to pull ecommerce performance metrics by channel, then use @Google Analytics/Run Pivot ReportName it "Google Analytics/Run Pivot Report" and call it with @Google Analytics/Run Pivot Report to cross-tabulate revenue by device category and traffic source. Identify which channel + device combos drive the most revenue.

Input

The user will provide:

  1. Their GA4 property ID
  2. Date range (default: last 30 days)
  3. Any specific channels or products to focus on (optional)

Example: "Show me ecommerce performance by channel for property 123456789, last 30 days"

Context

Ecommerce Metrics to Pull

Run a report with these metrics:

  • ecommercePurchases (transactions)
  • purchaseRevenue (total revenue)
  • ecommercePurchases / sessions (conversion rate — calculate from raw values)
  • averagePurchaseRevenue (average order value)
  • sessions, totalUsers

Break down by:

  • sessionDefaultChannelGroup (for channel performance)
  • sessionSourceMedium (for source-level detail)

Pivot Report

Run a pivot report cross-tabulating:

  • Rows: sessionDefaultChannelGroup
  • Columns: deviceCategory
  • Values: purchaseRevenue, ecommercePurchases

This reveals which channel + device combos produce the most revenue.

Analysis Strategy

  1. Run the main ecommerce report by channel grouping
  2. Run a second report by source/medium for the top-performing channels
  3. Run the pivot report for revenue by channel x device
  4. Rank channels by revenue contribution
  5. Calculate conversion rate for each channel
  6. Identify the top 3 channel + device combos by revenue
  7. Flag channels with high traffic but low conversion (optimization opportunities)

Guidelines

  • If ecommerce metrics return empty, the property may not have ecommerce tracking configured — flag this to the user
  • Calculate conversion rate manually: ecommercePurchases / sessions
  • Compare AOV across channels to find where high-value customers come from

Output

Ecommerce Performance by Channel:

  • Revenue, transactions, conversion rate, and AOV for each channel
  • Ranked by revenue contribution

Top Source/Medium Detail:

  • Breakdown within the top 3 channels by specific source/medium

Revenue by Channel x Device (Pivot):

  • Cross-tabulated view showing revenue for each channel on desktop, mobile, and tablet
  • Top 3 highest-revenue combos highlighted

Optimization Opportunities:

  • Channels with high traffic but low conversion rate
  • Device categories underperforming within top channels
  • Recommendations for where to focus budget or optimization effort

Example Usage

Try asking:

  • "Show me ecommerce performance by channel for the last 30 days on property 123456789"
  • "Which channel + device combo drives the most revenue? Run a pivot report"
  • "Compare organic vs paid revenue by device — where should we spend more?"