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;








0















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.










share|improve this question






















  • 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


















0















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.










share|improve this question






















  • 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














0












0








0








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.










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 21 at 21:58









jchaykowjchaykow

559422




559422












  • 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

















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













1 Answer
1






active

oldest

votes


















0














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
)





share|improve this answer























    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
    );



    );













    draft saved

    draft discarded


















    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









    0














    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
    )





    share|improve this answer



























      0














      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
      )





      share|improve this answer

























        0












        0








        0







        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
        )





        share|improve this answer













        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
        )






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 22 at 10:16









        DanielSDanielS

        545513




        545513





























            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현