# Blog Performance Analysis

**Last Updated:** 2026-02-08

Analysis of performance metrics (traffic, engagement) and identification of top/underperforming posts using collected GA4 and GSC data.

## Overview

Blog performance data is collected via scripts and stored per post. This document describes the data sources, where data lives, and the analysis framework for using it.

## Data Availability

### Current Status

**Analytics data:** Collected and stored in the repo.

- **Google Analytics 4 (GA4):** Collected by `v2/scripts/blog/collect-post-performance-ga4.php`. Data is stored per post in `docs/content/blog/posts/{category}/{slug}/data/performance-ga4.json`.
- **Google Search Console (GSC):** Collected by `v2/scripts/blog/collect-post-performance-gsc.php`. Data is stored per post in `docs/content/blog/posts/{category}/{slug}/data/performance-gsc.json`.
- **Aggregate snapshot:** Run `php v2/scripts/blog/generate-traffic-seo-snapshot.php` to generate a summary report (top posts by clicks, impressions, page views). Output: `docs/content/blog/TRAFFIC_SEO_SNAPSHOT_YYYY-MM-DD.md`.

### Data Structure (per post)

**performance-ga4.json** includes:

- `metrics.last_90_days`: page_views, sessions, bounce_rate, avg_engagement_time
- `metrics.last_year`: same metrics
- `last_updated`: ISO timestamp

**performance-gsc.json** includes:

- `metrics.last_90_days`: clicks, impressions, ctr, avg_position
- `metrics.last_year`: same
- `metrics.top_queries`: query-level performance
- `metadata.last_updated` or `last_updated`: ISO timestamp

### Collection and Refresh

- **Weekly:** `php v2/scripts/blog/weekly-priority-refresh.php` updates GA4 and GSC data, recalculates priority scores, and regenerates the priority dashboard.
- **Manual per post:** `collect-post-performance-ga4.php --post=slug --category=category` and `collect-post-performance-gsc.php --post=slug --category=category`.

See [SEO_DATA_MANAGEMENT.md](SEO_DATA_MANAGEMENT.md) for freshness thresholds and [MONITORING_RUNBOOK.md](MONITORING_RUNBOOK.md) for schedules.

## Analysis Framework

### Metrics to Analyze

**Traffic metrics (from GA4):**

- Page views, sessions, bounce rate, average engagement time

**SEO metrics (from GSC):**

- Clicks, impressions, CTR, average position, top queries

**Derived:**

- Top posts by clicks, impressions, or page views (use TRAFFIC_SEO_SNAPSHOT or aggregate from JSON)

### Top Performing Posts

**Criteria:** High page views, high GSC clicks, low bounce rate, strong engagement.

**How to identify:** Use `TRAFFIC_SEO_SNAPSHOT_YYYY-MM-DD.md` (top N by clicks/impressions/page views) or scan `prioritization-data.json` and performance JSON files.

### Underperforming Posts

**Criteria:** Low traffic, high bounce rate, low impressions or many impressions with few clicks.

**How to identify:** Same data sources; sort by ascending clicks/page_views or use priority dashboard “quick wins” and “new opportunities” segments.

## Recommendations

1. **Keep data fresh:** Run weekly-priority-refresh (or at least GA4/GSC collection) weekly so reports reflect current performance.
2. **Review snapshot monthly:** Run `generate-traffic-seo-snapshot.php` and review top/trending posts.
3. **Use priority dashboard:** `PRIORITY_DASHBOARD.md` (from `generate-priority-dashboard.php`) surfaces quick wins and traffic opportunities.

## Related Documentation

- [SEO_DATA_MANAGEMENT.md](SEO_DATA_MANAGEMENT.md) – Data freshness, SISTRIX/GSC/GA4 usage
- [TRAFFIC_SEO_SNAPSHOT_2026-02-08.md](TRAFFIC_SEO_SNAPSHOT_2026-02-08.md) – Latest traffic/SEO summary (regenerate for current date)
- [MONITORING_RUNBOOK.md](MONITORING_RUNBOOK.md) – Automated monitoring and schedules
- [DATA_FRESHNESS_REPORT.md](DATA_FRESHNESS_REPORT.md) – Freshness status of post data files
