Skip to content

Latest commit

 

History

History
54 lines (39 loc) · 2.1 KB

File metadata and controls

54 lines (39 loc) · 2.1 KB

Examples

This folder contains a realistic, hand-authored HAR and a generated report so you can see the tool's output without capturing your own trace first.

Files

  • example.har — a synthetic HAR for a fictional store (shop.acme-widgets.example). It loads first-party HTML/CSS/JS and images, plus a realistic third-party stack: Google Tag Manager, Google Analytics (script + collect beacon), a Google DoubleClick ad tag, Google Fonts (CSS + two WOFF2 files), a YouTube embed (iframe + player script + thumbnail), Hotjar, an Intercom chat widget, and Stripe.js.
  • example-report.md — the Markdown report produced by running the tool against example.har (committed so you can preview it).

Try it

From the repository root:

# Colored terminal table + summary + top recommendations
node bin/third-party-impact-mapper examples/example.har

# Only the 5 worst offenders
node bin/third-party-impact-mapper examples/example.har --top 5

# Treat a specific domain as first party (eTLD+1 grouping applies)
node bin/third-party-impact-mapper examples/example.har --first-party acme-widgets.example

# Machine-readable JSON, sorted by transfer bytes
node bin/third-party-impact-mapper examples/example.har --json --sort bytes

# Markdown audit report (what example-report.md was generated from)
node bin/third-party-impact-mapper examples/example.har --md > report.md

# Standalone HTML report with an inline SVG bar chart
node bin/third-party-impact-mapper examples/example.har --html > report.html

What to expect

For this HAR the tool reports roughly:

  • 10 third-party origins, 13 of 18 requests, and ~68% of page weight coming from third parties.
  • Worst offender: the YouTube player (ytimg.com) — large script plus thumbnail, recommended for a facade.
  • Remove recommendations for the DoubleClick ad tag and analytics scripts.
  • Defer for the early Tag Manager and Stripe.js scripts.
  • Self-host advice for Google Fonts (extra connection).

Numbers will differ slightly across Node versions only in formatting, not in ranking.