hydrogen icon indicating copy to clipboard operation
hydrogen copied to clipboard

[BUG] Analytics - PAGE_VIEW event is published when updating server props without navigating

Open nattyg93 opened this issue 3 years ago • 2 comments

Describe the bug When updating the server props and staying on the same route, the PAGE_VIEW event (and events added to publisheEventsOnNavigate) are being published.

To Reproduce

Clone and run this repo: https://github.com/nattyg93/shopify-hydrogen-analytics-bug

  1. Open the console
  2. Click the "Change server props" button
  3. Observe the VIEW_PAGE event is triggered each time the button is clicked

Expected behaviour The PAGE_VIEW should only trigger when navigating to a new page, rather than whenever server props are updated.

Additional context

  • Hydrogen version: 0.22.1
  • Node version: 0.16.4

nattyg93 avatar Jun 07 '22 00:06 nattyg93

This is still a problem in hydrogen 0.24.0.

nattyg93 avatar Jun 15 '22 05:06 nattyg93

Seems like we experience the same bug ;(

iliapir2 avatar Sep 09 '22 10:09 iliapir2