📜 ⬆️ ⬇️

Managed random and gamification of an online store

In the spring of this year, I graduated from the Gamification course on Coursera. I can’t say that I became a fan of this business - well, I don’t see any reason to stick games wherever I want. But, as the owner of my online store that has been operating for 4 years, I became very interested in the topic of using gamification in e-commerce projects.



I looked through the 3 pages of search results for the query “e-commerce gamification” and when I saw only miserable leaderboards with badges and points, I realized that I had to start work. The idea of ​​a huge project that has no equal in the market appeared in my head, but because of the novelty of the gaming approach to sales, it was decided to build a regular online store with game mechanics, and only if successful, start working on a big idea.
')
I just couldn't get to work like this. My programmer skills stopped developing after leaving the institute in the second year 10 years ago, and my knowledge was limited to understanding the simplest php formulations in the depths of my beloved OpenCart. Taking advantage of the decline in sales of equipment in the summer in my store, I delved into going through all the available courses on codecademy.com. Passed all that was in 3 weeks and spent another week on free courses on CCS3 and jQuery at codeschool.com. I understood that I did not become a programmer, but I achieved my goal - now I could easily read someone else’s code and write my own simple one.

The lottery game seemed to me much more interesting than the usual accrual of points for purchases and as the main idea I chose a pseudo-randomly controlled generation of prices in specified ranges and a given frequency of appearance. The generator was written in php, and its algorithm was extremely simple, although I have never met it anywhere (most likely because of my inexperience).



The generator gave out the price in a given large range. This range was conventionally divided into N separate ranges of a smaller size, each of which was assigned a counter to account for the number of operations, as well as the administrator-defined part of the mark-up and the required frequency of occurrence of such prices. The more subranges, the smoother the generator. But 8 ranges were enough for me to cover 3 types of unprofitable prices, 1 close to zero earnings and 4 prices with various positive margins. After issuing the price in the general range, the generator determines to which of the ranges it belongs and checks the frequency of occurrence for this type of prices. If there are no more than they are needed, it gives a price to the user, and adjusts the counters. Otherwise, the price is generated again. Such a "stupid" approach allowed predicting the appearance of prices with extremely high probability and using it in the future.

Later, the simplest model was built and tested directly in TextMate. The search for partners and employees is a separate big topic, while I’ll leave it out. It turned out that the whole project of the “gamified” store we created together with my friend, we had to deal with the development and launch alone.

CMS OpenCart was chosen as the framework. It is very simple in structure, it corresponds to the MVC pattern convenient for a beginner, and it works quite quickly even with relatively large loads. The project of a random price generator for opencart was named bounce internally and work began in early June. I was engaged in the server part, and my partner did the landing page, pop-up windows and a jumping button. To create the OpenCart module, DIYModuleStarter was loaded - the Opencart extension frame was ready, all settings were placed in the admin panel, and the front part was built into the product page template.



Later, a collection of statistics was written for each game click on the site visitors and its output was organized in the administrative panel. Organized to save the last displayed to this user prices for this product for half an hour. At the entrance to the site made the assignment of user ID to his clicks in the statistics, made even before the entrance. Then they added order processing with the quantity of goods more than one, quick entry to the site, simplified registration and checkout.

September 1, we launched the beta version, or rather its first version. The price changed when the user clicked, everything worked smoothly, the friends we showed the beta liked. But it was somehow unclear what to do. There was no win-state - a clear winning situation for the user, the state to which he should aspire, the very meaning of the game. How does the buyer know that he won or that we can win at all?

In two weeks we made 3 serious pivots. The main thing was the choice of profitability in favor of attendance and the number of clicks, instead of profit from each sale. As a consequence of the first, we decided to sometimes sell the goods not only at the “input” price, but also at a loss, at the expense of a portion of the profit from profitable sales. The last difficult, but very correct decision was the introduction of the Skidkometra. In gamification, this is called feedback - game elements that provide the player with a response. Our scale shows the level of markup with each click of the user and clearly tells him about the receipt of a special price.



Not much about the business model. I believe in advertising and its ability to provide any mass product. Whether it is Kindle or free WiFi point, online cinema or television. Everything popular and the “first” lives by advertising the new and later. So I chose the advertising business model for my online store. I know how difficult and expensive it is to attract every customer and decided to try to spend this money on dumping in a game form, mostly at the expense of suppliers. More precisely, due to the special conditions on which we buy and sell goods. In return, partners will receive advertising, attracting people to their pages on social networks and buyers of positions that are not represented on our gaming site. A fixed fee for placing goods on the site was not planned to take. Again, this store is just a way to test ideas, so the plans did not include making a profit. And so that a non-profitable project did not take too much time and effort, it was decided to limit the range of all hundreds of goods.

We decided on everything, it seemed that everything was already very clear, but because of the novelty of the idea, users asked, in our opinion, absolutely stupid questions. "I will win the price, buy the product and it will disappear from the site?", "I went to the main, everything is like the others, left ...", "How to buy goods at the won price? Need to call and name the number on the screen? ". Thus, the final touch was the addition of interactive CSS-tips with the first 5 clicks on the price tag and the transformation of the “dead” price tag on the main one into the active one.

Yesterday, after the publication of the press release, we faced the first wave of visitors and the first problems. Due to incorrect accounting of the store's earnings, the generator began to issue prices “in the negative”, without paying attention to the balance balance. One additional check solved the problem, but for two clients who did not receive the goods for 10% of the cost, the sediment clearly remained. Then we faced resetting counters due to simultaneous writing and reading in the SQL database. This post on locks on Habré really helped, although it was enough only for the most active tables to change the engine to InnoDB.

I did not elaborate on each of the stages of creating the site, because it will be difficult for most of you to find something new there. I do not give a link to the site, because I want to leave this entry in the “Electronic Commerce” hub, and not “I am promoting”. I wanted to share the simplest, but very effective algorithm of a pseudo-random number generator and draw attention to the topic of Gamification. The prospects for its use in ecommerce are enormous. I will gladly answer all the questions in the comments.

Source: https://habr.com/ru/post/296974/


All Articles