# GA4 Traffic Source Analysis

> Figure out exactly where your traffic is coming from, which channels actually convert, and where your marketing budget should go next.

Source: https://cotera.co/solutions/marketing/ga4-traffic-source-analysis

---

- **Team:** Marketing
- **Tools:** Google Analytics, Google Sheets
- **Difficulty:** medium
- **Setup time:** 5 min
- **Time saved:** 2-3 hrs/analysis

## How it works
1. **Find Properties** — Lists your GA4 properties so you can pick the right one
2. **Pull Source Data** — Runs multi-dimensional reports on traffic sources, channels, and landing pages
3. **Analyze Quality** — Compares bounce rate, session duration, and conversions across channels
4. **Log to Sheets** — Saves summary data to Google Sheets for month-over-month tracking

## Example requests
- Which traffic sources are driving the best engagement for our site this month?
- Analyze traffic sources for property 123456789 over the last 30 days and log to our tracking sheet
- Compare our organic vs paid traffic quality for the last quarter

## Prompt

```markdown
## Task

Use @Google Analytics/List Properties to find available GA4 properties, then use @Google Analytics/Run Report to pull traffic source data and analyze which channels are driving the most valuable traffic. Log the results to a Google Sheet using @Google Sheets/Append Row for tracking over time.

## Input

The user will provide a GA4 property ID (or ask you to list properties first) and a date range.

**Example:** "Analyze traffic sources for property 123456789 for the last 30 days"

## Context

### Reports to Run

**Report 1 - Source/Medium Overview:**
- Metrics: totalUsers, sessions, screenPageViews, bounceRate, averageSessionDuration, conversions
- Dimensions: sessionSource, sessionMedium
- Order by sessions descending
- Limit: 20

**Report 2 - Channel over Time:**
- Metrics: totalUsers, sessions
- Dimensions: date, sessionDefaultChannelGroup
- Date range: last 30 days

**Report 3 - Landing Pages by Source:**
- Metrics: sessions, bounceRate, averageSessionDuration
- Dimensions: landingPage, sessionSource
- Order by sessions descending
- Limit: 15

### Analysis Strategy

1. List properties if the user doesn't know their property ID
2. Run all three reports
3. Identify top-performing and underperforming channels
4. Look for sources with high traffic but high bounce rate (wasted spend)
5. Find sources with low traffic but strong engagement (growth opportunities)
6. Log summary data to Google Sheets for month-over-month tracking

## Output

**Traffic Source Summary:**

**Top Sources by Traffic:**
- Ranked list of top 10 sources with sessions, users, and bounce rate

**Channel Quality Analysis:**
- Which sources drive engaged users (low bounce rate, high session duration)
- Which sources have high bounce rates (potential quality issues)

**Growth Opportunities:**
- Sources trending up over the period
- Sources with strong engagement but low volume (worth investing in)

**Recommendations:**
- 3-4 specific recommendations for where to invest marketing budget based on the data
```

## Related reading
- [Google Analytics Meets AI: Turning Raw Data Into Action](https://cotera.co/articles/google-analytics-ai-data-to-action.md)
- [The Marketing Team's Guide to Google Analytics Automation](https://cotera.co/articles/marketing-guide-google-analytics-automation.md)

