How to count events (page viewed) only once per session

Hi. So we are using Matomo events in our code to track our page views. Each time a page is loaded, the event count goes up once. However, users often press Back/Forward multiple times, and the view counts end up way higher than they should be. This is particularly troublesome when they repeatedly visit the ‘Thank-You’ page, which shows up after making a purchase. Our purchases count in Matomo goes up every time they revisit the page, even though they are not actually making multiple purchases.

Is there a way we can make each page visit event only go up once per user session? This is possible in Goals (see screenshot), but how can we do it for Events?

In e-commerce-like websites, it is possible to identify a page has expired or not.
I think you should use the same kind of mechanism to track the page view…
Other solution, if you just want to count only one page view per visit session, you could use a cookie (session life-time) to store the list of viewed pages, and send the tracking if the page has not already been voewed…

1 Like