Skip to content
dvnt.io

Ad data that arrives in full

Tagging moved from the browser to our own server, so conversion data for Meta and Google Ads arrives in full.

// Challenge

dvnt runs paid campaigns on Meta and Google Ads for six domains in three countries. In such campaigns, the platform's algorithm decides who sees an ad and how much we pay for it — and it learns from conversion data: who came from an ad, who filled in a form, who booked a call. The more complete that data, the more accurately the platform bids. The more gaps it has, the more budget goes into bad decisions, and that cannot be made up after the fact.

Classic in-browser measurement damages this data in three ways. Ad blockers strip out Google and Meta scripts loaded from external domains, so some visits and conversions simply do not exist for the platform. Safari blocks third-party cookies and deletes cookies set by scripts in the browser after seven days — someone who returns a week later counts as a new person, and the campaign that brought them loses the credit. And every additional script is another load on page speed.

On top of that came a very practical problem: six domains meant six places where the same tags had to be maintained. Every change to measurement meant repeating it several times and hoping nothing drifted out of sync anywhere.

// Approach

In March 2026 we moved tagging for all domains to our own server. Each domain now loads one lightweight script from its own subdomain rather than from an external Google or Meta address — to the browser and the ad blocker, it is part of the same site. Cookies are set by the server, so Safari does not delete them after a week and a returning user is recognised. All six domains are served by a single container, which picks the right analytics service based on the site address. A change to measurement is made once, in one place.

Decision log

  1. ADR-01

    The second decision was to separate ad conversions from regular analytics

    An analytics event has to arrive immediately, so it goes through the tagging server. A Google Ads conversion has to survive something else: someone comes to the site from an ad, browses a few pages and leaves an enquiry only some time later, and the click identifier disappears from the address on the first navigation. So we store the click for 90 days — the length of the Google Ads click window — save it with the lead and publish a file that Google Ads fetches on its own. Leads without a click identifier also reach Google Ads, matched by a hashed email address. Raw personal data never leaves our server in the process.

  2. ADR-02

    The third thing turned out to be checking whether tracking works at all

    On 7 May 2026 Google changed the container image and tracking stopped working on all six domains. For more than a day nobody noticed — the existing check only asked whether the server was alive, and it was; it just wasn't accepting events. A person found the failure, by hand. The same day we shipped a fix and a new check: every five minutes, not only “does the server respond” but also “does Google Analytics accept an event”, with an alert on the first error. The image version is now pinned, and we detect a change on Google's side before it reaches production. This isn't the goal of the project, but its safeguard: the data that campaigns learn from must not disappear silently.

// figures

Read from production

6
Domains in three countries measured from one containerEach domain tags from its own subdomain; no extra cost compared with Cloud Run
90 days
How long we remember an ad clickA lead submitted later and on a different subpage still goes to the right campaign
2
Lead routes to Google AdsWith a click identifier and without one (matched by hashed email)
< 5 min
Time until we know measurement has stopped workingPreviously an outage went unnoticed for over a day

Measurement for all six domains now runs from a single server, from their own subdomains. Leads reach Google Ads by two routes — with a click identifier and without one — and the import action in the Google Ads account records the conversions, so the file is not being sent into a void. The whole setup runs in one container on a server we already had, at no extra cost compared with Google's cloud service.

For us this means three things. Campaigns learn from data that ad blockers do not strip out and Safari does not delete after a week. A lead submitted a few days and a few subpages after the ad click is still attributed to the campaign that brought it. And if measurement stops working, we know within five minutes, not after a day.

What we have not measured yet: how many more conversions the platforms see compared with in-browser measurement alone — that would require a reading from before the move, which we did not take.

Technologies

  • GTM Server-Side
  • Docker Compose
  • Coolify + Traefik
  • Cloudflare
  • GitHub Actions
  • Bash
  • GA4
  • Consent Mode v2
  • Next.js

Team

Konrad Barejko — Infrastructure, scripts, monitoring, GTM configuration, application integration

15 minutes. Zero selling.

Is your data spread across several systems? In 15 minutes we'll tell you whether it can be brought together into one stream.