Add country code to consent records

Store the visitor's resolved country code alongside regulation in
cookie_consent_records so downstream surfaces can expose it.

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-05-07 14:05:52 +04:00
parent dd6db7ca21
commit b4d8bd8de2
4 changed files with 36 additions and 9 deletions

View File

@@ -104,6 +104,7 @@ type (
Action coredata.CookieConsentAction
SdkVersion string
Regulation Regulation
CountryCode coredata.CountryCode
}
DetectedCookie struct {
@@ -1842,6 +1843,7 @@ func (s *Service) RecordConsent(
Action: req.Action,
SdkVersion: req.SdkVersion,
Regulation: req.Regulation,
CountryCode: req.CountryCode,
CreatedAt: time.Now(),
}