logo
Conversions

How CodeQR decides which click gets the sale

The attribution rule behind CodeQR conversions — the thirty-day window, which click wins, and why totals differ from Meta and GA4.

Avatar for undefined
CodeQR Team
Content Team

Attribution is a rule, not a fact, and every tool picks a different one. Knowing which rule CodeQR applies is what lets you explain a report instead of defending it.

Availability

  • Plan: Pro and above, since it describes conversion tracking.
  • Where: nothing to configure — this is how the data is produced.

The rule

The sale goes to the click whose id was in the browser when the conversion happened.

Three consequences follow:

  • The window is thirty days for links with conversion tracking on. A click older than that is gone from the browser and cannot be credited.
  • Without conversion tracking the window is one hour, which is enough for an immediate purchase and nothing else.
  • The earliest click inside the window wins. The click id is written when the visitor arrives and is not replaced by later clicks on the same link, so within the window CodeQR credits the click that started the relationship.

Where the click id lives

Two places, on purpose:

  • The destination URL receives ?cq_id=…, so your site can read it on the very first request.
  • A cookie named cq_id, set by the redirect itself with Path scoped to that specific link.

The cookie is written by the server response, not by a script. That distinction matters more than it sounds: browser tracking-prevention rules that cap script-written cookies at seven days do not apply the same way to this one.

When nothing can be attributed

  • No click id and no known customer — the event is accepted and dropped. Nothing is recorded, and no error is raised.
  • A click id that does not exist or has expired — the call is refused with a 404.
  • A conversion on a device that never clicked — someone browses on a phone and buys on a laptop. Nothing links the two, and the sale is unattributed.
  • A bot — bot traffic never becomes a click, so it never becomes a lead.

Why the totals differ from Meta and GA4

They measure different things with different rules, and the gaps compound:

  • Different windows. Meta and Google apply their own, per campaign.
  • Different anchors. CodeQR attributes to the click on your link; Meta attributes to the ad impression or click; GA4 attributes to a session.
  • Different survival. A browser pixel is blocked by ad blockers and tracking prevention; a server-reported conversion is not.
  • Different deduplication. Each platform decides for itself what counts as one event.

Expect them to disagree by a wide margin, and use each for what it is good at: CodeQR to know which link earned the money, the ad platform to optimize the campaign.

Verify it works

You can watch the rule apply. Open a tracked link, note the id it appends:

curl -sSI https://go.example.com/summer
HTTP/2 302
location: https://example.com/checkout?cq_id=qcdyQHsX1oajEock
set-cookie: cq_id=qcdyQHsX1oajEock; Path=/summer; Max-Age=2592000

Max-Age=2592000 is thirty days. Record a lead with that id and the customer's timeline in Customers shows the click at its base — that click is the one that will carry any later sale.

Troubleshooting

A sale I expected is missing

Something interrupted the chain: the cookie was cleared, the purchase happened on another device, the window had passed, or the click id never reached your checkout. Fix conversions that are not being recorded works through each.

The wrong campaign got the credit

Within the window the first click keeps the credit. Someone who clicked your newsletter link in March and your ad in April is credited to March.

I want a different attribution window

It is not configurable today.

My conversion rate looks impossibly low

Compare like with like: clicks are counted by CodeQR for everyone, while conversions depend on your server reporting them. Every visitor who blocks scripts, declines cookies or converts on another device is a click without a conversion.

Related articles