Add last_detected_at and last_matched_at tracking
Track when cookies are last detected (last_detected_at on cookies) and when patterns last matched a detected cookie (last_matched_at on cookie_patterns). The cookie timestamp is refreshed on every detection report; the pattern timestamp is computed as MAX(last_detected_at) during pattern analysis. Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -540,6 +540,7 @@ func (s *Service) CreateCookieBanner(
|
||||
Name: "probo_consent",
|
||||
MaxAgeSeconds: &consentMaxAge,
|
||||
Source: coredata.CookieSourceScript,
|
||||
LastDetectedAt: now,
|
||||
CreatedAt: now,
|
||||
UpdatedAt: now,
|
||||
}
|
||||
@@ -2280,6 +2281,7 @@ func (s *Service) ReportDetectedCookies(
|
||||
Name: dc.Name,
|
||||
MaxAgeSeconds: dc.MaxAgeSeconds,
|
||||
Source: dc.Source,
|
||||
LastDetectedAt: now,
|
||||
CreatedAt: now,
|
||||
UpdatedAt: now,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user