How gambling sweepstakes helped a company retain audience engagement and increase ad revenue

How gambling sweepstakes helped a company retain audience engagement and increase ad revenue

In brief

  • 01

    American company that makes money selling ad traffic

  • 02

    To develop a site with the mechanics of a game sweepstakes, which will hold the attention of users for hours, collect their contacts, and motivate them to take actions from advertising

  • 03
    Business tasks
    • Provide the opportunity to earn money on ad impressions, leads, and actions
    • Select the mechanism of profit management
  • 04
    • Added 4 types of games
    • Created a game design
    • Developed a mechanism for setting the volume and probability of wins
    • 6 months total development time

The company makes money by selling ads

An American company makes money selling advertising. The company enters contracts with advertisers and provides them with high numbers of views, the implementation of targeted actions, or the collection of user contacts. For example, a shoe manufacturer has launched a new sneaker and wants to be known to as many people as possible. The company promises that the ad for the sneaker will be seen by 10,000 people within a month. When this happens, the shoe manufacturer pays a commission to the company.

The company chooses the methods of displaying advertising on its own: it buys advertising space on platforms, and launches applications and games. The company’s task is to do everything it can so that as many people as possible enter their contact information, see a banner, or perform a targeted action, such as: fill out an online form, install an application, or go to the advertiser’s website.

Problem: Users ignore ads, and the company loses money

  1. To receive a fee for leads, a company must provide advertisers with user contact information: name, phone number, email, and address. If a person isn’t interested in the content of the site, they won’t register or provide their data.
  2. To receive a viewing fee, the company must submit a report to advertisers: how many people watched the videos and banners, and for how long they did so. If a person ignores an ad banner immediately, without looking at it for even a couple of seconds, the view is not considered successful.
  3. To receive a fee for an action, the company must incentivize users to complete an action. People are reluctant to agree to download third-party applications or install browser extensions if they won’t receive additional benefits for doing so.

Solution: develop a website with tote mechanics to captivate users

In order to attract visitors and increase the viewing time of commercials and the number of advertising actions, the company decided to make a site with the mechanics of a sweepstakes game. Users register, play simple games like slot machines or instant lotteries for free, and receive game currency — tokens. These tokens can be spent on participation in draws for real prizes: cash, equipment, and travel.

The user erases the windows in the instant lottery and simultaneously watches ads

With games, excitement, and prizes, people spend hours on the site, and come back to it again and again, with the company receiving money for advertising. At the same time, it’s important not only to make money, but also to maintain a balance between advertising income and expenditures for prizes. To solve these problems the company turned to OrbitSoft.

What business problems needed to be solved

TaskWhat we didPros for the company
Hold customer for as long as possible— Made interesting games and pranks, a bright interface, and attractive descriptions. People want to stay on the site and keep playing.
— Made navigation clearer: the information the customer needs is now easier to find.
— Made sure the advertising doesn’t annoy users, such that it doesn’t cover site elements, and appears during pauses, for example, while waiting for lottery results.
The more time a user spends on the site, the more money the company earns from showing ads, such as banners, videos, and pre-rolls (CPM)
Collect user contacts— The chance to win valuable prizes motivates users to register on the site — they enter their contact information themselves.
— There's also a simplified registration via Facebook or Google. In this case, the information remains with said services. We designed a mechanism that retrieves the contacts from there.
The company receives payments from advertisers for user contacts (CPL)
Encourage users to take actions from adsHonest prize-giving mechanisms fuel excitement: users know that there’s a real chance to win. And to compete for the super prize, they need to participate in the mega-lottery. This requires special mega tokens. These can be obtained for advertising actions, such as filling out an online form, or installing a third-party application or browser extension.The company gets paid for user actions (CPA)
Create a profit management mechanismAdded a control panel for the number of tokens that users receive in games. There are exactly the right number to be enough to participate in the current distribution of prizes.The company adjusts the probability of winning and the number of tokens so as to ensure a profit for itself, given how much money is generated by advertising, and how much of it is spent on prizes.
Advertising doesn’t interfere: for example, it appears while waiting for lottery results

We planned the work on the website in three stages:

  1. Discussion of details: we agreed on terms of reference, and discussed the goals of the project.
  2. Design and development: we studied competitors, planned the workings of the site, came up with a design, developed and connected all the elements of the site, added game mechanics, and connected an Ad Server.
  3. Testing and launch: created and ran tests, and installed the system on the customer’s servers.

Here we’ll explain in detail regarding each stage:

Stages of work on the site

Stage 1. Discussion of details

The customer sent us the technical assignment. We had a phone meeting where we discussed how we plan to organize the work, how the site should look and work, and so on.

Site logic for users from the customer’s technical specifications

The customer described what pages should be on the site, and what information should be on each page. They specified the starting categories for the games: Slot Machines, Instant Win Lotteries, and Scratch Off Games.

The customer described their technical wishes:

  • Provide technical specification before starting work
  • Ensure the security of the system, and develop for future scaling
  • Use caching, HTTPS, Cloudflare/StackPath cache
  • We agreed the server side would be developed with PHP, using Java API

Stage 2. Design and development

Before starting work, we analyzed the customer’s competitors. We looked at American sites with sweepstakes mechanics, and took visual references for design development. An important task was to study game mechanisms: our developers played sweepstakes for a couple of days, analyzing game patterns and probabilities.

Our developers analyzed the probabilities of winning combinations using slot machines, and the number of tokens that the player receives in such cases.

Next, we moved on to designing the site. We:

  • Developed an algorithm for determining winners and distributing tokens
  • Built the architecture of the project, and the back-end system of API calls
  • Described the tools that we would use
  • Developed a graphic design style set: management styles, logo, color scheme, etc.
Developed game designs and descriptions for them

We proposed to the customer purchasing ready-made game mechanics. It’s much faster and cheaper than developing mechanics from scratch. We needed only buy ZIP archives with code, integrate this code into the site, and add our own design to the games. This allowed us to expand the starting set of mechanics:

  • Slot machines
  • Games with erasing windows
  • Black Jack
  • Horse racing
  • Roulette

System components and tools

Based on the design results, we prepared a clear, visual presentation for our customer:

  • Described the roles of site users: visitors, advertisers, administrators
  • Showed the components of the future system, their functions, and interaction
  • Explained the choice of technologies and game mechanics

The site is divided into components. Each of them performs its own function and is packaged in a container using Docker technology. Components interact with each other via REST API and specialized protocols:

  • Front-end with Angular — User interface for visitors and administrators.
  • Back-end with Symfony — Server side of the system: Calculates the logic of winnings and accruals of tokens
  • OrbitSoft Ad Server — OrbitSoft software product. Manages advertisers, campaigns and ads.
  • Statistics and analytics in PHP — Processing of data on the accrual and withdrawal of tokens
  • Percona MySQL Database — Storage of user panels, history of accrual and withdrawal of tokens, results of draws.
  • NoSQL-storage Aerospike — Storage of token balances.
  • Backup — Periodic copying of all system data.
  • Monitoring — Continuous performance testing of all components, and notifying technical staff of problems.
  • Load Balancer — Balancing of incoming traffic.

We chose Angular 7 and Symphony bundle because OrbitSoft has an established, experienced team of developers who work with these frameworks. We used Orbit Ad Server, our own product, as an ad server. It helps advertisers and publishers place ads. It stores ads materials in a database and broadcasts them to sites in accordance with the requests of the advertising network. Ad server works with any ad format, and offers convenient tools: campaign planning, targeting, performance metrics calculation, and ad budget management.

Development and feedback

After agreeing on the project, we started developing. We:

  • Developed modules for all system components
  • Added graphic design
  • Checked and debugged the system on test servers
  • Performed integration with Orbit Ad Server, and configured ad placements in the user interface

The customer wanted to expand the system in the future. To do this, we applied clustering, and created a game constructor. We:

  • Combined several servers into a single cluster. The server cluster works as a whole, but physically there are many servers. The failure of one of one of the servers will NOT lead to the failure of the entire system. In the future, the customer will be able to connect more servers to the cluster, scaling the system.
  • Added a constructor on the admin panel of the site, with the help of which you can create new games according to the existing game mechanics. The customer will be able to do this on his or her own, including the mechanics that are currently loaded on the site, but are not active: black jack, horse racing, and roulette.
In the constructor you can enter a name, a description of the game, and upload a background image

The customer asked to ensure the safety of data, and protection from hacking:

  • We used HashiCorp Vault as the tool for storing secret information: passwords, logins, and keys. If the program code contains no secrets, then it’s impossible to get them and hack the site. Attackers will not be able to hack the system and steal passwords or money.
  • The algorithm selects the winners in the draws at random. All calculations are performed on the server side. The results cannot be influenced by either users or an administrator.

In the process of working on the project, we answered in detail all the customers questions, and assisted with solutions to emerging problems.

Here we answer why a customer stopped running the demo environment, and how to solve the problem

Stage 3. Testing and launch

The first version of the site was ready in 6 months. Having seen the site, the customer decided to add new functions. With approvals and improvements, the project took a total of 9 months.

The site is completely ready: we conducted functional and load tests, installed the system on the customer’s servers, and launched it. Commercial launch is scheduled for 2022, pending the customer coordinating legal issues and obtaining permits.

Site administration

The customer manages the site through the admin panel. It has sections for viewing statistics of visits, managing site pages, and an advertising ads block for moderating advertisements

The key section of the panel is game categories. Here the administrator manages the games: changes the appearance, removes old games, and creates new ones based on the game mechanics we have loaded. To do this, the admin opens the constructor, enters the name and description of the game, adds a background picture, selects prices, and sets the probability and number of winning tokens.

Visitors must receive tokens and win real prizes to maintain interest. At the same time, the company’s income from advertising must exceed the cost of prizes for the company to make a profit. The administrator takes financial information from the report of the advertising platform. For example: yesterday there were 100 thousand ad impressions, each thousand impressions costs $ 3, so the company earned $ 300 on advertising. From this, the company takes $ 150 as profit, and spends another $ 50 on operating expenses. The remaining $ 100 goes to prizes.

Administrator assigns prizes for the drawings

Next, the administrator looks at the site statistics: the number of visitors, victories, and token drawings. A mathematical model is defined that will allow users to participate in prize drawing auctions. For each prize combination, it sets the probability coefficient of it occurring, and the number of tokens that the player will receive. To apply to participate in the drawing for the backpack, the user needs to spend 1000 tokens. The more applications, the more chances of winning.

The combination 666 will drop out on the slot machine with a probability of 0.0002, whereupon the player will receive 200 tokens

So far, this mechanism has been implemented in manual mode for testing and debugging. After the official launch of the project, we’ll set up automatic calculation of coefficients.


  • We released the first version of the site in just 6 months
  • We added four options for exciting games and lotteries, with the ability to connect new mechanics in the future.
  • We created a constructor so that the customer can create games based on these mechanics.
  • We added a mechanism that collects user contacts when logging in through Facebook and Google.
  • We developed a motivational scheme for connecting pay-per-action advertising.
  • We developed a mechanism for automatic adjustment of the probability of winning depending on the effectiveness of advertising.
  • We provided data security and scalability.
This is what the main page looks like for registered users.

Tech block

  • Front-end on Angular 7
  • Back-end on Symfony
  • Orbit Ad Server
  • Databases: Oracle MySQL, NoSQL Aerospike, Click House, and Mongo.
  • HashiCorp Consul, Vault
  • Gliderlabs Registrator
  • Graylog
  • Elasticsearch
  • Redis
  • Kafka

Whatever your needs, we can help!

Tell us what problems you’re facing with your business. We look forward to hearing from you.

Получите ответ по смс

Ваше сообщение успешно отправлено!
Представьтесь пожалуйста
Укажите номер, на который придет ответ
Нажимая на кнопку, вы даете согласие
на обработку персональных данных.