This repository has been archived by the owner on Apr 4, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle situation when GA response contain no rows
- Loading branch information
Pawel Badenski
authored and
Pawel Badenski
committed
Dec 11, 2012
1 parent
a218d5c
commit 7cd7899
Showing
12 changed files
with
252 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"kind": "analytics#gaData", | ||
"id": "https://www.googleapis.com/analytics/v3/data/ga?ids=ga:53872948&dimensions=ga:hour&metrics=ga:visitors&start-date=2012-08-14&end-date=2012-08-14&start-index=1&max-results=1000", | ||
"query": { | ||
"start-date": "2012-08-14", | ||
"end-date": "2012-08-14", | ||
"ids": "ga:53872948", | ||
"dimensions": "ga:hour", | ||
"metrics": [ | ||
"ga:visitors" | ||
], | ||
"start-index": 1, | ||
"max-results": 1000 | ||
}, | ||
"itemsPerPage": 1000, | ||
"totalResults": 24, | ||
"selfLink": "https://www.googleapis.com/analytics/v3/data/ga?ids=ga:53872948&dimensions=ga:hour&metrics=ga:visitors&start-date=2012-08-14&end-date=2012-08-14&start-index=1&max-results=1000", | ||
"profileInfo": { | ||
"profileId": "53872948", | ||
"accountId": "26179049", | ||
"webPropertyId": "UA-26179049-1", | ||
"internalWebPropertyId": "50705554", | ||
"profileName": "1. GOV.UK (Entire site - Filtered)", | ||
"tableId": "ga:53872948" | ||
}, | ||
"containsSampledData": false, | ||
"columnHeaders": [ | ||
{ | ||
"name": "ga:hour", | ||
"columnType": "DIMENSION", | ||
"dataType": "STRING" | ||
}, | ||
{ | ||
"name": "ga:visitors", | ||
"columnType": "METRIC", | ||
"dataType": "INTEGER" | ||
} | ||
], | ||
"totalsForAllResults": { | ||
"ga:visitors": "0" | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
spec/data/insidegov_weekly_policy_entries_response_no_results.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{"kind":"analytics#gaData", "id":"https://www.googleapis.com/analytics/v3/data/ga?ids=ga:53699180&dimensions=ga:week,ga:eventAction&metrics=ga:totalEvents&filters=ga:customVarValue2%3D%3Dpolicy&start-date=2012-05-20&end-date=2012-05-26", "query":{ | ||
"start-date":"2012-05-20", | ||
"end-date":"2012-05-26", | ||
"ids":"ga:53699180", | ||
"dimensions":"ga:week,ga:eventAction", | ||
"metrics":["ga:totalEvents"], | ||
"filters":"ga:customVarValue2==policy", | ||
"start-index":1, | ||
"max-results":1000 | ||
}, "itemsPerPage":1000, "totalResults":0, "selfLink":"https://www.googleapis.com/analytics/v3/data/ga?ids=ga:53699180&dimensions=ga:week,ga:eventAction&metrics=ga:totalEvents&filters=ga:customVarValue2%3D%3Dpolicy&start-date=2012-05-20&end-date=2012-05-26", "profileInfo":{ | ||
"profileId":"53699180", | ||
"accountId":"26179049", | ||
"webPropertyId":"UA-26179049-1", | ||
"internalWebPropertyId":"50705554", | ||
"profileName":"2. Inside Government - ALL", | ||
"tableId":"ga:53699180" | ||
}, "containsSampledData":false, "columnHeaders":[ | ||
{ | ||
"name":"ga:week", | ||
"columnType":"DIMENSION", | ||
"dataType":"STRING" | ||
}, | ||
{ | ||
"name":"ga:eventAction", | ||
"columnType":"DIMENSION", | ||
"dataType":"STRING" | ||
}, | ||
{ | ||
"name":"ga:totalEvents", | ||
"columnType":"METRIC", | ||
"dataType":"INTEGER" | ||
} | ||
], "totalsForAllResults":{ | ||
"ga:totalEvents":"0" | ||
}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"kind": "analytics#gaData", | ||
"id": "https://www.googleapis.com/analytics/v3/data/ga?ids=ga:53872948&dimensions=ga:week,+ga:year&metrics=ga:visits&start-date=2012-07-29&end-date=2012-08-04&start-index=1&max-results=1000", | ||
"query": { | ||
"start-date": "2012-07-29", | ||
"end-date": "2012-08-04", | ||
"ids": "ga:53872948", | ||
"dimensions": "ga:week, ga:year", | ||
"metrics": [ | ||
"ga:visits" | ||
], | ||
"start-index": 1, | ||
"max-results": 1000 | ||
}, | ||
"itemsPerPage": 1000, | ||
"totalResults": 1, | ||
"selfLink": "https://www.googleapis.com/analytics/v3/data/ga?ids=ga:53872948&dimensions=ga:week,+ga:year&metrics=ga:visits&start-date=2012-07-29&end-date=2012-08-04&start-index=1&max-results=1000", | ||
"profileInfo": { | ||
"profileId": "53872948", | ||
"accountId": "26179049", | ||
"webPropertyId": "UA-26179049-1", | ||
"internalWebPropertyId": "50705554", | ||
"profileName": "1. GOV.UK (Entire site - Filtered)", | ||
"tableId": "ga:53872948" | ||
}, | ||
"containsSampledData": false, | ||
"columnHeaders": [ | ||
{ | ||
"name": "ga:week", | ||
"columnType": "DIMENSION", | ||
"dataType": "STRING" | ||
}, | ||
{ | ||
"name": "ga:year", | ||
"columnType": "DIMENSION", | ||
"dataType": "STRING" | ||
}, | ||
{ | ||
"name": "ga:visits", | ||
"columnType": "METRIC", | ||
"dataType": "INTEGER" | ||
} | ||
], | ||
"totalsForAllResults": { | ||
"ga:visits": "0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{"kind":"analytics#gaData", "id":"https://www.googleapis.com/analytics/v3/data/ga?ids=ga:53872948&dimensions=ga:week,ga:eventCategory,ga:eventLabel&metrics=ga:totalEvents&filters=ga:eventCategory%3D~%5EIG_.*&start-date=2012-05-20&end-date=2012-05-26", "query":{ | ||
"start-date":"2012-05-20", | ||
"end-date":"2012-05-26", | ||
"ids":"ga:53872948", | ||
"dimensions":"ga:week,ga:eventCategory,ga:eventLabel", | ||
"metrics":["ga:totalEvents"], | ||
"filters":"ga:eventCategory=~^IG_.*", | ||
"start-index":1, | ||
"max-results":1000 | ||
}, "itemsPerPage":1000, "totalResults":0, "selfLink":"https://www.googleapis.com/analytics/v3/data/ga?ids=ga:53872948&dimensions=ga:week,ga:eventCategory,ga:eventLabel&metrics=ga:totalEvents&filters=ga:eventCategory%3D~%5EIG_.*&start-date=2012-05-20&end-date=2012-05-26", "profileInfo":{ | ||
"profileId":"53872948", | ||
"accountId":"26179049", | ||
"webPropertyId":"UA-26179049-1", | ||
"internalWebPropertyId":"50705554", | ||
"profileName":"1. GOV.UK (Entire site - Filtered)", | ||
"tableId":"ga:53872948" | ||
}, "containsSampledData":false, "columnHeaders":[ | ||
{ | ||
"name":"ga:week", | ||
"columnType":"DIMENSION", | ||
"dataType":"STRING" | ||
}, | ||
{ | ||
"name":"ga:eventCategory", | ||
"columnType":"DIMENSION", | ||
"dataType":"STRING" | ||
}, | ||
{ | ||
"name":"ga:eventLabel", | ||
"columnType":"DIMENSION", | ||
"dataType":"STRING" | ||
}, | ||
{ | ||
"name":"ga:totalEvents", | ||
"columnType":"METRIC", | ||
"dataType":"INTEGER" | ||
} | ||
], "totalsForAllResults":{ | ||
"ga:totalEvents":"0" | ||
}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters