Take our developer survey. We want your feedback so we can learn how to improve Google Analytics, and make it an even better tool for you.

Disable default page_view measurement behavior

The default behavior of this snippet is to send a page_view event to Google Analytics. This is the desired behavior in most cases; page_view events are automatically recorded once you add the snippet to each page on your site. However, if you don’t want the snippet to send a page_view event to Google Analytics, set the send_page_view parameter to false:

gtag('config', 'MEASUREMENT_ID', {
  'send_page_view': false