googleapiclient batchGet sequences Google Analytics Reporting API V4Why do Web Analytics such as Google Analytics use Dimensions and Metrics instead of SQL statement?How to delete a property from Google AnalyticsOrganize and work with Google Analytics data in .NET/C#?Google analytics embed API: Line graph of single metric split by dimensionGoogle Analytics - wider date range shows less visits than a shorter date range. Possible dimensions and metrics mismatch?Google Analytics dimension pagePathLevel more than 4GA : Session % in which the user do not visit the front pageGoogle Analytics: segment discrepancy between API and web reportingOdd Google Analytics sessionDuration Numbers
Why are electrically insulating heatsinks so rare? Is it just cost?
Did converts (ger tzedek) in ancient Israel own land?
I Accidentally Deleted a Stock Terminal Theme
Python: return float 1.0 as int 1 but float 1.5 as float 1.5
What exploit are these user agents trying to use?
What reasons are there for a Capitalist to oppose a 100% inheritance tax?
Why does Kotter return in Welcome Back Kotter
UK: Is there precedent for the governments e-petition site changing the direction of a government decision?
Twin primes whose sum is a cube
In a Spin are Both Wings Stalled?
If human space travel is limited by the G force vulnerability, is there a way to counter G forces?
Can a virus destroy the BIOS of a modern computer?
How can saying a song's name be a copyright violation?
Why is the 'in' operator throwing an error with a string literal instead of logging false?
How can I prevent hyper evolved versions of regular creatures from wiping out their cousins?
What is the word for reserving something for yourself before others do?
Took a trip to a parallel universe, need help deciphering
In Romance of the Three Kingdoms why do people still use bamboo sticks when papers are already invented?
Combinations of multiple lists
Should I tell management that I intend to leave due to bad software development practices?
Where does SFDX store details about scratch orgs?
Does casting Light, or a similar spell, have any effect when the caster is swallowed by a monster?
What is the intuition behind short exact sequences of groups; in particular, what is the intuition behind group extensions?
Can I ask the recruiters in my resume to put the reason why I am rejected?
googleapiclient batchGet sequences Google Analytics Reporting API V4
Why do Web Analytics such as Google Analytics use Dimensions and Metrics instead of SQL statement?How to delete a property from Google AnalyticsOrganize and work with Google Analytics data in .NET/C#?Google analytics embed API: Line graph of single metric split by dimensionGoogle Analytics - wider date range shows less visits than a shorter date range. Possible dimensions and metrics mismatch?Google Analytics dimension pagePathLevel more than 4GA : Session % in which the user do not visit the front pageGoogle Analytics: segment discrepancy between API and web reportingOdd Google Analytics sessionDuration Numbers
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
In Analytics 360 there's a way to go into Behavior > Site Content > Landing Page > Add New Segment > Sequences
and then you can define a sequence of events, say, user goes from page 1 and then goes to page 2 and then searches and then... etc.
I want to be able to pull this data via the GA API v4 using python's googleapiclient.discovery
. I can do these queries with dimensions and metrics, but I am not sure how to set up a sequence. Here's how I query dimensions and metrics:
request =
'viewId': view_id',
'dateRanges':
'startDate': datetime.strftime(pd.to_datetime('2018-12-01'),'%Y-%m-%d'),
'endDate': datetime.strftime(pd.to_datetime('2018-12-31'),'%Y-%m-%d')
,
'dimensions': [
'name':'ga:date'
],
'metrics': ['expression': 'ga:sessions']
Then I was looking here and it seemed like the call could be sequenceSegment
but that was not recognized. And here it seems to go into it but not in the way googleapiclient.discovery
describes it.
I'm just a bit lost how to query the sequences report.
python google-analytics google-api-client
add a comment |
In Analytics 360 there's a way to go into Behavior > Site Content > Landing Page > Add New Segment > Sequences
and then you can define a sequence of events, say, user goes from page 1 and then goes to page 2 and then searches and then... etc.
I want to be able to pull this data via the GA API v4 using python's googleapiclient.discovery
. I can do these queries with dimensions and metrics, but I am not sure how to set up a sequence. Here's how I query dimensions and metrics:
request =
'viewId': view_id',
'dateRanges':
'startDate': datetime.strftime(pd.to_datetime('2018-12-01'),'%Y-%m-%d'),
'endDate': datetime.strftime(pd.to_datetime('2018-12-31'),'%Y-%m-%d')
,
'dimensions': [
'name':'ga:date'
],
'metrics': ['expression': 'ga:sessions']
Then I was looking here and it seemed like the call could be sequenceSegment
but that was not recognized. And here it seems to go into it but not in the way googleapiclient.discovery
describes it.
I'm just a bit lost how to query the sequences report.
python google-analytics google-api-client
I think I found the docs here. There's asequenceSegment
in there, but still unsure how to specify a sequence of pages.
– jchaykow
Mar 21 at 23:45
add a comment |
In Analytics 360 there's a way to go into Behavior > Site Content > Landing Page > Add New Segment > Sequences
and then you can define a sequence of events, say, user goes from page 1 and then goes to page 2 and then searches and then... etc.
I want to be able to pull this data via the GA API v4 using python's googleapiclient.discovery
. I can do these queries with dimensions and metrics, but I am not sure how to set up a sequence. Here's how I query dimensions and metrics:
request =
'viewId': view_id',
'dateRanges':
'startDate': datetime.strftime(pd.to_datetime('2018-12-01'),'%Y-%m-%d'),
'endDate': datetime.strftime(pd.to_datetime('2018-12-31'),'%Y-%m-%d')
,
'dimensions': [
'name':'ga:date'
],
'metrics': ['expression': 'ga:sessions']
Then I was looking here and it seemed like the call could be sequenceSegment
but that was not recognized. And here it seems to go into it but not in the way googleapiclient.discovery
describes it.
I'm just a bit lost how to query the sequences report.
python google-analytics google-api-client
In Analytics 360 there's a way to go into Behavior > Site Content > Landing Page > Add New Segment > Sequences
and then you can define a sequence of events, say, user goes from page 1 and then goes to page 2 and then searches and then... etc.
I want to be able to pull this data via the GA API v4 using python's googleapiclient.discovery
. I can do these queries with dimensions and metrics, but I am not sure how to set up a sequence. Here's how I query dimensions and metrics:
request =
'viewId': view_id',
'dateRanges':
'startDate': datetime.strftime(pd.to_datetime('2018-12-01'),'%Y-%m-%d'),
'endDate': datetime.strftime(pd.to_datetime('2018-12-31'),'%Y-%m-%d')
,
'dimensions': [
'name':'ga:date'
],
'metrics': ['expression': 'ga:sessions']
Then I was looking here and it seemed like the call could be sequenceSegment
but that was not recognized. And here it seems to go into it but not in the way googleapiclient.discovery
describes it.
I'm just a bit lost how to query the sequences report.
python google-analytics google-api-client
python google-analytics google-api-client
asked Mar 21 at 21:58
jchaykowjchaykow
559422
559422
I think I found the docs here. There's asequenceSegment
in there, but still unsure how to specify a sequence of pages.
– jchaykow
Mar 21 at 23:45
add a comment |
I think I found the docs here. There's asequenceSegment
in there, but still unsure how to specify a sequence of pages.
– jchaykow
Mar 21 at 23:45
I think I found the docs here. There's a
sequenceSegment
in there, but still unsure how to specify a sequence of pages.– jchaykow
Mar 21 at 23:45
I think I found the docs here. There's a
sequenceSegment
in there, but still unsure how to specify a sequence of pages.– jchaykow
Mar 21 at 23:45
add a comment |
1 Answer
1
active
oldest
votes
You can do this by using the segments in the API-Call. In the API-Call you have to specify the "sequence Segment" you want to apply on the data (or you take a predefined Segment from the UI by calling it by ID).
https://developers.google.com/analytics/devguides/reporting/core/v3/segments#conditions-vs-sequences
users::sequence::ga:deviceCategory==desktop;->>ga:deviceCategory==mobile
So if I want all Sessions from Users with dimension date triggering Event Category A and after this coming to pagePath B it would look like this (R):
google_analytics_4(
"ID",
start = '2019-03-18',
end = '2019-03-18',
metrics = c("sessions"),
dimensions = c("date"),
segments = c("sessions::sequence::ga:eventCategory==A;->>ga:pagePath==B"),
max_results = 99999999
)
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%2f55289890%2fgoogleapiclient-batchget-sequences-google-analytics-reporting-api-v4%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can do this by using the segments in the API-Call. In the API-Call you have to specify the "sequence Segment" you want to apply on the data (or you take a predefined Segment from the UI by calling it by ID).
https://developers.google.com/analytics/devguides/reporting/core/v3/segments#conditions-vs-sequences
users::sequence::ga:deviceCategory==desktop;->>ga:deviceCategory==mobile
So if I want all Sessions from Users with dimension date triggering Event Category A and after this coming to pagePath B it would look like this (R):
google_analytics_4(
"ID",
start = '2019-03-18',
end = '2019-03-18',
metrics = c("sessions"),
dimensions = c("date"),
segments = c("sessions::sequence::ga:eventCategory==A;->>ga:pagePath==B"),
max_results = 99999999
)
add a comment |
You can do this by using the segments in the API-Call. In the API-Call you have to specify the "sequence Segment" you want to apply on the data (or you take a predefined Segment from the UI by calling it by ID).
https://developers.google.com/analytics/devguides/reporting/core/v3/segments#conditions-vs-sequences
users::sequence::ga:deviceCategory==desktop;->>ga:deviceCategory==mobile
So if I want all Sessions from Users with dimension date triggering Event Category A and after this coming to pagePath B it would look like this (R):
google_analytics_4(
"ID",
start = '2019-03-18',
end = '2019-03-18',
metrics = c("sessions"),
dimensions = c("date"),
segments = c("sessions::sequence::ga:eventCategory==A;->>ga:pagePath==B"),
max_results = 99999999
)
add a comment |
You can do this by using the segments in the API-Call. In the API-Call you have to specify the "sequence Segment" you want to apply on the data (or you take a predefined Segment from the UI by calling it by ID).
https://developers.google.com/analytics/devguides/reporting/core/v3/segments#conditions-vs-sequences
users::sequence::ga:deviceCategory==desktop;->>ga:deviceCategory==mobile
So if I want all Sessions from Users with dimension date triggering Event Category A and after this coming to pagePath B it would look like this (R):
google_analytics_4(
"ID",
start = '2019-03-18',
end = '2019-03-18',
metrics = c("sessions"),
dimensions = c("date"),
segments = c("sessions::sequence::ga:eventCategory==A;->>ga:pagePath==B"),
max_results = 99999999
)
You can do this by using the segments in the API-Call. In the API-Call you have to specify the "sequence Segment" you want to apply on the data (or you take a predefined Segment from the UI by calling it by ID).
https://developers.google.com/analytics/devguides/reporting/core/v3/segments#conditions-vs-sequences
users::sequence::ga:deviceCategory==desktop;->>ga:deviceCategory==mobile
So if I want all Sessions from Users with dimension date triggering Event Category A and after this coming to pagePath B it would look like this (R):
google_analytics_4(
"ID",
start = '2019-03-18',
end = '2019-03-18',
metrics = c("sessions"),
dimensions = c("date"),
segments = c("sessions::sequence::ga:eventCategory==A;->>ga:pagePath==B"),
max_results = 99999999
)
answered Mar 22 at 10:16
DanielSDanielS
545513
545513
add a comment |
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%2f55289890%2fgoogleapiclient-batchget-sequences-google-analytics-reporting-api-v4%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
I think I found the docs here. There's a
sequenceSegment
in there, but still unsure how to specify a sequence of pages.– jchaykow
Mar 21 at 23:45