# 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.

Source: https://cotera.co/solutions/marketing/ga4-ecommerce-performance-tracker

---

- **Team:** Marketing
- **Tools:** Google Analytics
- **Difficulty:** medium
- **Setup time:** 10 min
- **Time saved:** 1-2 hrs/week

## How it works
1. **Pull Ecommerce Metrics** — Gets revenue, transactions, conversion rate, and AOV by channel
2. **Cross-Tabulate Revenue** — Runs a pivot report showing revenue by channel and device category
3. **Rank Channels** — Orders channels by revenue contribution and highlights conversion rates
4. **Find Opportunities** — Flags high-traffic channels with low conversion for optimization

## Example requests
- 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?

## Prompt

```markdown
## Task

Use @Google Analytics/Run Report to pull ecommerce performance metrics by channel, then use @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
```

## Related reading
- [We Automated Client GA4 Reports. They Think We Hired Someone.](https://cotera.co/articles/automated-ga4-client-reporting.md)
- [Shopify GA4 Reports Took All Friday. Now They Take Five Minutes.](https://cotera.co/articles/ga4-ecommerce-reporting-automation.md)

