Created
April 15, 2019 19:49
-
-
Save dnesteryuk/9ac528b0ff822ff9b0f8005c81fa4f6c to your computer and use it in GitHub Desktop.
GA request for extracting sessions
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
{ | |
"reportRequests": [ | |
{ | |
"viewId": "YOUR_VIEW_ID_IS_HERE", | |
"dateRanges": [ | |
{ | |
"startDate": "2015-01-01", | |
"endDate": "2019-04-10" | |
} | |
], | |
"dimensions": [ | |
{ | |
"name": "ga:previousPagePath" | |
}, | |
{ | |
"name": "ga:pagePath" | |
}, | |
{ | |
"name": "ga:dateHour" | |
}, | |
{ | |
"name": "ga:browserSize" | |
} | |
], | |
"orderBys": [ | |
{ | |
"fieldName": "ga:dateHour", | |
"sortOrder": "DESCENDING" | |
} | |
], | |
"dimensionFilterClauses": [ | |
{ | |
"filters": [ | |
{ | |
"dimensionName": "ga:previousPagePath", | |
"operator": "EXACT", | |
"not": true, | |
"expressions": [ | |
"(entrance)" | |
] | |
} | |
] | |
} | |
], | |
"metrics": [ | |
{ | |
"expression": "ga:pageviews" | |
} | |
], | |
"pageSize": 5000, | |
"hideTotals": true, | |
"hideValueRanges": true | |
} | |
] | |
} |
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
{ | |
"reports": [ | |
{ | |
"columnHeader": { | |
"dimensions": [ | |
"ga:previousPagePath", | |
"ga:pagePath", | |
"ga:dateHour", | |
"ga:browserSize" | |
], | |
"metricHeader": { | |
"metricHeaderEntries": [ | |
{ | |
"name": "ga:pageviews", | |
"type": "INTEGER" | |
} | |
] | |
} | |
}, | |
"data": { | |
"rows": [ | |
{ | |
"dimensions": [ | |
"/", | |
"/2019/03/23/service-worker-in-place-of-sinon-js.html", | |
"2019041010", | |
"1840x980" | |
], | |
"metrics": [ | |
{ | |
"values": [ | |
"1" | |
] | |
} | |
] | |
}, | |
{ | |
"dimensions": [ | |
"/", | |
"/2019/03/23/service-worker-in-place-of-sinon-js.html", | |
"2019040909", | |
"1670x840" | |
], | |
"metrics": [ | |
{ | |
"values": [ | |
"1" | |
] | |
} | |
] | |
}, | |
{ | |
"dimensions": [ | |
"/2016/09/27/prerendering-pages-in-browsers.html", | |
"/", | |
"2019040909", | |
"1670x840" | |
], | |
"metrics": [ | |
{ | |
"values": [ | |
"1" | |
] | |
} | |
] | |
}, | |
{ | |
"dimensions": [ | |
"/2016/10/29/custom-templates-in-polymer-components.html", | |
"/2016/05/01/data-sharing-between-web-components-on-polymer.html", | |
"2019040909", | |
"1860x860" | |
], | |
"metrics": [ | |
{ | |
"values": [ | |
"1" | |
] | |
} | |
] | |
}, | |
{ | |
"dimensions": [ | |
"/2019/03/23/service-worker-in-place-of-sinon-js.html", | |
"/2018/04/08/automate-precaching-resources.html", | |
"2019040909", | |
"1670x840" | |
], | |
"metrics": [ | |
{ | |
"values": [ | |
"1" | |
] | |
} | |
] | |
}, | |
{ | |
"dimensions": [ | |
"/", | |
"/2019/03/23/service-worker-in-place-of-sinon-js.html", | |
"2019040811", | |
"1840x980" | |
], | |
"metrics": [ | |
{ | |
"values": [ | |
"1" | |
] | |
} | |
] | |
}, | |
{ | |
"dimensions": [ | |
"/", | |
"/2018/04/08/automate-precaching-resources.html", | |
"2019040718", | |
"1580x790" | |
], | |
"metrics": [ | |
{ | |
"values": [ | |
"2" | |
] | |
} | |
] | |
}, | |
{ | |
"dimensions": [ | |
"/", | |
"/2019/03/23/service-worker-in-place-of-sinon-js.html", | |
"2019040718", | |
"1580x790" | |
], | |
"metrics": [ | |
{ | |
"values": [ | |
"1" | |
] | |
} | |
] | |
}, | |
{ | |
"dimensions": [ | |
"/2018/04/08/automate-precaching-resources.html", | |
"/", | |
"2019040718", | |
"1580x790" | |
], | |
"metrics": [ | |
{ | |
"values": [ | |
"1" | |
] | |
} | |
] | |
}, | |
{ | |
"dimensions": [ | |
"/2018/04/08/automate-precaching-resources.html", | |
"/about-me.html", | |
"2019040718", | |
"1580x790" | |
], | |
"metrics": [ | |
{ | |
"values": [ | |
"1" | |
] | |
} | |
] | |
}, | |
{ | |
"dimensions": [ | |
"/2019/03/23/service-worker-in-place-of-sinon-js.html", | |
"/", | |
"2019040718", | |
"1580x790" | |
], | |
"metrics": [ | |
{ | |
"values": [ | |
"1" | |
] | |
} | |
] | |
}, | |
{ | |
"dimensions": [ | |
"/2017/06/05/service-worker-as-fallback-to-the-prerender-resource-hint.html", | |
"/2016/09/27/prerendering-pages-in-browsers.html", | |
"2019040320", | |
"2610x1330" | |
], | |
"metrics": [ | |
{ | |
"values": [ | |
"1" | |
] | |
} | |
] | |
}, | |
{ | |
"dimensions": [ | |
"/", | |
"/2019/03/23/service-worker-in-place-of-sinon-js.html", | |
"2019040213", | |
"1970x1050" | |
], | |
"metrics": [ | |
{ | |
"values": [ | |
"1" | |
] | |
} | |
] | |
} | |
], | |
"rowCount": 597 | |
}, | |
"nextPageToken": "20" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please, replace
YOUR_VIEW_ID_IS_HERE
with your ID which can be found by following these steps.