ST
Predictive Click Bidding
SulacoTec AdTech Case Study
AdTech • 2024
AdTech • Click Processing • Predictive Bidding

Using 100M+ Historical Clicks to Predict CPC/CPA/CPM for Volume Buying

Analysed a historical click-processing database (~100M records of bids, outcomes, and revenue) and built a Laravel-based system to predict CPC/CPA/CPM when purchasing large batches of clicks for downstream customers, improving pricing accuracy and stabilising SulacoTec’s revenue stream.

Role Senior Software Engineer
Org SulacoTec, Dhaka, Bangladesh
Industry AdTech • Click Processing

SulacoTec buys and routes large volumes of ad clicks on behalf of customers. Profitability depends on bidding at the right CPC/CPA/CPM levels given uncertain downstream conversion performance. I led the design and implementation of a predictive system that turned 100M+ rows of historical click data into practical bid guidance for new campaigns.

Problem → Solution → Impact

Problem

  • Bidding large click volumes with little guidance on expected outcomes.
  • Margins at risk when entering new sources without benchmarks.
  • Heuristic pricing couldn’t scale to 100M+ rows of history.

Solution

  • Built a predictive layer on CPC/CPA/CPM using historical click data.
  • Feature engineered traffic/source attributes into Laravel/MySQL pipelines.
  • Fed bid guidance into pricing workflows for new campaigns.

Impact

  • More accurate bids on unfamiliar traffic sources.
  • Lower margin volatility on bulk deals.
  • Faster, more confident quoting for customers.
Bid accuracy
Before: heuristic ranges After: data-backed guidance
Margin stability
Before: volatile per source After: tighter guardrails
Quote speed
Before: manual analysis After: automated signals
Audit & label

Clean historic click data; define outcome labels for bidding targets.

Model & pipeline

Engineer source features and build predictive guidance in Laravel/MySQL.

Operationalize

Feed bid suggestions into pricing flows to improve deal quality.

Impact spotlight
  • Pricing grounded in data, not guesswork.
  • Revenue stream steadier on high-volume traffic buys.
  • Sales/ops teams can quote faster with clearer guardrails.
Overview

Introduction

SulacoTec operates in the click-brokering layer of the ad stack: ingesting bid requests, buying traffic in bulk, and reselling performance to downstream customers. Historically, bid prices were tuned using heuristics and small samples of performance data, which made it hard to price large-volume deals with confidence.

As a Senior Software Engineer, I was tasked with turning a large historical click-processing database into a decision engine. The goal was to predict reasonable CPC, CPA, and CPM ranges for given traffic segments so the business could negotiate and execute bulk click purchases with more predictable margins.

Background

Context

Over time, SulacoTec accumulated ~100 million rows of historical data across:

  • Bid requests and clearing prices.
  • Clicks, conversions, and post-click outcomes.
  • Traffic sources, geos, devices, and creative metadata.

However, this data mostly sat in operational tables used for reporting, not as an input to predictive decisions. There was a clear opportunity: use the historical record to estimate expected performance for new campaigns and traffic types.

Challenge

Problem

The business needed to answer a seemingly simple question:

“If we buy N clicks from this traffic source and geo, what CPC/CPA/CPM should we target to stay profitable for a given customer?”

In practice, this meant:

  • Dealing with noisy, sparse, and sometimes inconsistent historical data.
  • Capturing non-obvious relationships (e.g., device × geo × time-of-day).
  • Delivering answers quickly enough to be useful in negotiations and campaign setup.
Operating Environment

Constraints & Requirements

  • Large dataset: ~100M historical rows had to be processed efficiently without blocking operational systems.
  • Laravel-first: the prediction system needed to integrate with an existing Laravel control panel used by account managers.
  • Explainability: outputs had to be understandable; account teams needed to see how predictions were derived.
  • Pragmatic, not academic: performance and stability were more important than using the “fanciest” machine learning model.
Execution

Implementation Highlights

1) Data modelling & feature engineering

  • Consolidated historical logs into an analysis-ready schema grouped by key segments: traffic source, geo, device type, and placement category.
  • Computed aggregated metrics such as historical CPC, CPA, CTR, and conversion rate for each segment and time window.
  • Cleaned and normalised inconsistent records (e.g., missing conversions, duplicate clicks) to reduce noise in the predictions.

2) Prediction logic

  • Implemented segment-level models that estimated expected value per click and per impression, then derived suggested CPC/CPM ranges.
  • Incorporated configurable safety margins so pricing could be conservative for new or volatile segments.
  • Exposed both point estimates and confidence bands, allowing account managers to see “aggressive”, “balanced”, and “conservative” bids.

3) Laravel integration

  • Built a Laravel module where users could select a customer, traffic segment, and volume, then request bid guidance.
  • Implemented background jobs to run heavier aggregations asynchronously so the UI stayed responsive.
  • Added simple visualisations (spark lines, trend chips) to show how current predictions compared to historical performance.
The system turned a “gut-feel” pricing conversation into a data-backed one: account teams could quote CPC/CPA/CPM targets grounded in the behaviour of hundreds of millions of historical events.
Outcomes

Impact & Outcomes

While exact financials are confidential, the new system improved both decision quality and confidence for bulk click purchases:

  • More accurate bid proposals for a key customer, reducing the risk of underpricing or overpaying for traffic.
  • Clearer understanding of which traffic segments were historically profitable versus fragile.
  • A more stable revenue stream as pricing for volume deals became less ad hoc and more model-driven.
Reflection

Key Learnings

  • In adtech, old data is a strategic asset; the hard part is shaping it into something operations teams can actually use.
  • Segment-level, explainable models can be more valuable than opaque models that are hard for account teams to trust.
  • Integrating predictions into existing tools (Laravel control panels, reports) is as important as the models themselves.
  • Even simple predictive guidance can materially stabilise revenue when pricing bulk click deals.