Google analytics API v4 max results
Can someone please help me for Google analytic API V4:
how to pass: max-result parameter with this class:
Google_Service_AnalyticsReporting
I am unable to find relevant function to assign max-result parameter value.
google-analytics-v4
add a comment |
Can someone please help me for Google analytic API V4:
how to pass: max-result parameter with this class:
Google_Service_AnalyticsReporting
I am unable to find relevant function to assign max-result parameter value.
google-analytics-v4
add a comment |
Can someone please help me for Google analytic API V4:
how to pass: max-result parameter with this class:
Google_Service_AnalyticsReporting
I am unable to find relevant function to assign max-result parameter value.
google-analytics-v4
Can someone please help me for Google analytic API V4:
how to pass: max-result parameter with this class:
Google_Service_AnalyticsReporting
I am unable to find relevant function to assign max-result parameter value.
google-analytics-v4
google-analytics-v4
asked Apr 27 '17 at 11:58
UTurnUTurn
235
235
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You can use parameter page_size: 10000
. Hope this helps.
add a comment |
Based on https://stackoverflow.com/a/38922925/1224827 , the parameter you're looking for is pageSize
:
The correct name of the parameter you are looking for is: pageSize
. The Reference Docs provide the full API specifications.
def get_report(analytics):
# Use the Analytics Service Object to query the Analytics Reporting API V4.
return analytics.reports().batchGet(
body={
'reportRequests': [
{
'viewId': VIEW_ID,
'pageSize': 10000,
'dateRanges': [{'startDate': '2016-04-01', 'endDate': '2016-08-09'}],
'dimensions': [{'name':'ga:date'},
{'name': 'ga:channelGrouping'}],
'metrics': [{'expression': 'ga:sessions'},
{'expression': 'ga:newUsers'},
{'expression': 'ga:goal15Completions'},
{'expression': 'ga:goal9Completions'},
{'expression': 'ga:goal10Completions'}]
}]
}
).execute()
Note: the API returns a maximum of 100,000 rows per request, no matter how many you ask for (according to the documentation). As you attempted max_results
this tells me you are trying to migrate from the Core Reporting API V3, check out the Migration Guide - Pagination documentation to understand how to request the next 100,000 rows.
Stack Overflow extra tip. Include your error responses in your question, as it will likely improve your chances of someone being able to help.
2
The docs has been updated:The Analytics Core Reporting API returns a maximum of 100,000 rows per request, no matter how many you ask for.
underpageSize
section.
– Jimmy Adaro
Nov 16 '18 at 18:28
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f43657140%2fgoogle-analytics-api-v4-max-results%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can use parameter page_size: 10000
. Hope this helps.
add a comment |
You can use parameter page_size: 10000
. Hope this helps.
add a comment |
You can use parameter page_size: 10000
. Hope this helps.
You can use parameter page_size: 10000
. Hope this helps.
answered Jul 4 '17 at 8:05
Dapeng114Dapeng114
1396
1396
add a comment |
add a comment |
Based on https://stackoverflow.com/a/38922925/1224827 , the parameter you're looking for is pageSize
:
The correct name of the parameter you are looking for is: pageSize
. The Reference Docs provide the full API specifications.
def get_report(analytics):
# Use the Analytics Service Object to query the Analytics Reporting API V4.
return analytics.reports().batchGet(
body={
'reportRequests': [
{
'viewId': VIEW_ID,
'pageSize': 10000,
'dateRanges': [{'startDate': '2016-04-01', 'endDate': '2016-08-09'}],
'dimensions': [{'name':'ga:date'},
{'name': 'ga:channelGrouping'}],
'metrics': [{'expression': 'ga:sessions'},
{'expression': 'ga:newUsers'},
{'expression': 'ga:goal15Completions'},
{'expression': 'ga:goal9Completions'},
{'expression': 'ga:goal10Completions'}]
}]
}
).execute()
Note: the API returns a maximum of 100,000 rows per request, no matter how many you ask for (according to the documentation). As you attempted max_results
this tells me you are trying to migrate from the Core Reporting API V3, check out the Migration Guide - Pagination documentation to understand how to request the next 100,000 rows.
Stack Overflow extra tip. Include your error responses in your question, as it will likely improve your chances of someone being able to help.
2
The docs has been updated:The Analytics Core Reporting API returns a maximum of 100,000 rows per request, no matter how many you ask for.
underpageSize
section.
– Jimmy Adaro
Nov 16 '18 at 18:28
add a comment |
Based on https://stackoverflow.com/a/38922925/1224827 , the parameter you're looking for is pageSize
:
The correct name of the parameter you are looking for is: pageSize
. The Reference Docs provide the full API specifications.
def get_report(analytics):
# Use the Analytics Service Object to query the Analytics Reporting API V4.
return analytics.reports().batchGet(
body={
'reportRequests': [
{
'viewId': VIEW_ID,
'pageSize': 10000,
'dateRanges': [{'startDate': '2016-04-01', 'endDate': '2016-08-09'}],
'dimensions': [{'name':'ga:date'},
{'name': 'ga:channelGrouping'}],
'metrics': [{'expression': 'ga:sessions'},
{'expression': 'ga:newUsers'},
{'expression': 'ga:goal15Completions'},
{'expression': 'ga:goal9Completions'},
{'expression': 'ga:goal10Completions'}]
}]
}
).execute()
Note: the API returns a maximum of 100,000 rows per request, no matter how many you ask for (according to the documentation). As you attempted max_results
this tells me you are trying to migrate from the Core Reporting API V3, check out the Migration Guide - Pagination documentation to understand how to request the next 100,000 rows.
Stack Overflow extra tip. Include your error responses in your question, as it will likely improve your chances of someone being able to help.
2
The docs has been updated:The Analytics Core Reporting API returns a maximum of 100,000 rows per request, no matter how many you ask for.
underpageSize
section.
– Jimmy Adaro
Nov 16 '18 at 18:28
add a comment |
Based on https://stackoverflow.com/a/38922925/1224827 , the parameter you're looking for is pageSize
:
The correct name of the parameter you are looking for is: pageSize
. The Reference Docs provide the full API specifications.
def get_report(analytics):
# Use the Analytics Service Object to query the Analytics Reporting API V4.
return analytics.reports().batchGet(
body={
'reportRequests': [
{
'viewId': VIEW_ID,
'pageSize': 10000,
'dateRanges': [{'startDate': '2016-04-01', 'endDate': '2016-08-09'}],
'dimensions': [{'name':'ga:date'},
{'name': 'ga:channelGrouping'}],
'metrics': [{'expression': 'ga:sessions'},
{'expression': 'ga:newUsers'},
{'expression': 'ga:goal15Completions'},
{'expression': 'ga:goal9Completions'},
{'expression': 'ga:goal10Completions'}]
}]
}
).execute()
Note: the API returns a maximum of 100,000 rows per request, no matter how many you ask for (according to the documentation). As you attempted max_results
this tells me you are trying to migrate from the Core Reporting API V3, check out the Migration Guide - Pagination documentation to understand how to request the next 100,000 rows.
Stack Overflow extra tip. Include your error responses in your question, as it will likely improve your chances of someone being able to help.
Based on https://stackoverflow.com/a/38922925/1224827 , the parameter you're looking for is pageSize
:
The correct name of the parameter you are looking for is: pageSize
. The Reference Docs provide the full API specifications.
def get_report(analytics):
# Use the Analytics Service Object to query the Analytics Reporting API V4.
return analytics.reports().batchGet(
body={
'reportRequests': [
{
'viewId': VIEW_ID,
'pageSize': 10000,
'dateRanges': [{'startDate': '2016-04-01', 'endDate': '2016-08-09'}],
'dimensions': [{'name':'ga:date'},
{'name': 'ga:channelGrouping'}],
'metrics': [{'expression': 'ga:sessions'},
{'expression': 'ga:newUsers'},
{'expression': 'ga:goal15Completions'},
{'expression': 'ga:goal9Completions'},
{'expression': 'ga:goal10Completions'}]
}]
}
).execute()
Note: the API returns a maximum of 100,000 rows per request, no matter how many you ask for (according to the documentation). As you attempted max_results
this tells me you are trying to migrate from the Core Reporting API V3, check out the Migration Guide - Pagination documentation to understand how to request the next 100,000 rows.
Stack Overflow extra tip. Include your error responses in your question, as it will likely improve your chances of someone being able to help.
edited Nov 20 '18 at 3:18
answered Aug 31 '17 at 21:14
Blairg23Blairg23
4,31413846
4,31413846
2
The docs has been updated:The Analytics Core Reporting API returns a maximum of 100,000 rows per request, no matter how many you ask for.
underpageSize
section.
– Jimmy Adaro
Nov 16 '18 at 18:28
add a comment |
2
The docs has been updated:The Analytics Core Reporting API returns a maximum of 100,000 rows per request, no matter how many you ask for.
underpageSize
section.
– Jimmy Adaro
Nov 16 '18 at 18:28
2
2
The docs has been updated:
The Analytics Core Reporting API returns a maximum of 100,000 rows per request, no matter how many you ask for.
under pageSize
section.– Jimmy Adaro
Nov 16 '18 at 18:28
The docs has been updated:
The Analytics Core Reporting API returns a maximum of 100,000 rows per request, no matter how many you ask for.
under pageSize
section.– Jimmy Adaro
Nov 16 '18 at 18:28
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f43657140%2fgoogle-analytics-api-v4-max-results%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown