show rows with value '0'

242 views
Skip to first unread message

alexande...@gmail.com

unread,
Oct 3, 2016, 11:05:24 AM10/3/16
to google-analytics-spreadsheet-add-on

Hey guys!

I'm working with the google analytics add on and experienced a problem.
I already read through different topics here but wasn't able to solve it.

I want my report to show all pageviews for relevant subpages for the last 31 days. Therefore I used the ‘path-function’. My problem is that the report automatically deletes results with the value “0”. So if nobody visits the subpage e.g. on September the 30th, it deletes the whole row. I want the add on to show the correct date with the value ‘0’ because the data is linked to a chart. I know that this question already exists and I think it said that we should set default=true but I don’t really know where to do it.

I’m looking forward to getting the right answer, many thanks in advance

Alex

Philip Walton

unread,
Oct 3, 2016, 11:12:30 AM10/3/16
to alexande...@gmail.com, google-analytics-spreadsheet-add-on
The answer is you can't do this.

A Google Analytics API request can't be configured to return 0 values for pages that received no pageviews because there isn't a finite set of possible pages (there's an infinite number of possible pages a website could have).


--
You received this message because you are subscribed to the Google Groups "google-analytics-spreadsheet-add-on" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-spreadsheet-add-on+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-analytics-spreadsheet-add-on/45583e87-fa45-44b2-abf2-27f169ec6334%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

alexande...@gmail.com

unread,
Oct 3, 2016, 11:30:40 AM10/3/16
to google-analytics-spreadsheet-add-on, alexande...@gmail.com
Thank you for the very quick response!
So if I e.g. have 'ga:pagePath=~(/standorte/wien-22/)' and want pageviews for the last 31 days there is no possibility to have 31 rows like
2016-09-03
2016-09-04
2016-09-05
and on days with no pageviews it just shows '0' instead of deleting the row?
:(

Philip Walton

unread,
Oct 3, 2016, 11:42:29 AM10/3/16
to alexande...@gmail.com, google-analytics-spreadsheet-add-on
In that example you can do it because for the dimension ga:date, there are a finite number of days in a date range. Here's an example query:

But it doesn't work for the dimension ga:pagePath, since there are an infinite number of possible pages. It's only going to return rows where the number of pageviews is at least one.


alexande...@gmail.com

unread,
Oct 3, 2016, 12:08:43 PM10/3/16
to google-analytics-spreadsheet-add-on, alexande...@gmail.com
Thanks again!
Yea I just tried it with the example query. It works fine when I use the pagepath (a defined path) as a filter. Is there a possibility to include the code in the add on?
pic-query.png
pic-analytics.png

Philip Walton

unread,
Oct 3, 2016, 12:21:35 PM10/3/16
to alexande...@gmail.com, google-analytics-spreadsheet-add-on
What do you mean include the code for the add-on? Do you mean see the source code? If so then no, unfortunately it's not open source.

alexande...@gmail.com

unread,
Oct 3, 2016, 12:29:26 PM10/3/16
to google-analytics-spreadsheet-add-on, alexande...@gmail.com
Wanted to know whether it is possible to have it exactly in that way it is shown in the screenshot in the add on - so a row for every day with the defined filter as it seems that i does work in a way i still wasnt able to figure out.

Philip Walton

unread,
Oct 3, 2016, 12:31:21 PM10/3/16
to alexande...@gmail.com, google-analytics-spreadsheet-add-on
You have the `ga:pagePath` dimension in your Add-on screenshot and not in the Query Explorer screenshot. Remove that and it should work.

Reply all
Reply to author
Forward
0 new messages