Add support for Google's numeric filter

Created on 15 September 2025, about 1 month ago
Updated 16 September 2025, about 1 month ago

Problem/Motivation

Currently the data_type for all metrics is set to string. This makes it hard to do comparisons.

For example, eventCount > 20.

Looking through the metadata returned by Google, there are a few different types:

  • METRIC_TYPE_UNSPECIFIED Unspecified type.
  • TYPE_INTEGER Integer type.
  • TYPE_FLOAT Floating point type.
  • TYPE_SECONDS A duration of seconds; a special floating point type.
  • TYPE_MILLISECONDS A duration in milliseconds; a special floating point type.
  • TYPE_MINUTES A duration in minutes; a special floating point type.
  • TYPE_HOURS A duration in hours; a special floating point type.
  • TYPE_STANDARD A custom metric of standard type; a special floating point type.
  • TYPE_CURRENCY An amount of money; a special floating point type.
  • TYPE_FEET A length in feet; a special floating point type.
  • TYPE_MILES A length in miles; a special floating point type.
  • TYPE_METERS A length in meters; a special floating point type.
  • TYPE_KILOMETERS A length in kilometers; a special floating point type.

These could be mapped to more relevant data types.

https://developers.google.com/analytics/devguides/reporting/data/v1/rest...

https://developers.google.com/analytics/devguides/reporting/data/v1/rest...

Steps to reproduce

Proposed resolution

Remaining tasks

  • ✅ File an issue
  • ➖ Addition/Change/Update/Fix
  • ➖ Testing to ensure no regression
  • ➖ Automated unit testing coverage
  • ➖ Automated functional testing coverage
  • ➖ UX/UI designer responsibilities
  • ➖ Readability
  • ➖ Accessibility
  • ➖ Performance
  • ➖ Security
  • ➖ Documentation
  • ➖ Code review by maintainers
  • ➖ Full testing and approval
  • ➖ Credit contributors
  • ➖ Review with the product owner
  • ➖ Release notes snippet
  • ❌ Release

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • N/A
🐛 Bug report
Status

Needs work

Version

4.0

Component

Reports module

Created by

🇦🇺Australia imclean Tasmania

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024