AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
5.4K members online now
5.4K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

API filter not working

[ Edited ]
Collaborator ✭ ☆ ☆
# 1
Collaborator ✭ ☆ ☆

Hi All

Here is my code

 

 

var monday = Analytics.Data.Ga.get('ga:xxxxxxx', '2016-06-01', '2016-07-17', 'ga:sessions', 
  {"dimensions":"ga:dayofweek, ga:hour", "filters":"ga:dayofweek==1"});

 

My objective to get sessions by hour for all mondays during specified reporting period.

Problem: If i set include-empty-rows=true then the result arry also contains values for days other than mondays but with zero sessions. If I set include-empty-rows=false other days are filtered out from report but along with that also hours with zero sessions on monday are filtered out.

This definitely looks like a bug and doesnt seem by design.

 

Any workaround? 

 

 

Regards, Nik
LinkedIn  |   @nikhilparachure | My Blog