Boost My AgentGet Boost OS
GA4

GA4 starter module

Analytics library

Centralizes event names, safe properties, attribution values, and server delivery helpers.

Files
5
Lines
492
Languages
TypeScript

Included files

This page lists paths and purposes, not source contents.

  • src/lib/app-adapter.ts

    Connects GA4 event senders to your app's attribution, deduplication, and purchase records.

    TypeScript

    96 lines

  • src/lib/client-id.ts

    Extracts GA4 client identifiers and maintains a first-party browser fallback.

    TypeScript

    92 lines

  • src/lib/env.ts

    Reads GA4 and purchase settings from the environment and rejects invalid values.

    TypeScript

    81 lines

  • src/lib/mp-client.ts

    Sends trusted server events to GA4 through the Measurement Protocol.

    TypeScript

    155 lines

  • src/lib/types.ts

    Defines the shared event, attribution, catalog, and app-owned storage shapes.

    TypeScript

    68 lines