# agustin87/utm_cross_domain_forwarder architecture

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

- Interactive diagram: https://gitdiagram.com/agustin87/utm_cross_domain_forwarder
- Repository: https://github.com/agustin87/utm_cross_domain_forwarder

## Overview

A small, dependency-free browser script decorates links from a third-party landing page with campaign parameters. Its single workflow reads the current URL, selects matching destination links, and rewrites their hrefs; the README documents the one-page, no-storage scope. The only source file is excerpted, so the graph reflects that implementation and documented usage rather than uninspected modules.

Main entry points: [`utm-forwarder.js`](https://github.com/agustin87/utm_cross_domain_forwarder/blob/main/utm-forwarder.js) (UTM reader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Browser runtime"]
  node_utm_read["UTM reader<br/>[utm-forwarder.js]"]
  node_link_scan["Link scanner<br/>[utm-forwarder.js]"]
  node_href_rewrite["Href rewriter<br/>[utm-forwarder.js]"]
end

node_visitor(("Landing visitor"))
node_landing["Landing page"]
node_destination["Target website"]

node_visitor -->|"opens"| node_landing
node_landing -->|"runs script"| node_utm_read
node_utm_read -->|"forwards UTMs"| node_link_scan
node_link_scan -->|"matches links"| node_href_rewrite
node_href_rewrite -->|"decorates links"| node_destination

click node_utm_read "https://github.com/agustin87/utm_cross_domain_forwarder/blob/main/utm-forwarder.js"
click node_link_scan "https://github.com/agustin87/utm_cross_domain_forwarder/blob/main/utm-forwarder.js"
click node_href_rewrite "https://github.com/agustin87/utm_cross_domain_forwarder/blob/main/utm-forwarder.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_utm_read,node_link_scan,node_href_rewrite toneBlue
class node_visitor,node_landing,node_destination toneIndigo
```

## Components

### Browser runtime

- [UTM reader](https://github.com/agustin87/utm_cross_domain_forwarder/blob/main/utm-forwarder.js): `utm-forwarder.js`
- [Link scanner](https://github.com/agustin87/utm_cross_domain_forwarder/blob/main/utm-forwarder.js): `utm-forwarder.js`
- [Href rewriter](https://github.com/agustin87/utm_cross_domain_forwarder/blob/main/utm-forwarder.js): `utm-forwarder.js`

### Other components

- **Landing visitor**
- **Landing page**
- **Target website**

## Connections

- Landing visitor → Landing page: opens (evidence: `README.md`)
- Landing page → UTM reader: runs script (evidence: `utm-forwarder.js`)
- UTM reader → Link scanner: forwards UTMs (evidence: `utm-forwarder.js`)
- Link scanner → Href rewriter: matches links (evidence: `utm-forwarder.js`)
- Href rewriter → Target website: decorates links (evidence: `utm-forwarder.js`)
