Add support for EmptyFilter

Created on 10 July 2025, 2 days ago

Problem/Motivation

Currently it is not possible to filter based on a dimension not being set.

For example #3346317-7: Views filter string not working :

(I actually need to filter out when the country is not set, but there's no not empty filter, so I'm trying to do this some other way. Any attempt to filter on "does not contain" or regular expressions throw this error).

Steps to reproduce

Proposed resolution

Add support for Google's EmptyFilter ( https://cloud.google.com/php/docs/reference/analytics-data/latest/V1beta... )

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
Feature request
Status

Active

Version

4.0

Component

All modules

Created by

🇦🇺Australia imclean Tasmania

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

Merge Requests

Comments & Activities

  • Issue created by @imclean
  • 🇦🇺Australia imclean Tasmania

    Or not. Google's AI states:

    The Filter.Empty filter in Google Analytics Data API v1beta is not a standard filter type and doesn't exist as a defined object or class within the API's documentation. It's likely a placeholder or a reference to a filter that does not apply any filtering logic, essentially representing an unfiltered view of the data.

    Looking at the code, it doesn't look like it does anything.

  • 🇦🇺Australia imclean Tasmania

    This is actually possible. EmptyFilter() works as advertised, just need to work out how to negate it, presumably with a notExpression.

  • Merge request !20Add empty and not empty string filters. → (Open) created by imclean
  • 🇦🇺Australia imclean Tasmania

    Adds support for filtering on empty and not empty. There may be a neater way to do this but it is functional.

  • 🇦🇺Australia imclean Tasmania
Production build 0.71.5 2024