Search code examples
google-analyticscustom-events

How to track which pages caused custom events in Google Analytics?


I have multiple pages being tracked by google analytics. On all these pages I have an outbound link for which I make a call to create a custom event - the action is named the same on all the pages.

How can I see a breakdown of which pages caused this event to occur. I.e.

Page 1 - 7 clicks on outbound link, Page 2 - 2 clicks on outbound link, Page 3 - 1 clicks on outbound link, Page 4 - 19 clicks on outbound link

Thanks!


Solution

  • All events sent to Google Analytics send with the Page they were sent from (defined by location.pathname and location.search combined, if I'm not mistakened).

    You can drill down into what pages those events occurred in by clicking the secondary dimension dropdown (by default, it says "None") and select "Page".

    enter image description here