Learn business growth with Google Analytics 4 › Forums › Google Analytics 4 › What is causing the exception in the GA4 API dimensionFilter for Expect integer error? › Reply To: What is causing the exception in the GA4 API dimensionFilter for Expect integer error?
-
Ah, I see where the issue is coming from. It’s because ‘CONTAINS’ isn’t recognized as it’s expected to be an integer, not a string. So here’s a simple fix for you: just swap ‘CONTAINS’ with FilterStringFilterMatchType::CONTAINS. And bingo, this should resolve the issue! You see, FilterStringFilterMatchType::CONTAINS actually corresponds to an integer, hence, eliminating the problem. Easy peasy, right?