case video fallback
Case Study

Peklo Tool for better
ad campaigns

Mad Devs developed parsing- and clusterisation-based software that
automates keyword grouping and text generation, making the launch
of contextual ads two times faster.

Peklo Tool is a service that simplifies and automates the process of creating contextual advertising campaigns for Google Ads and its Russian-language analogue Yandex Direct. We built it from scratch for Peklo Studio, a digital marketing agency.

Peklo Tool’s two major functions are:

  • Saving up dozens of working hours in digital marketing specialists’ time
  • Making contextual advertising campaigns measurably more effective

The needs that Peklo Tool meets

Launching contextual ads is a slow, routine, and highly repetitive activity. A marketer or entrepreneur spends days upon days dealing with hundreds of lines in several spreadsheets.

Tedious as it is, the process also features a high risk of errors. When it comes to processing large data arrays, humans are famously prone to mistakes. This work is better left to the reliable machines.

The Peklo Tool team’s effort was to develop an automation solution to speed up the launch of campaigns and rule out human error.

Who benefits from Peklo Tool

Digital marketing specialists
Promotion agencies

How Peklo Tool works

In digital marketing, “contextual advertising” refers to a method of targeting ads based on what content users access. Advertisers use keywords to make sure that the users who see certain ads can actually be interested in buying the product.

Here’s how Peklo Tool increases the efficacy of contextual advertising:

Algorithm

A unique algorithm (dictionary parsing + brute-force clasterisation) bundles keywords into logical groups, thus creating a structure for the future contextual advertising campaigns.

Algorithm

Semantics

Structured semantics allows Peklo Tool to generate more specific, targeted, and relevant texts for the ads.

Semantics

Texts

Narrower, more appealing texts ensure a higher click-through rate (CTR) and a lower cost per click (CPC).

Texts

Keyword grouping

The heart of Peklo Tool is a smart technology that groups keywords. Performed manually, grouping can take an overwhelmingly long time. It gets virtually unmanageable if a planned contextual advertising campaign uses thousands or tens of thousands of keywords, which they often do.

Keyword grouping

The “Appliance Repair” niche 379 keywords in 369 ad groups within 0.176 seconds

Automating the grouping process was challenging because human language was involved. All the possible spelling options (including typos) for keywords need to be considered. Normally, neural networks and natural language processing (NLP) technologies would be used to handle the linguistic variations. But with them, grouping would’ve been slow, so we found an alternative solution.

blockquote
Speed was a priority. We wanted to create a tool that could impress the user by grouping keywords instantly. By integrating the dictionaries, we achieved it. The grouping process takes Peklo Tool only a few seconds.

Oleg Katkov, Software engineer

Clusterisation algorithm

The clusterisation algorithm was the project’s main challenge and is now its main strength.
Here’s how it goes:

*The looping-over process is problematic for many reasons. First, human language is messy and hard to codify. Second, phrases can contain different word forms. We also needed to consider that words can be misspelled and typoed. Finally, the system needs to recognise synonyms.

Our first solution was to build parsers for extensive dictionaries having all possible word forms. Peklo Tool’s early version would load the dictionaries into RAM, but later, we switched to a database. The algorithm also uses thesauri and lists of typos and misspellings to interpret synonyms as one token and cluster them together.

In clusterisation, Peklo Tool’s early version used the Aho–Corasick algorithm to find matches.

Later on, we moved to a more brute-force algorithm:

  • Split a phrase into tokens
  • Loop over all other phrases
  • Split each of them into tokens
  • Count equal tokens (consider synonyms and prepositions)

It’s simpler, faster, and more cache-friendly than the Aho–Corasick algorithm. Most importantly, it’s sufficient for lists of keywords for a contextual advertising campaign.

Generation of ad texts

Another challenge was to automate the process of putting together different ad texts for each group of keywords. It’s an advanced combinatorial problem. We needed to implement an algorithm that would know how to write imperative sentences, what words to use in them, and how to connect those words.

No ready-made solutions were available anywhere on the Internet, so we built the algorithm from scratch using dynamic programming. It turned out to be quite efficient. It produces impressive results with little resources.

Oleg Katkov, Software engineer

After collecting keywords and having them automatically grouped by Peklo Tool, the user can feed a few unique selling propositions to the ad text generation feature.

Peklo Tool then creates hundreds of ad texts within seconds:

Generation of ad texts

The structure of a contextual advertising campaign for a car repair business. Ad texts have been generated automatically based on keyword groups and unique selling propositions.

Additional functions

Peklo Tool under the hood

Peklo Tool’s architecture features three main components:

Go Service for campaign generation

Go puts dictionaries in RAM, ensuring high speed of keyword processing

Go Service for campaign generation

Ruby on Rails for backend

it deals with business logic, data management, and admin functionality

Ruby on Rails for backend

Vue.js
for frontend

it provides the user interface for the service’s
clients

Vue.js <br> for frontend

Other components deal with payments, file and data storage, and load. Structurally, Peklo Tool’s architecture looks like this:

Peklo Tool’s architecture

Technology stack

  • Golang

    Golang

  • PostgreSQL

    PostgreSQL

  • Docker

    Docker

  • Gitlab

    Gitlab

  • Ruby

    Ruby

  • Vue.js

    Vue.js

Meet the team

  • Oleg Katkov

    Oleg Katkov

    Backend Developer

  • Pavel Kalashnikov

    Pavel Kalashnikov

    Full-Stack Developer

  • Meder Akkozov

    Meder Akkozov

    Backend Developer

  • Alisa Manakova

    Alisa Manakova

    Frontend Developer

  • Denis Grushkin

    Denis Grushkin

    Frontend Developer

  • Anton Grushkin

    Anton Grushkin

    Frontend Developer

  • Dmitrii Khalezin

    Dmitrii Khalezin

    DevOps Engineer

  • Vladimir Shebarshov

    Vladimir Shebarshov

    Frontend Developer

We don’t like the routine work that fellow digital marketing specialists have to do, so we’re happy to have created a solution for them. I’d like to thank our co-founders and partners at Mad Devs for this product. It lives, it works as intended, and it’s now bugless and supersmooth.
Roman Leonov

Roman Leonov

Founder of Peklo Studio & Peklo Tool