Page views during current user session

I’ve looked at wix-site API, but don’t see that a user’s loading of new pages on the site can be tracked with code in the masterPage.js. I’d like to have an “on-change” type function that would increment a “page-views counter” for the individual user during a session on the site. (After a specified number of page views, a lightbox interaction is triggered.)

This can be done with wix-storage code on each separate page, but accomplishing this on the masterPage.js obviously would have advantages where there are a large number of pages.

Hope someone knowledgeable about single-page applications and the functioning of the masterPage.js can clarify this matter.


How about using Wix data to save/update visitor/member’s page view count? Everytime user reload, navigate, send it to Wix data with a visitor/member ID.

There are various ways to capture or store the “page load” information. The question instead, however, is how the “page load” can be identified in masterPage.js and used as an event trigger for the current user.