GA4

TL;DR

Google Analytics through an in-house proxy: rolling order attribution and dated daily traffic have different history contracts.

Google Analytics 4, reached through an in-house proxy rather than directly. It supplies how a visitor arrived: the source and medium behind an order, plus traffic counts per day per domain.

What it delivers

FeedGrain
Source and medium per orderOne per order
TrafficOne row per day, domain, source and medium

Cadence and window

Order attribution

The source and medium call takes no date parameter. It answers one rolling window, whatever day the batch happens to carry. So running it for an old date does not fetch that date: it fetches the same recent window again.

The consequences:

  • recent orders are refreshed continuously, which is what the feed is good at
  • history cannot be requested. There is no parameter that would make it return an older period
  • the period from 2022 to 2025 carries no source and medium from GA4 at all, because the feed was not running over it and cannot be asked for it retrospectively

That gap is filled from verkoopdump instead, which is why an order's acquisition data can come from two different systems depending on its date.

Daily traffic

trafficacquisitionperday takes a date and property id. CCC can request earlier days for this feed; availability is limited by the upstream property and proxy. The trailing queue refreshes recent days. This is separate from the undated order-attribution call.

Quirks and limits

  • Attribution is whatever GA4 reported at the time it was asked. It is not recomputed, so it reflects that tool's model, not CCC's.
  • An order placed outside the rolling window when the feed last ran has no source and medium from here, and never will.
  • Traffic has a day/domain/source/medium grain, not an order grain. Aggregate orders to compatible dimensions before comparing them; joining traffic to individual orders multiplies traffic totals.

Where it lands

Source and medium reaches the classification step and ends up as a flag on the transaction. Traffic lands in its own table and is surfaced on /transactions/traffic.

Evidence

Separate getsourcemedium() and gettraffic() request contracts from app/models/googleanalytics.php and the jobs in app/jobs/googleanalytics/. Rolling-window behaviour from AGENTS.md, The application, which states the 2022 to 2025 gap and names verkoopdump as its fill. Basis: code-checked against the current implementation.

The width of the rolling window and the attribution model behind the reported source and medium are properties of the proxy and of the GA4 property it reads. This repository sends a token and a property id and stores what comes back; neither is configurable here.

About this document
  • Type
    source
  • Status
    active
  • Updated
    2026-09-14
  • Created
    2026-09-13