Rule conversion_time_anomaly, read from the engine code

Conversion time anomaly: sales that never sleep

A conversion time anomaly is an affiliate whose sales land at night far more often than your program's do. The engine compares the affiliate's share of sales between 00:00 and 05:59 UTC with your program's share, and holds the sale when it is extreme.

By the AffiliateTracking teamUpdated 5 min read

Fraud page on demo data: held commissions, each with the rule that held it and Release and Uphold buttons, above the verdicts that explain each hold.

The fraud queue in the product, running on demo data.

The short answer

The rule needs 20 or more sales for the affiliate in 7 days, and 20 or more across the program. It fires when over half the affiliate's sales are at night and a z-score against the program's night share is above 3.

How the rule works

Read from internal/fraud/rules2.go. The code fixes the thresholds. No setting changes them.

  1. 01Night means 00:00 to 05:59 UTC

    The engine reads the UTC hour of each commission. Hours 0 to 5 count as night, whatever time zone your buyers live in.

  2. 02Against your own baseline

    It compares with the night share of every sale in the install over the same 7 days. A program with a night-time audience raises its own baseline.

  3. 03Two tests, both needed

    Over 50% of the affiliate's sales at night, and z above 3. A night-heavy affiliate in a night-heavy program stays silent.

The exact logic

// internal/fraud/rules2.go, ConversionTimeAnomaly (condensed)
night, total := affiliate's commissions, last 7 days (UTC hour < 6)
if total < 20 { return }
pNight, pTotal := every commission in the install, same 7 days
if pTotal < 20 { return }
share, p := night/total, pNight/pTotal
z := (share - p) / sqrt(p*(1-p)/total)
if z > 3 && share > 0.5 { hold(commission) }

Condensed from the Go source in v0.5.0 (main 4f87f77). Comments are ours.

The signals

  • Over 50% of sales at 00:00 to 05:59 UTC
  • z above 3 against the program
  • 20 sales minimum, both sides
Hold scope. It holds only the commission being screened. Nothing else in the affiliate's balance moves.

Our data

We ran the rule at its threshold

We ran 2 fixtures through the real engine on 3 Oct 2026: 1 below the line, 1 at or past it. These are the results and the engine's own words.

conversion_time_anomaly · 2 fixtures · fresh SQLite each
Each fixture run through the real engine, and whether odd conversion hours fired
FixtureResultThe engine's reason
10 of 20 sales at 02:00 UTC, program 20 of 200 other sales at nightSilentNo verdict
11 of 20 sales at 02:00 UTC, program 20 of 200 other sales at nightFired55% of 20 sales came between midnight and 6am UTC, against 13% across the program (z=5.6)
At 10 of 20 the z-score is already far above 3. It stays silent because 50% is not over half.
Odd conversion hours: where the rule fires Threshold chart: affiliate's night share of 20 sales (%). The engine stayed silent at 50 and fired at 55. The line sits at over 50%. Affiliate's night share of 20 sales (%) Over 50% Green: 50, silent Red: 55, fires 0100
Where odd conversion hours fires, from the fixtures above. Engine v0.5.0 (main 4f87f77), run 3 Oct 2026.

Method: one Go test against engine v0.5.0 (main 4f87f77), a new SQLite database per fixture, dry run so nothing was held. Re-run with go test ./internal/fraud/ plus the fixture list above.

What lands in your queue

When odd conversion hours fires, the verdict shows the rule, who it's about and what it saw. Release or uphold is your call, not the engine's.

Fraud queue · conversion_time_anomaly · demo dataMade-up numbers, real wording
Example held commission after odd conversion hours fired, on demo data, with the engine's reason text
PartnerWhat it sawCommissionResult
Affiliate 971% of 31 sales came between midnight and 6am UTC, against 12% across the program (z=9.8)$287.30Commission held
heldWaits for youThe commission stays out of payouts until you decide.
releasedPaid normallyIt goes into the next payout.
upheldNot paidThe engine cancels it and takes the money back. Already paid? Use a refund.

In the wild

Farms run on the operator's clock, not your buyers'.

Each item re-read against its linked source on . Items we couldn't verify were cut.

Limits, and how attackers try to beat it

  • The clock is UTC. For a store in Asia or Australia, normal daytime falls inside 00:00 to 05:59 UTC. The program baseline softens this but doesn't remove it.
  • It needs 20 sales across the whole install too, so a new program can't trip it.

A farm can schedule its scripts for daytime in your market. It then needs volume during the day, which more than 30 sales in an hour limits. Scripts that skip the click step entirely get credited by the last-resort IP match, and that share is watched too.

Related rules

Thresholds checked against the code on . Windows roll with each sale.

Odd conversion hours questions

Why UTC and not my time zone?

The rule reads the hour stored with each commission, which is UTC. It doesn't know your audience's time zone.

Does the program baseline include the suspect?

Yes. The baseline counts every sale in the window, the affiliate's own included.

When does the rule run?

On every credited sale, in the same database transaction as the credit. A sweep every 5 minutes also re-checks affiliates active in the last hour.

What does a hold cost me?

Nothing but time. A held commission stays out of payouts. Release it and it pays in the next payout. Uphold it and the engine cancels it and takes the money back.

Can I test it without holding anything?

Yes. Set AE_FRAUD_DRYRUN=1. The engine records each verdict and holds nothing.

Who wrote this

The AffiliateTracking team writes these pages from the engine's own code. Every threshold here is pinned by a test in the repository. Spot a mismatch? Tell us and we'll fix the page or the code.

This rule, on every sale,
before the payout.

Self-host for free, or let us run it for you.