I would like to count the number of events occurring on a specific page, given a Previous Page Path.

It doesn't seem to be possible neither with Behaviour>Events report nor with custom report.

Could anyone recommend a way to achieve the above?

  • Thanks for editing the question David, but would also be good to know why it is not possible in GA to have events and previous page path dimension in the same report.
    – Giacomo
    Apr 25, 2018 at 13:41
  • I think googles cut back on filtering capacity with advent of 360 - likely to make more sales (see valid combinations: developers.google.com/analytics/devguides/reporting/core/… ). I expect you'd want Events and Page dimensions, which do not seems to be queryable together. You may be able to setup a custom variable or experiment to capture this info into the future.
    – TBB
    Aug 28, 2018 at 4:35
  • To clarify my previous comment - I am not sure Google has "cut" back anything with their newer/updated reporting system because I do not know what used to be available. However, the comments to the following accepted answer (seemingly responding to a similar question to what you want) suggest that whatever query was working before was no longer working for those commenters: stackoverflow.com/questions/11004451/… - I am by no means knowledgable on the subject. Also, any motivation for change is pure speculation.
    – TBB
    Aug 28, 2018 at 4:53

2 Answers 2


Unfortunately this isn't possible. I did some experiments using the API in Google Sheets. Using Event Category, Page, Previous Page Path, and Total Events, I got a "selected dimensions and metrics cannot be queried together" error.

If you remove Page, you still get an error. If you remove Event Category, you get data for Page, Previous Page Path, and Total Events, but in every row the values for Page and Previous Page Path are the same. I couldn't tell you why this is permitted when the version without Page isn't, but it's not helpful anyway.

[My two hypotheses were: "previous page path is a connection made GA-side that only involves pageview hits" and "previous page path exists for every hit but is always the most recent pageview hit, so for events it's the same page." The connection is certainly made GA-side, but beyond that the evidence doesn't make me feel like I can fully accept or reject either one.]

You could probably estimate the count by seeing what percentage of pageviews of Page 2 (let's call it) were preceded by pageviews of Page 1 and taking that percentage of Total Events on Page 2.

For more accuracy make that calculation only within the following sequence segment:

Filter sessions starting with any user interaction
Step 1: Page contains [page 1]
is immediately followed by 
Step 2: Page contains [page 2]

If it is hard to get to Page 2 other than from Page 1, or people are unlikely to go to Page 2 more than once in a session, your estimate should be pretty accurate.


You're trying to mix hit level data - the events, with session level data - the previous page. That's why it won't work.

  • Thanks for your answer but I still don't get it. When I navigate to a page GA keeps a value for the previous page. Then if I click on something that triggers an event, it saves the event values with the current page I'm in. Why does it discard the previous page information?
    – Giacomo
    Apr 26, 2018 at 17:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.