0

Over my webpage I use the google-provided ga function in order to send pageviews to my panel.

But how I will detect during development of the webpage's javascript when the javascript send pageview?

I am asking because it may sends more pageviews that requested especially on infinite scrolling pages and single-page applications.

I am not asking how to debug javascript but I am asking on how you can gen an indication when the page's javascript sends a pageview into the google analytics WITHOUT/BEFORE the need of deployment. In other words how I will detect over the tools that browser provides to me in order to detect when my webpage sends a pageview.

Dimitrios Desyllas
  • 9,082
  • 15
  • 74
  • 164
  • No is not is specifically for getting indication for google analytics during development when the pageview request gets sent – Dimitrios Desyllas Dec 04 '17 at 10:54
  • This still just boils down to, use debug tools. – Liam Dec 04 '17 at 10:55
  • I am telling on how to use the debug tools to detect the pageview – Dimitrios Desyllas Dec 04 '17 at 10:56
  • Yes and? TBH, this isn't rocket science. I don't think this is a bad question, I also don't think it's an overly great Q&A either. I mean good luck and all that but you haven't had an amazing epiphany that 1,000 people haven't already done in the past. My close vote still stands. May get closed, may not. – Liam Dec 04 '17 at 10:59

1 Answers1

0

Go to the browser's developer tools (either by pressing the F12 key or via your browsers menu) and go to Network tab.

Afterwards on the page network filter for https://www.google-analytics.com/collect each time you see that entry over the network a new pageview gets sent to the google's servers.

An alternative approach is to put console.log before or after ga function.

Dimitrios Desyllas
  • 9,082
  • 15
  • 74
  • 164