Skip to content
This repository was archived by the owner on Aug 20, 2025. It is now read-only.
This repository was archived by the owner on Aug 20, 2025. It is now read-only.

Add support for Google Analytics 4 #160

@nickFalcone

Description

@nickFalcone

Support for GA4 should be added to prevent a lapse in data collection. Universal Analytics (UA) properties will stop processing data on July 1, 2023.

cached.js contains a copy of analytics.js. I propose we add a new file, gtag.js with the contents of https://www.googletagmanager.com/gtag/js?id=my-g-id. We would need to retrieve the user's ID from a new field in metadata.json. The rationale for a second file is to separate legacy analytics.js and selectively load gtag.js if the user has a GA4 ID.

Other areas to update:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions