Skip to content

Remove Google Analytics driver and related special case stuff #42792

Closed
@camsaul

Description

@camsaul

We made the decision to deprecate it about a year ago because of #12905 (comment), now because it's blocking Metrics v2 we are finally going to drop it entirely. (We announced this in 47.) This needs to be done before we ship 50. See https://metaboat.slack.com/archives/C04DN5VRQM6/p1715888743074829 for more info.

We need to delete all the code related to GA in the repo including the CI job and any mentions of :googleanalytics in the codebase. We have a lot of special edge case stuff in the codebase for GA's hardcoded :metrics and :segments (which use string IDs instead of integers), we should remove that stuff from the MBQL schemas and all of the special case code. Examples of stuff to remove:

  • modules/drivers/googleanalytics
  • ;; Metrics are just 'macros' (placeholders for other aggregations with optional filter and breakout clauses) that get
    ;; expanded to other aggregations/etc. in the expand-macros middleware
    ;;
    ;; METRICS WITH STRING IDS, e.g. `[:metric "ga:sessions"]`, are Google Analytics metrics, not Metabase metrics! They
    ;; pass straight thru to the GA query processor.
    (def ^:private MetricID
    [:ref ::lib.schema.id/legacy-metric])
    (defclause metric
    metric-id [:or MetricID ::lib.schema.common/non-blank-string])
  • "modules/drivers/googleanalytics/test"
  • (mbql.u/ga-metric-or-segment? metric) (-> args first str (subs 3) str/capitalize)
  • GitHub Actions related to Google Analytics

Please be thorough and remove all the dead GA-related code!!! Please 🙇‍♂️

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions