# Metrics Methodology

**Last Updated:** 2025-12-02  
**Purpose:** Document data sources, calculation methods, and update procedures for strategy metrics

---

## Data Sources

### 1. Google Search Console (GSC)

**What We Extract:**

- Clicks (daily, aggregated to monthly)
- Impressions (daily, aggregated to monthly)
- CTR (Click-Through Rate)
- Average Position
- Top performing pages and queries

**Update Frequency:** Monthly (manual export or API)
**File Location:** `/Users/hadyelhady/Desktop/Ordio/Strategy/Screenshots/https___www.ordio.com_-Performance-on-Search-YYYY-MM-DD/`

**Key Files:**

- `Dates.csv` - Daily performance data
- `Pages.csv` - Page-level performance
- `Queries.csv` - Query-level performance

### 2. Google Analytics 4 (GA4)

**What We Extract:**

- Organic search sessions
- Engagement rate
- Average engagement time
- Events per session
- Key events (conversions)

**Update Frequency:** Monthly (manual export or API)
**File Location:** `/Users/hadyelhady/Desktop/Ordio/Strategy/Screenshots/`

**Key Files:**

- `Traffic_acquisition_Session_primary_channel_group_(Default_Channel_Group).csv`
- `Pages_and_screens_Page_path_and_screen_class.csv`

### 3. HubSpot

**What We Extract:**

- Organic search leads by month
- MQLs (Marketing Qualified Leads) by month
- Customers by month
- Demo booked percentage
- Unqualified percentage

**Update Frequency:** Monthly (manual export)
**File Location:** `/Users/hadyelhady/Desktop/Ordio/Strategy/Screenshots/`

**Key Files:**

- `Marketing _ KPI Report - Channels (m).csv`

**Attribution:** All leads attributed to "organic search" channel

### 4. SISTRIX

**What We Extract:**

- Organic traffic trends (daily)
- Organic keywords trends
- Traffic cost estimates

**Update Frequency:** Monthly (manual export or API)
**File Location:** `/Users/hadyelhady/Desktop/Ordio/Strategy/Screenshots/`

**Key Files:**

- `overview-trend-YYYY-MM-DDTHH_MM_SSZ.csv`

---

## Calculation Methods

### Monthly Sessions Estimation

**Method:** Estimate monthly sessions from GSC clicks using GA4 total ratio

**Formula:**

```
Monthly Sessions = Monthly Clicks × (Total GA4 Sessions / Total GSC Clicks)
```

**Example:**

- Total GA4 Sessions (Jan-Nov): 125,585
- Total GSC Clicks (Jan-Nov): 121,123
- Ratio: 125,585 / 121,123 = 1.037
- January Sessions: 8,227 clicks × 1.037 = 8,530 sessions

**Note:** This is an estimation. GSC clicks and GA4 sessions are different metrics (clicks = link clicks, sessions = user visits), but the ratio provides a reasonable approximation.

### Conversion Rate Calculations

**Traffic → Lead:**

```
Conversion Rate = (Total Leads / Total Sessions) × 100
```

**Lead → MQL:**

```
Conversion Rate = (Total MQLs / Total Leads) × 100
```

**MQL → Customer:**

```
Conversion Rate = (Total Customers / Total MQLs) × 100
```

**Traffic → Customer (End-to-End):**

```
Conversion Rate = (Total Customers / Total Sessions) × 100
```

### Growth Rate Calculations

**Month-over-Month (MoM) Growth:**

```
MoM Growth = ((Current Month - Previous Month) / Previous Month) × 100
```

**Average MoM Growth:**

```
Average MoM Growth = Sum of all MoM Growth Rates / Number of Months
```

---

## Data Quality Standards

### Validation Checks

1. **GSC vs GA4 Alignment:**

   - GSC clicks should be reasonably aligned with GA4 sessions
   - Expected ratio: 0.8 - 1.5 (clicks and sessions are different metrics)
   - If ratio is outside this range, investigate data quality

2. **Conversion Rate Reasonableness:**

   - Traffic → Lead: Typically 0.1% - 1.0% for organic search
   - Lead → MQL: Typically 30% - 80% (varies by lead quality)
   - MQL → Customer: Typically 5% - 25% (varies by sales process)
   - If rates are outside these ranges, verify data accuracy

3. **Monthly Completeness:**
   - All months should have data for all metrics
   - Missing months should be flagged and investigated

### Data Quality Issues

**Known Issues:**

- HubSpot CSV structure is complex and requires manual column mapping
- Monthly sessions are estimated (not direct from GA4 monthly breakdown)
- Some months may have incomplete data (e.g., partial months)

**Mitigation:**

- Use manual data entry for critical HubSpot metrics (see `scripts/manual_hubspot_data.py`)
- Cross-reference multiple data sources for validation
- Document any data quality issues in analysis

---

## Update Procedures

### Monthly Update Process

1. **Extract Data (First Week of Month):**

   - Export GSC data for previous month
   - Export GA4 data for previous month
   - Export HubSpot data for previous month
   - Export SISTRIX data for previous month

2. **Run Analysis Scripts:**

   ```bash
   cd docs/strategy-2026/scripts
   python3 extract_metrics.py
   python3 calculate_conversions.py
   python3 validate_data.py
   ```

3. **Review Results:**

   - Check validation report for data quality issues
   - Review conversion rates for reasonableness
   - Identify any anomalies or trends

4. **Update Documents:**

   - Update `ACTUAL_METRICS_2025.md` with new monthly data
   - Update strategy documents if significant changes
   - Update `CHANGELOG.md` with changes

5. **Archive Data:**
   - Save raw CSV files with date stamps
   - Archive JSON outputs with timestamps

### Quarterly Review Process

1. **Comprehensive Analysis:**

   - Review all metrics for the quarter
   - Calculate quarterly averages and trends
   - Compare to targets and forecasts

2. **Forecast Updates:**

   - Update 2026 forecasts based on actual performance
   - Adjust targets if needed
   - Identify opportunities and risks

3. **Documentation Updates:**
   - Update all strategy documents
   - Update methodology if needed
   - Document lessons learned

---

## File Structure

```
docs/strategy-2026/
├── 03-ANALYSIS/
│   ├── ACTUAL_METRICS_2025.md (this file)
│   ├── METRICS_METHODOLOGY.md (this file)
│   └── ...
├── 06-DATA-ANALYSIS/
│   ├── extracted_metrics.json
│   ├── conversion_analysis.json
│   ├── validation_report.json
│   └── hubspot_manual_data.json
└── scripts/
    ├── extract_metrics.py
    ├── calculate_conversions.py
    ├── validate_data.py
    └── manual_hubspot_data.py
```

---

## Future Improvements

1. **Automated Data Extraction:**

   - Set up API connections for GSC, GA4, HubSpot
   - Automate monthly data extraction
   - Reduce manual work

2. **Real-Time Dashboards:**

   - Build dashboard for real-time metrics
   - Integrate with content engine
   - Enable dynamic updates

3. **Advanced Analytics:**
   - Predictive forecasting models
   - Anomaly detection
   - Automated insights generation

---

**Note:** This methodology is based on data extracted on 2025-12-02. For the most up-to-date procedures, check the latest version of this document.
