Turn off Google Analytics History tracking for a single page application (SPA)

84 Views Asked by At

I recently upgraded Google Analytics to use Google Tag Manager in a single page application (SPA) to track events using the dataLayer.push(). However, I am seeing records for pages in the Reports -> Engagement -> Pages and screens that I would like to exclude without having to filter them.

I have unchecked the "Page changes based on browser history events" option in Settings but I can still see records coming in from the SPA.

Google Analytics enhanced measurement admin screenshot

Should this work? Do I need to do anything else or is it a matter of waiting?

1

There are 1 best solutions below

0
On

If your problem still remains, try to exclude SPA pages from sending Page_view event in GTM, you can do it by creating a custom page_view event and filtering the SPA page_locations from the results.