Store detected regulation in consent records and expose it in SDK
Add a regulation column to cookie_consent_records so each consent captures which privacy law was in effect. Thread the value from the handler's geoloc resolution through the service into the DB insert. On the SDK side, add a Regulation union type to BannerConfig and expose it via a getter on CookieBannerClient and in the probo-ready event detail so themed-banner consumers can adapt their UI per regulation. Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -191,6 +191,7 @@ func (h *Handler) handlePostConsent(w http.ResponseWriter, r *http.Request) {
|
||||
ConsentData: body.ConsentData,
|
||||
Action: body.Action,
|
||||
SdkVersion: sdkVersion,
|
||||
Regulation: h.resolveRegulation(r),
|
||||
}
|
||||
|
||||
record, err := h.cookieBannerSvc.RecordConsent(r.Context(), bannerID, req)
|
||||
|
||||
Reference in New Issue
Block a user