Google Analytics: Real-Time Reporting API and Custom Size Filtering

Any ideas on how I would filter the response based on custom dimension when calling the api for the realtime api report?

Below I tried to set a filter in the api call, my custom size is called size1.

filters=rt:dimension1==test
filters=ga:dimension1==test

      

Both of the above filters do not work in realtime api.

But it looks like I can use the following filter when making an api call to Core Reporting Api

filters=ga:dimension1==test

      

+3


source to share


2 answers


So it looks like the realtime API doesn't support custom measurements

The list of supported dimensions and metrics is below for the realtime api.



https://developers.google.com/analytics/devguides/reporting/realtime/dimsmets/

+3


source


You should be able to use filters=rt:dimension1==test

while you are placing the dimension in your call. I'm not sure how you are calling the API. I am using javascript library and post to JSON like this:

 'params': {'ids': 'ga:xxxxxx', 'metrics': 'rt:totalEvents', 'dimensions': [ 'rt:eventCategory', 'rt:eventAction', 'rt:eventLabel', 'rt:minutesAgo'], 'filters': 'rt:eventLabel==Submit', 'fields': 'rows' }

      



Hope this helps!

0


source







All Articles