# GA4 + Google Ads Cross-Platform Analytics

> Connect the dots between ad spend and on-site behavior. See which campaigns actually drive engaged traffic, not just clicks.

Source: https://cotera.co/solutions/ops/ga4-cross-platform-analytics

---

- **Team:** Operations
- **Tools:** Google Analytics, Google Ads, Google Sheets
- **Difficulty:** advanced
- **Setup time:** 10 min
- **Time saved:** 3-4 hrs/analysis

## How it works
1. **Pull GA4 Data** — Gets on-site behavior metrics filtered to paid campaigns
2. **Pull Ads Data** — Gets campaign spend, clicks, and conversion metrics from Google Ads
3. **Correlate Campaigns** — Matches campaigns across platforms to calculate true ROI
4. **Track Over Time** — Logs combined metrics to Google Sheets for ongoing analysis

## Example requests
- Compare our Google Ads spend to GA4 engagement for the last 30 days
- Which ad campaigns are driving traffic that actually converts on our site?
- Pull GA4 and Google Ads data for our Q1 campaigns and find the wasted spend

## Prompt

```markdown
## Task

Pull website performance data from @Google Analytics/Run Report and correlate it with advertising data from @Google Ads/List Campaigns and @Google Ads/Search. Combine the datasets to show how ad spend translates into actual on-site behavior. Log the results to a Google Sheet using @Google Sheets/Append Row.

## Input

The user will provide their GA4 property ID and Google Ads customer ID. Optionally a date range.

**Example:** "Property: 123456789, Ads customer: 456-789-0123, last 30 days"

## Context

### GA4 Data to Pull

Run a report with:
- Metrics: totalUsers, sessions, screenPageViews, bounceRate, averageSessionDuration, conversions
- Dimensions: sessionSource, sessionMedium, sessionCampaignName
- Filter to google/cpc traffic (paid search)
- Date range: last 30 days
- Order by sessions descending

### Google Ads Data to Pull

1. List campaigns to get campaign names and statuses
2. Run a GAQL search query for campaign-level metrics:
   - Impressions, clicks, cost, conversions, cost per conversion
   - For the same date range

### Correlation Strategy

1. Pull GA4 data for google/cpc traffic broken down by campaign name
2. Pull Google Ads campaign performance metrics
3. Match campaigns by name to combine ad spend with on-site behavior
4. Calculate effective metrics: cost per engaged session, cost per low-bounce visit
5. Identify campaigns where users land but immediately bounce (wasted spend)
6. Find campaigns that drive deep engagement but have low budgets (scaling opportunities)
7. Log the combined data to Google Sheets for tracking over time

## Output

**Cross-Platform Campaign Analysis:**

**Campaign Performance Overview:**
- Each campaign with: Ad spend, clicks, GA4 sessions, bounce rate, avg session duration, conversions

**Spend Efficiency:**
- Cost per engaged session (sessions with bounce rate below 50%)
- Campaigns with highest wasted spend (high cost, high bounce rate)
- Campaigns with best ROI (low cost per conversion, strong engagement)

**Optimization Recommendations:**
- Campaigns to scale up (good engagement, room to grow)
- Campaigns to fix (high spend, poor on-site metrics)
- Campaigns to pause (low performance across both platforms)

**Data Logged:**
- Summary row added to Google Sheets with date, total spend, total sessions, avg bounce rate, total conversions
```

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

