3 ms·
If you have real time analytics, you probably have a way to count visits to that page in the last X minutes. If I was a visitor, that number would be good enoug
by qw 5y ago
If you have real time analytics, you probably have a way to count visits to that page in the last X minutes. If I was a visitor, that number would be good enough for me. If the site also made it clear that it was not an exact number, it would of course be even better ("10 to 20" or similar)
- techcode 5y agoFor smaller websites the "send ping every X seconds", and/or combo of that with "onLoad do +1, onUnload do -1" might work. Though for really big websites - with millions of users making requests to 1000s of web/api servers spread across DCs in different continents ... It's indeed a variant of what you said. Analytics can give you confidence to say that X percentile of people spend at least Z seconds/minutes on given page. So you can use initial request + TTL value of Z. --- PS All of the above is at least order of magnitude (if not even bigger) more complex when your page is not simply one physical product, and instead you've got "product x between Start and End dates" since that's millions of products x millions of combinations.