WICG / attribution-reporting-api

Attribution Reporting API
https://wicg.github.io/attribution-reporting-api/
Other
367 stars 173 forks source link

[feature request] Batched source events #1437

Open lilcorey opened 2 months ago

lilcorey commented 2 months ago

Attribution source events are registered via a JSON-encoded HTTP header called Attribution-Reporting-Register-Source of the form:

{
  "destination": "[site]",
  "source_event_id": "[64-bit unsigned integer]",
  "expiry": "[64-bit signed integer]",
  "priority": "[64-bit signed integer]",
  "event_report_window": "[64-bit signed integer]",
}

A separate keepalive request is required for each source event that a user wants to register. The number of ARA related requests can potentially be a heavy load on a publisher's server(s) relative to the number of keepalive requests that are necessary to power said site. Batching source events in a single request can help reduce load on a server. One potential idea is to allow an array of JSON-encoded objects

[
{
  "destination": "[site]",
  "source_event_id": "[64-bit unsigned integer]",
  "expiry": "[64-bit signed integer]",
  "priority": "[64-bit signed integer]",
  "event_report_window": "[64-bit signed integer]",
},
...
]