# CSV Export

## Export types

### Campaign overview

All campaigns with basic stats (impressions, clicks, unique clicks, CTR, spend) – one row per campaign.

### Hourly report

Hourly impressions and clicks for a specific campaign. Ideal for intraday analysis.

### Targeting report

Impressions split by device and country. Segmentation for audience analysis.

## Where to find the export buttons

### Step 1: Campaign overview

Panel → Profile dropdown → **CSV Export** or Dashboard filter row → CSV Export button
(`/panel/campaigns/export/`)

### Step 2: Hourly report

Campaign detail → "Export hourly CSV" button
(`/panel/campaigns/{id}/export/stats/`)

### Step 3: Targeting report

Campaign detail → "Export targeting CSV" button
(`/panel/campaigns/{id}/export/targeting/`)

## Columns: campaign overview

| Column | Type | Description |
| --- | --- | --- |
| ID | Integer | Campaign primary key |
| Name | Text | Campaign name |
| Advertiser | Text | Name of the associated advertiser |
| Type | Text | budget / impression / fixed |
| Status | Text | Active / Inactive / Expired |
| Start Date | Date | ISO-8601 date |
| End Date | Date | ISO-8601 date or empty |
| Impressions | Integer | Total impressions (all ads) |
| Clicks | Integer | Total clicks (all clicks) |
| Unique Clicks | Integer | Deduplicated clicks (requires consent cookie) |
| CTR (%) | Float | Clicks / Impressions × 100, 2 decimal places |
| Spend (€) | Float | Calculated cost (budget type only) |

## Columns: hourly report

| Column | Type | Description |
| --- | --- | --- |
| Hour | DateTime | YYYY-MM-DD HH:00 (UTC) |
| Ad ID | Integer | Ad primary key |
| Ad Name | Text | Ad name |
| Impressions | Integer | Impressions in this hour |
| Clicks | Integer | Total clicks in this hour |
| Unique Clicks | Integer | Unique clicks in this hour |

## Columns: targeting report

| Column | Type | Description |
| --- | --- | --- |
| Hour | DateTime | YYYY-MM-DD HH:00 (UTC) |
| Device | Text | desktop / mobile / tablet / bot |
| Country | Text | ISO 3166-1 Alpha-2 (e.g. DE) or XX |
| Impressions | Integer | Impressions for this combination |

## Character encoding

> UTF-8 with BOM (Byte Order Mark)
>
> All CSV exports are delivered with UTF-8 BOM (`utf-8-sig`).
> This ensures Microsoft Excel automatically opens the file with correct encoding – special characters like ä, ö, ü are displayed correctly.
> In other tools (LibreOffice, Python, etc.) the BOM can be ignored.
