attribution-reporting-api icon indicating copy to clipboard operation
attribution-reporting-api copied to clipboard

Embed ara scaling factor in payload

Open k-o-ta opened this issue 11 months ago • 2 comments

When the price of a purchase is dynamic, we may want to dynamically determine the scaling factor as well. However, if the scaling factor is dynamically determined when triggering, it is difficult to scale down using the same factor after aggregation.

This is a proposal to embed the scaling factor in the aggregatable value when registering the Attribution trigger. For example like this.

"aggregatable_values": {
  "purchase": {
    "value": 3200, // this is the value after scaling up
    "scalingFactor": 100 // default is 1
  }
}

The scalingFactor is also embedded in the aggregation_service_payloads.payload of the Aggregatable reports. The aggregation service uses the scalingFactor to scale down when generating summary reports.

Since the scalingFactor is encrypted, it will not increase the amount of information for tracking.

k-o-ta avatar Mar 11 '24 20:03 k-o-ta