Over two years, this client's tracking had been changed many times by different people, and their website had moved to a new platform. The result was that the numbers the ad platforms used to decide where to spend, and the numbers the business saw internally, no longer agreed. Budget decisions had stopped because nobody trusted either figure. We corrected what the ad platforms were being told first, in the first week, then brought the rest of the reporting back into line and wrote it all down for handover.
Background
Tracking setups change gradually. Each individual change is sensible at the time: a new campaign needs a new event, a move to a new platform shifts a page, a consent banner is updated to meet a new rule. The changes add up, and the effect is mostly invisible because every step was justified on its own.
What eventually shows up is a difference between what the ad platform reports and what the business can see in its own records. It grows until someone declines to make a budget decision on either number, which is a reasonable response and is usually the point at which this work gets requested.
This client had reached that point. Campaigns were live and could not be paused, the person who built the original setup had left, and there was no documentation of what any of it was meant to do.
The problem
Several versions of the tracking were running at once
The move to the new platform had left earlier versions partly in place alongside the new one, so some actions were counted more than once.
A sale was recorded when the page changed, not when the sale completed
It was triggered by moving from one page to the next, so ordinary browsing was being recorded alongside actual sales.
The consent setup predated the current rules
A portion of EU traffic was neither recorded nor estimated, and the missing part was concentrated in particular countries rather than spread evenly.
Nothing was written down
Every behaviour had to be judged on its own, because there was no record of what had been deliberate.
Constraints we worked within
Campaigns stayed live throughout
Pausing was not commercially realistic, so the work had to happen while spend continued.
The original developer was not available
Nothing could be clarified by asking.
Work happened inside the existing tag manager
Using what was already there kept each change small and easy to reverse.
Approach, and the clean rebuild we did not do
The obvious option is to rebuild the whole measurement setup from scratch. In a new project that is the right call.
We repaired it in stages instead, for two reasons. Rebuilding while campaigns are running creates a period with no reliable numbers at all, which was the one thing this client could not afford. And a rebuild done without any record of what the original was meant to do tends to recreate the same gaps, because the same unwritten assumptions get made a second time.
Repairing in stages also let us order the work by what was costing the most, which is what produced the main result: what the ad platforms were being told was corrected within the first week, and the internal reporting was brought back into line after that.
What we built
Step 01
List everything that was running, and agree the number that decisions are made on
Before changing anything, we listed what was firing, from where and in what order. Then we agreed with the client which single number the business would use for budget decisions. Settling that first keeps the work bounded, because every difference found afterwards can be judged by whether it affects that number.
Step 02
Stop actions being counted twice
Checked first, because if this is wrong then everything after it is wrong too. We confirmed that the browser and server copies of each event carried the same reference number, so the ad platform treats them as one result.
Step 03
Record the sale when it actually completes
We moved the sale from being triggered by a page change to being triggered by the completed order, recorded on the server where the completion is actually confirmed.
Step 04
Bring consent up to date
Consent Mode was reconfigured so that visitors who decline are estimated rather than missing entirely, and we checked the result country by country rather than as a single total.
Step 05
Improve how sales are matched to clicks
We added the scrambled contact details that are available at the point of sale, so the ad platform can match a sale to a click instead of receiving it unattached.
Step 06
Write it all down
A written record of what each event represents, when it is recorded and why, so the next change can be made deliberately.
The order the work was done in
- List what is running
- Agree the decision number
- Stop double counting
- Record the sale at the right momentAd bidding corrected here, in the first week
- Bring consent up to date
- Improve matching
- Write it down
- The order is the method. Each step rules out one class of cause before the next is looked at.
- What was misdirecting the ad spend is fixed before what was distorting the reports, because the first costs money every day it runs.
Results
- What the ad platforms were being told was corrected in the first week, so spend stopped being directed by a distorted number while the rest of the work continued.
- One definition of a sale restored across the ad platforms and the internal reporting.
- Consent behaviour checked country by country, with estimates in place of missing data.
- Written documentation handed over, so whoever holds the setup next can change it deliberately.
The setup, before
- Several versions of the tracking running together
- A sale recorded when the page changed
- EU traffic missing rather than estimated
- No record of what had been intended
The setup, after
- One record per sale, no double counting
- Recorded on the server when the order completes
- Consent behaviour checked country by country
- Written definitions handed over
How this was assessed
These are structural results. Verification was by inspection: a list of events before and after, double counting confirmed as resolved at the ad platform, and consent behaviour tested country by country. Anonymised documentation is available on request.
What we would do differently
We would mark the date of the fix in the analytics tool at the moment it went live, rather than a few days later. It was added within days, but the clearest version of that note is the one written the same hour, because it removes any doubt about which side of the change a given day falls on.
What this means for you
If your ad platform numbers and your own sales records have moved apart far enough that budget decisions have stalled, the urgent half is what the ad platforms are being told, not the reports. A reporting error costs you one decision. A number that misdirects the bidding costs you money every day it runs.
This was real client work. The client's name and identifying details are withheld under a confidentiality agreement. Anonymised reports and documentation are available on request.