Buenos dias, amigos! This article is, for the most part, a compilation of common sense and already published posts from myTG channelAndpublic VK, I decided to put together all the information on such an important issue as reducing the number of invalid leads.
Let’s start with all sorts of tricks that need to be added directly to the landing pages code, and then we will smoothly move on to the server side, where I will show something new and quite promising.
As the play progresses, I also assume that you are collecting leads in yourtracker, and if the lead is invalid or duplicate,Notwrite it down in the status and don’t show the pixel to Facebook as a thank you. So, let’s go!
Preliminary steps
First of all, check all the data on your offer. In particular, we are interested in four things:
- Product form factor. If it’s a gel and you have tablets on your skin, then that’s bad. Always customize your promotional materials to the desired format!
- List of regions to which delivery is not available. If such a list is present on offer, be sure to take care of compiling a black orwhite-list of regions in the traffic source.
- Price — if you downloaded proclus from the spays, it is obvious that the price needs to be changed to the correct one, well! And highlight it in bold 100500 font.
- Targeting — be sure to check with the affiliate network manager who buys the goods better. Are they men or women? 25+ or 40+? Set only the required targeting in the traffic source, at least during the test stage. Then you can experiment and expand.
After all this, we proceed to the technical stuff.
Browser checks
Add Required
Let’s start with the basics! Each visible field on the landing page must have an attributerequired, which will not allow the user to submit an empty form. Typically, if you took a promo from affiliate network or merged it from a spy, this attribute is already there. But if you are doing something from scratch, be sure to install it.
Example:<input type="text" name="name" required/>
Add type=»tel» and «autocomplete»
Until now, we often encounter affiliate network, which instead of a specially invented field typetel usetext. Don’t do that! Typetelexists so that a user who visits your landing page from a mobile phone will see ONLY a numeric keypad, without letters. Which is much more convenient when dialing a number and leads to a reduction in the number of incorrectly entered numbers.
Example:<input type="tel" name="phone" required/>
But let’s better make it so that you don’t need to enter anything at all!? Look carefully at the screenshots. They show a regular order form with two fields: name and phone number. Do you see the difference?

Screen 1. There is a bunch of garbage in the name entry field in the drop-down hint menu.
Screen 2. The phone input field is also full of things I don’t understand.
Screen 3. The tooltip immediately shows me my name and phone number
Screen 4. Result of tapping on a hint: ALL fields are immediately filled with valid data!
So how can you get a hint like the one on the 3rd screen? It’s all in the attributeautocomplete. For a field with a name you need to enterautocomplete="name", and for the phoneautocomplete="tel".
Full code for all the above points:<input type="name" required autocomplete="name" name="name"/>
<input type="tel" required autocomplete="tel" name="phone"/>
Add the minlength attribute to the fields
Obviously, in addition to the fact thatall datain the form must be filled out, this data must also be of a certain length. For fieldNamethis is at least 3 characters, for phones — from 5 and higher, depending on the country.
To add a check for field length, you need to add an attribute to itminlength:
<input type="name" minlength="3" required name="name"/>
<input type="tel" minlength="5" required name="phone"/>
You can also check the length using the attributepattern, about which a little below.
Add pattern, mask and intlTypeNum library
Pattern
There are several ways to check what kind of crap the user entered into the form fields and prevent him from entering anything. And the first one will be a built-in HTML5 attributepattern, aka in Russian = template.
You can use it to check almost anything, for example:
- number of required characters — useful for the name field, so that you don’t enter, for example, 1 character and that’s it, or vice versa, so that you don’t write a whole poem in the field
- set of available characters — for name only letters, for phone, respectively, only numbers
And here’s what it will look like in code:
- Example for a field
name: make its length from two to twenty characters and allow you to enter only Latin letters and spaces. Any values less than or greater than these will result in the form not being submitted.<input type="text" name="name" pattern="^[A-Z a-z]{2,20}$"/> - Example for a field
phone: We allow you to enter only numbers and make the length exactly 9 characters.<input type="tel" name="phone" pattern="^d{9}$"/>
“So what are these strange symbols inside the template?” you ask. “All these slashes, parentheses, etc.?” And I will answer you with pleasure: “This is calledregular expression. Any more or less advanced technician should know and be able to do them, they have great power!”? If you are a techie, then find yourself a textbook or read a couple of articles on the Internet, and you will quickly understand that regular patterns are a must-have.
Masks
For those who don’t want to bother with regular expressions, there is a simpler option: checking numbers using masks. A mask is the same template, but written in a much more understandable language. Masks always mean connecting a third-party js library to your landing page; there are no built-in ones.
Masks are written differently in different libraries, we will consider the option forthe most popular of them is InputMask.
For example, for Russian Federation numbers you need to write the following construction:+7-999-999-99-99
Why is this so? Because in InputMask nine means ANY number. And in order for the first nine itself to be exactly the number 9, and not just any other one, we put a slash in front of it. In general, you don’t need to know anything else about the format.
An example of code that will set the above mask for all fields with type tel:you will find it here.
LibPhoneNum
An excellent solution to the problem of checking the validity of numbers from the great and terrible Google Inc.I wrote about him (and about masks) in detail here, let’s not repeat ourselves.
Checking the landing speed viaproxyGEO
The thing is this: if yourtrackeris located somewhere far, far from the GEO to which you are sending traffic, then when the user clicks on the “Order” button, his browser will have to wait a long time until the request reaches the application processing script. Sometimes it’s a couple of seconds, or maybe 5-8 seconds. All this time, an impatient lover of pussy creams can press the wonderful button in a frenzy. And thus increase the amount of trash.
If you logged in withproxydesired GEO and saw the problem described above, then you have 3 solutions:
- Transfer yourtrackerto a server from which this GEO loads much faster. The solution is radical, but if you work closely with the selected region, and the rest are on the side, then it really has a place to be.
- Host landing page somewhere nearby with the desired GEO, andtrackerconnect to it via API. The solution is simpler, but still requires fiddling with setting up the API + on top of everything, the script for sending leads should also be onhostingGEO, which complicates the process of managing even a large number of landing pages.
- See next point?
Add a script that removes the “Order” button
The idea for the script was outlinedon Adam’s channel, in short, the essence is this: when the user clicks on the “Order” button, the button disappears and instead the text appears: “Please wait, the application is being sent.”

Thus, while the lead is being sent to affiliate network and “Thank you” is being loaded, the user cannot generate a dozen more leads.
The script itself in the form of a macro for Keitarolies here, if you want a pure JS version, take it from the author.
Server checks
Let’s move on smoothly to the part where you will need to know PHP. Checking leads on the server is much more fun than in the client’s browser. Why? It’s simple: if a user really wants to cheat, but we don’t give it to him and show him exactly what he did wrong, then rest assured, he will select the necessary phone mask, fill in the name completely, in short, he will do everything so that the lead goes to affiliate network. Do you need this? Definitely not for me. Therefore, we add checks on the server and, if something goes wrong, a redirect to a naked thank you without a pixel, without recording the lead in the databasetrackerand without sending to affiliate network. And the user will not know anything about this, let him sit and poke buttons in vain. Easy!
Add cookies with phone number
The bottom line is this: for each application submitted, a cookie is written to the user’s browser, which stores the phone number that he entered into the form. If he tries to send the same number again, we do not send the lead to the message and do not show the pixel on the “Thank you” page. In general, you can do the same with a name.
Add cookies with the number of requests
The idea is similar to the previous one, but only this time we will add a cookie to the user, which counts how many requests he left. If there are more than two (and he should be allowed to leave the second one, because he could have plugged it and left an incorrect number), then we do not send the lead to affiliate network and display the “Thank you” page without the Facebook pixel.
Here’s the code from my Keitaro that does the two checks above:

Processing the results of sending a lead to affiliate network
This may come as a surprise to you, but quite a few affiliate programs will tell you immediately after you send them a lead whether it is valid or not. Here are examples of what it looks like?



One problem: different affiliate network have different response formats, you’ll have to dig into the affiliate programs docks and figure out what’s what. But then, immediately after sending the lead, you will be able to receive a response, parse it and understand whether it’s worth recording the lead intracker?
Here’s how I do it: there is a common class for the abstract entity “Affiliate”, classes for each PP are inherited from it and the response parsing method is overridden. Type:

We check the lead against the general list of leads
If you use anytracker(for example, Keitaro) and save user names and phone numbers in it, then you can do the following thing: as soon as someone leaves a new lead, you take the lead’s data and check it against your database. In general, checking the number will be enough: if the number is already intracker, then why do we need another one like this?
To implement something similar in Keitaro, check the docs for the methodconversions/log+ don’t forget to sample only for today, so as not to overloadtracker. Well, make sure that your check does not take a lot of time; for this, first get a goodhosting.
Hereexemplarycode where my phone number is stored in the tagsub_id_15:

Checking phone numbers
The last number of our program will be, oddly enough, the same aforementioned library from Google — LibPhoneNumber. But this time we will use its PHP implementation.Here is the demo site, where you can play with it, there is also a link to the repository on Github.
Well, the check itself is very simple: we indicate the country and number, and the library tells you whether it is correct in its opinion or not.

CAUTION:Do not implement this method thoughtlessly, otherwise you may lose normal leads. For example, according to my tests, this library works quite well with European numbers, but rather mediocrely identifies numbers from Latam, say, from Chile. Therefore, before using it to its fullest, implement it simply in the form of logging — write down what she thinks about your traffic, and then take all the leads that are invalid from her point of view and check them againsttracker!!
Resume
Phew, looks like that’s all! It is not at all necessary to implement all of the above solutions. Firstly, in different GEOs there are different numbers of people who like to click the “Order” button 20 times, in Europe there are fewer, in Africa an order of magnitude more. And secondly, the user has the opportunity to leave ONE repeat requestshould be: Did he make a mistake and enter the wrong phone number? To do this, by the way, it’s a good idea to display the phone number and name on the “Thank you” page so that the user can see what he typed there. Therefore, start small, and only if you are completely bullied by these fraudsters, start implementing everything?
It seems that I didn’t forget to tell you anything, but if, suddenly, you know of other good ways to reduce trash, then welcome to comments, let’s add to the list together!
Was Yellow Web with you, give us a plus and see you soon?️



Привет!)
Подскажи пожалуйста, пункт «Добавляем куки с кол-вом заявок» — куда и как в кейтаро его закидывать?
Пытался загуглить, смотрел мануалы у них на сайте но так и не нашел.
Вам нужно нанять фрилансера-технаря, объяснить ему задачу или дать ссылку на статью и сказать, какой пункт сделать. Насчёт куки: грубо говоря — в скрипте отправки лидов должен быть код, который ставит юзеру куки, что он отправлял заявку, а также проверяет, что если такая куки есть — то не отправлять повторную заявку.