date_from is moved forward to the earliest date your plan permits, and the response says so.
Spotting a clamp
The response carries aretention object whenever it happened:
retention key. Which is the trap: without checking for it, a twenty-four month query silently returns twelve months and the chart looks like your traffic began a year ago.
Knowing the window in advance
Rather than discovering the floor by tripping over it, read it from your plan:analytics_retention section carries the window in months and the earliest queryable date. Use it to bound a date picker, so the limit is visible before a query rather than after.
What retention does and does not affect
Retention limits how far back analytics queries may read. It does not delete your links, QR codes, campaigns or their configuration, and it does not stop new clicks being recorded. The underlying event data is kept; what changes is how much of it your plan lets you query. Raise the plan and the window widens — including over history recorded while you were on the lower one.Building against it
Bound date pickers to the floor
Bound date pickers to the floor
Disable dates before
earliest_date. Cheaper than explaining a clamp after the fact.Export before a downgrade
Export before a downgrade
Moving to a shorter window makes older history unqueryable. Pull what you need via the report endpoints first.
Do not assume a fixed window
Do not assume a fixed window
Plans change. Read
analytics_retention rather than hardcoding twelve months.Clamping fails open
Clamping fails open
If the plan lookup cannot be resolved, no clamp is applied — better than serving an empty chart to a paying customer because of a lookup failure. Do not treat the absence of a
retention key as proof that no limit exists.