BotFlamingoBeta
← Blog

A jewelry store, its bots and the server container bill

A flamingo spreads one wing like a shield and knocks a small bot away.

On October 13, the sessions that GA4 recorded for an Italian jewelry e-commerce store stopped looking like a store’s traffic. From that date the daily count moved between 13,000 and 45,000.

When we broke the last 30 days down by country, the source was hard to miss. Singapore had produced 355,845 sessions, with an average duration of 5.6 seconds and not a single order. Italy, where the store is based, had produced 118,361. In other words, a country with zero orders was sending almost exactly three sessions for every Italian one.

We work at Tillde, the agency that makes BotFlamingo, and this case comes from our working notes for October and November. The bots were real, and stopping them worked, but they turned out to be a small part of what the store was paying for on its server container.

The server container was counting the bots too

The store sends its tracking through a server container hosted on Stape, which counts every request it receives and sizes its plans by that count (we explained the mechanism in the article on server-side tracking and bots). A bot that runs the site’s tags sends requests like a visitor does, so the spike in GA4 showed up on the container as well.

The billing period running from October 21 to November 21 had reached 10.4 million requests by its halfway point. The entire previous period had used 6.6 million. The store’s plan, Business, includes 5 million a month, which means the allowance was gone before the month was half over. By the time we finished the analysis the counter stood at 12.58 million, on track for about 16.5 million.

The bots were headless browsers behind residential proxies

We pulled 10,800 requests from the container’s logs, covering November 6 to 9. Of these, 9.7% came from HeadlessChrome, the version of Chrome that runs without a screen and is driven by a program, which is a common way to build a bot that executes JavaScript.

These requests came from 285 different IP addresses. Nearly all of them were residential proxies in Latin America, Africa and Asia, meaning addresses of ordinary home connections that relay someone else’s traffic. Most of the activity fell between 11 p.m. and 5 a.m. The GA4 hits declared the region SG, for Singapore, even though the IP addresses were on other continents. Put another way, the Singapore in the report was a value the bot carried with it, while the requests themselves came from somewhere else.

Stape’s Bot Detection, which scores requests inside the container, didn’t flag them.

A list of countries wouldn’t have stopped them

The obvious response to 355,845 sessions from Singapore is to block Singapore. Here it would have done very little. The word that matters in “sessions from Singapore” is “from,” and the traffic wasn’t coming from there. The region was a field in the hit, and the IP addresses behind it changed continent from one request to the next. A rule built on countries would have spent its time chasing those addresses around the world.

A square screen gave the bot away

On November 9 we switched on the filter Tillde had built for its clients, the one BotFlamingo grew out of. Like BotFlamingo, it decides whether GTM starts at all, so a visit it stops sends nothing to GA4, to the ad platforms or to the server container.

The bot behind the square screen took some care to look human. It presented itself as Chrome 145 on a Mac, it hid the webdriver flag that automated browsers normally expose, and it used a different IP address on almost every request. Taken one field at a time, it was an ordinary visitor.

What it didn’t change was the rest of its fingerprint. Every one of its hits reported a screen of 1366 by 1366 pixels, the language en-us and the region SG. We found that combination in 769 hits out of 769, and in none from a real visitor. Laptops are wider than they are tall and phones are taller than they are wide, so a perfectly square screen of that size says more about the program than about the device. We added a rule that blocks square screens of at least 1,000 pixels.

The filter removed the bots and kept the customers

To measure the effect we compared about 40,000 lines of logs from November 5 to 12, a stretch with the filter’s start in the middle. On the days before, HeadlessChrome, the 1366x1366 screen and the SG region accounted for between 3% and 10% of the requests. Afterwards they accounted for between 0 and 0.5%. The requests that Stape itself marks as bots fell from 2.5–10% to 0.1–0.3%.

A filter that removes bots can remove customers too, and the only reliable check is to look at the people who buy. Meta gave us the cleanest comparison, because spending stayed about the same, roughly €2,900 a day before and €2,800 after. Purchases recorded by the pixel went from 37.8 a day to 38.3, and link clicks from 6,000 to 6,700. Slightly less money produced slightly more purchases. As far as purchases can show it, the filter wasn’t turning real customers away.

The bots had reached Meta as well. From September 21, the pixel’s PageView and ViewContent events tripled, and the same happened on another store of the same group in the same weeks. We can’t separate the bots’ share of that jump from other causes, so we take it only as a sign that the traffic was getting through to the ad platforms, and not only into GA4.

The filter alone was worth 11% of the requests

With the bots gone, requests to the server container fell from about 646,000 a day to about 572,000. That’s a drop of 11%.

The size of that drop is easier to judge over a month. At the old rate, 646,000 requests a day for 30 days come to about 19.4 million, close to four times the 5 million in the plan. The filter removed 74,000 requests a day, which over 30 days is about 2.2 million. What remained, 572,000 a day, still works out to about 17.2 million a month, more than three times the allowance. The bots had been a real cost, but most of the bill had another cause. (We make a product that filters bots, so we would have preferred them to be the whole story.)

When we looked at what the remaining requests actually were, between 68% and 72% turned out to be calls to write cookies, the set_cookie requests, about four for every GA4 hit. A single page view was costing the container 20 requests, and 14.8 of them were set_cookie.

The cause was the order of the tags in the server container. Once we corrected it, set_cookie requests per page view fell from 14.8 to 0.8, and total requests per page view went from 20 to 6.4, about a third of what they had been.

At the new rate the store sends about 171,000 requests a day, which over 30 days is about 5.1 million. The month goes from roughly 19.4 million requests to roughly 5.1 million. Of the 14 million or so that disappeared, the filter accounts for 2.2 million and the corrected tag order for the other 12. Even so, the total still sits just above the 5 million in the plan.

Two patterns and some cuts are still open

The filter doesn’t catch everything yet. After it went live, 7.1% of GA4 hits came from Chrome on Windows reporting screen resolutions typical of a MacBook, an odd combination for a real computer, and none of those hits came from Italy. There is also traffic from the IP addresses of a Spanish data center. We proposed both as rules to try first in a mode that only records, so that we can see what they would catch before they block anything.

BotFlamingo, our product, follows the same caution. Every project starts in report mode, where GTM runs normally, nothing is blocked and the panel shows how many sessions were flagged as bots. It shares the filter’s limits too, since a bot with a new fingerprint gets through until the analysis, which runs once a day, notices it.

The bill has room to shrink further. The bots still getting through make up about 7% of the requests, and measurement events the store doesn’t need make up about 15%. Neither cut has been made yet.

The case left us with lessons we now apply. A bot is recognized by its fingerprint, the combination of screen, language and region it carries from one IP address to the next, rather than by the country it claims. And on a server container the bots are only one line of the bill.

BotFlamingo is in beta, and the beta page explains how to join.