Skip to content

Light version: pages open quickly, without the 3D graphics. You are seeing the light version because the 3D graphics would be slow on this device. The content is the same.

Turn on 3D

Preparing the graphics. This can take a moment on the first visit.

Henry Lõiv

Web design & development

Quick Answer

Why is GA4 counting a page view twice in my SPA?

Development 2 min read

A common cause is overlapping automatic and manual page_view events. GA4 may measure a browser-history change while your router or Tag Manager sends another event for the same navigation. 12

Reproduce one navigation

Open DebugView and move between two application views. Compare events at the same moment and their page_location values. Test initial load, internal navigation and the browser’s back button separately. 1

List the sender for each event: the Google tag, enhanced measurement, a Tag Manager trigger or application code. Dividing the report total by two is not a fix for the configuration.

Give pageviews one owner

When measuring manually, avoid an overlapping automatic path. One important detail: send_page_view: false addresses the pageview sent by tag configuration; inspect browser-history measurement separately too. 2

Do not disable unrelated analytics or consent handling. Change the duplicate path and repeat the same test.

After the fix, each view you define as a virtual page should produce one correctly populated event with the right location and title. Decide whether a filter change is a new view or a separate interaction instead of letting two measurement systems make that decision independently.

This is a measurement check, not a reason to rewrite the entire application or assume that all high pageview counts are duplicates.

Related reading

Frontend development

Sources

  1. Google Analytics: measuring single-page applications
  2. Google Analytics: automatic and manual pageviews

Fact checked:

Let’s talk about your project

Tell me about your project

Tell me what you’d like to build or improve. You don’t need a finished brief — we’ll work out the scope and next steps together.

01 How can I help?
02 How many pages do you need?
03 Which extras do you need? Choose all that apply
04 When does it need to be ready?
05 Project details
06 Your contact details

Enquiry received

Thank you!

Your enquiry has been received. I usually reply by email within 2 working days.