Your tag manager should be a TypeScript file,
not a UI you hope nobody breaks
Junction is a git-native event collection system. Config as code. Consent-first. Schema-validated. Everything lives in your repo, reviewed in PRs, tested in CI.
Press Ctrl+Shift+J to see the debug panel
Why Junction?
The things your current tag manager can't do
Config as Code
Your tracking config lives in your repo. Review it in PRs. Test it in CI. Roll it back with git revert. No more 4am GTM incidents.
Consent-First
Events queue while consent is pending, then flush or drop on resolution. No lost data. No compliance violations. Works with any CMP.
Schema Validated
Every event has a Zod contract. Invalid events are caught at dev time, not discovered in dashboards weeks later.
Your entire analytics config in one file
No dashboards. No clicking. Just TypeScript.
import type { CollectorConfig } from "@junctionjs/core";
import { ga4 } from "@junctionjs/destination-ga4";
import { amplitude } from "@junctionjs/destination-amplitude";
import { meta } from "@junctionjs/destination-meta";
import { contracts } from "./contracts";
export const config: CollectorConfig = {
name: "orbit-supply",
environment: "production",
consent: {
defaultState: {}, // start with nothing granted
queueTimeout: 10_000, // queue events for 10s
respectDNT: true, // honor Do Not Track
respectGPC: true, // honor Global Privacy Control
},
destinations: [
{
destination: ga4,
config: { measurementId: "G-XXXXXXXXXX" },
consent: ["analytics"], // only fires when analytics=true
},
{
destination: meta,
config: { pixelId: "123456789" },
consent: ["marketing"], // only fires when marketing=true
},
],
contracts, // your Zod schemas for runtime validation
debug: process.env.NODE_ENV === "development",
};See it in action
Browse the demo store to generate real events, or explore the showcase demos.
Consent Demo
See how events queue while consent is pending, then flush or drop. Per-destination gating, DNT/GPC support.
Validation Demo
Fire valid and invalid events and watch Zod validation happen in real time. Break it intentionally.
Config Demo
See how one TypeScript file replaces a GTM workspace. Adding a destination is a PR, not a 6-step wizard.