3 ms·
> In the end I wrote many of that stuff my own with real data If you implemented the "looking at" functionality, are you keeping a connection open to the clien
by egeozcan 5y ago
> In the end I wrote many of that stuff my own with real data
If you implemented the "looking at" functionality, are you keeping a connection open to the client (say, via WS) to determine if they are still looking as in keeping the tab open (or opencv with camera access to see that they are "actually" looking hehe), or are you just looking a few minutes back instead of hours?
How would one honestly implement this feature anyway?
- kamray23 5y agoNaively without thinking about it. Session Id, setInterval sending a ping every few seconds, clear the id if the ping fails to arrive. Smooth it by taking an average or sum over anywhere between a few minutes to a few days, depending on what you're selling. Some things take more thought and as such those numbers can be quite a bit higher. There's no need to put any more thought in than that. It's a single design element, and you're not doing a scientific study or collecting marketing data here. This is fine.
- qw 5y agoIf 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.
- herbst 5y agoI didn't. I don't think this feature would reflect reality at all, or rather reality wouldn't sell. I have a few hundred products and a few hundred daily visitors, so I am far from big enough to get some relevant numbers there :) I would go for the minutes if I were big enough, or maybe a 1 hour time frame. However I opted for other signals that better reflect reality like 'bought X times in the last X days' or 'product is in X wishlists' or 'this product is trending within our visitors' IMO same effect, but honest and suitable for my size :)
- techcode 5y agoThat's really good thinking - and both wishlist and "bought x times" are nice representation of the real world "social proof" where you're walking next to a store or bakery and see a long queue of people waiting to enter and making you notice they are selling something good/cheap/etc. Generally going from those towards the "X other people are considering it", and even further towards "only X left" (on their own, and especially both in combination) puts you more towards different effect of "scarcity". And that's what seems to be more polarizing with people. Besides majority of people not noticing/caring/etc ("bell curve"). Two opposite camps are where one is really not liking it (especially when they think it's not real and just fake scarcity) and vocal about it. Meanwhile on the other end are people finding it valuable info to know, and they tend to be much less vocal. (Which, yeah - is actually same with just about everything else) Those that find it valuable seem to be people that want specific things. Not just specific apartment/hotel, but also think of cases like parents with school age kids being limited to specific dates due to school holidays or things of that nature.