Git-native · Consent-first · Schema-validated

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.

Live — events fired on this page
0

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.

Reviewed in PRs

Consent-First

Events queue while consent is pending, then flush or drop on resolution. No lost data. No compliance violations. Works with any CMP.

GDPR & CCPA compliant

Schema Validated

Every event has a Zod contract. Invalid events are caught at dev time, not discovered in dashboards weeks later.

Validated at runtime

Your entire analytics config in one file

No dashboards. No clicking. Just TypeScript.

junction-config.ts
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",
};
Reviewed in PRs·Tested in CI·Deployed with your app

Houston, we have cookies!

These cookies fuel our rockets, not your waistline. We use them to understand how you navigate the cosmos and improve your mission experience.