Skip to content
Advertisement

How to use multiple filters with Google Analytics Data API (GA4) using PHP

So this will be my first question here, and I’ll do my best to follow rules of the community. I’m trying to use multiple filters in the Google Analytics Data API (GA4) using PHP. I have successfully been able to use one filter and show it in a custom dashboard.

Below is the code for getting the data for the url that starts with value: /133. Question is, how do I make a filter to get multiple urls. I.e say I want the data for the pages starts with value, “/133”, “/88”, “/678” and “/67”?

JavaScript

Advertisement

Answer

Here is the working example:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement