# jaimekemp/campaigner-utm-auditor architecture

> Architecture diagram of the GitHub repository jaimekemp/campaigner-utm-auditor, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jaimekemp/campaigner-utm-auditor
- Repository: https://github.com/jaimekemp/campaigner-utm-auditor

## Overview

Campaigner UTM Auditor is a Chrome extension that checks exported campaign HTML in the browser. Its main workflow is to inspect links in the active page and its frames, audit tracking parameters and cross-link consistency, then display a report in the popup. The graph separates scanning, audit logic, and presentation, although the sampled source excerpt is incomplete; it does not establish separate runtime modules beyond popup.js.

Main entry points: [`popup.js`](https://github.com/jaimekemp/campaigner-utm-auditor/blob/main/popup.js) (Popup controller), [`popup.html`](https://github.com/jaimekemp/campaigner-utm-auditor/blob/main/popup.html) (Popup shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_scan["Link scanning"]
  node_popup_controller["Popup controller<br/>[popup.js]"]
  node_frame_scraper["Frame link scraper<br/>[popup.js]"]
  node_link_aggregation["Link aggregation<br/>[popup.js]"]
end

subgraph group_audit["Tracking audit"]
  node_tracking_audit["Tracking audit<br/>[popup.js]"]
end

subgraph group_ui["Popup report"]
  node_popup_ui["Popup shell<br/>[popup.html]"]
  node_report_renderer["Report renderer<br/>[popup.js]"]
end

node_user(("Extension user"))
node_campaign_html["Campaign preview HTML"]

node_user -->|"opens"| node_popup_ui
node_user -->|"opens"| node_campaign_html
node_popup_controller -->|"injects"| node_frame_scraper
node_campaign_html -->|"scans links"| node_frame_scraper
node_frame_scraper -->|"returns links"| node_link_aggregation
node_popup_controller -->|"aggregates results"| node_link_aggregation
node_popup_controller -->|"audits links"| node_tracking_audit
node_popup_controller -->|"renders report"| node_report_renderer
node_report_renderer -->|"displays results"| node_popup_ui

click node_popup_ui "https://github.com/jaimekemp/campaigner-utm-auditor/blob/main/popup.html"
click node_popup_controller "https://github.com/jaimekemp/campaigner-utm-auditor/blob/main/popup.js"
click node_frame_scraper "https://github.com/jaimekemp/campaigner-utm-auditor/blob/main/popup.js"
click node_link_aggregation "https://github.com/jaimekemp/campaigner-utm-auditor/blob/main/popup.js"
click node_tracking_audit "https://github.com/jaimekemp/campaigner-utm-auditor/blob/main/popup.js"
click node_report_renderer "https://github.com/jaimekemp/campaigner-utm-auditor/blob/main/popup.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_popup_controller,node_frame_scraper,node_link_aggregation,node_user,node_campaign_html toneBlue
class node_tracking_audit toneAmber
class node_popup_ui,node_report_renderer toneMint
```

## Components

### Link scanning

- [Popup controller](https://github.com/jaimekemp/campaigner-utm-auditor/blob/main/popup.js): `popup.js`
- [Frame link scraper](https://github.com/jaimekemp/campaigner-utm-auditor/blob/main/popup.js): `popup.js`
- [Link aggregation](https://github.com/jaimekemp/campaigner-utm-auditor/blob/main/popup.js): `popup.js`

### Tracking audit

- [Tracking audit](https://github.com/jaimekemp/campaigner-utm-auditor/blob/main/popup.js): `popup.js`

### Popup report

- [Popup shell](https://github.com/jaimekemp/campaigner-utm-auditor/blob/main/popup.html): `popup.html`
- [Report renderer](https://github.com/jaimekemp/campaigner-utm-auditor/blob/main/popup.js): `popup.js`

### Other components

- **Extension user**
- **Campaign preview HTML**

## Connections

- Extension user → Popup shell: opens (evidence: `README.md`)
- Extension user → Campaign preview HTML: opens (evidence: `README.md`)
- Popup controller → Frame link scraper: injects (evidence: `popup.js`)
- Campaign preview HTML → Frame link scraper: scans links (evidence: `popup.js`)
- Frame link scraper → Link aggregation: returns links (evidence: `popup.js`)
- Popup controller → Link aggregation: aggregates results (evidence: `popup.js`)
- Popup controller → Tracking audit: audits links (evidence: `popup.js`)
- Popup controller → Report renderer: renders report (evidence: `popup.js`)
- Report renderer → Popup shell: displays results (evidence: `popup.js`)
