The number of people viewing the article is thus a complete fabrication. The code simply generates a random number every five seconds. This makes it appear as though people are constantly browsing the website, making it seem lively and busy. It’s probably supposed to make the website look more trustworthy, as many other people appear to be browsing. It can also encourage customers to checkout as quickly as possible, as the product they are interested in might be in high demand.
I wonder how common this practice is. I understand where it comes from: the desire to have the economic power that comes from having a product or service the market really wants + not actually having that kind of product/service and + being willing to lie and manipulate people to compensate for this lack.
I just think it makes life harder for the honest among us because it feeds an atmosphere of distrust. The median e-commerce shopper isn't going to inspect website code as part of checking out a vendor, but it also doesn't take many years for the median shopper to get wise to shitty behavior.