A Single Page Application (SPA) loads the resources required to navigate throughout the site. This is for the first page load and SPA is a web application or website.
The content loads dynamically when your site’s link is clicked and the user interacts with the page. On load, the data stored in the tracker updates as well.
Update the tracker
ga('set', 'page', '/new-page.html');
Send a pageview immediately after the tracker updates −