Skip to content

Commit

Permalink
Add feature detection for real time reporting (#1238)
Browse files Browse the repository at this point in the history
* Add feature detection for real time reporting

Also added several I2S links which are available now.

* add I2S link

* address comment: remove extra space.
  • Loading branch information
qingxinwu authored Aug 6, 2024
1 parent b6be38d commit e159770
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions PA_Feature_Detecting.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const maxAdComponents = navigator.protectedAudience ?
```

## Reporting timeout
[Intent to Ship](TBD)
[Intent to Ship](https://groups.google.com/a/chromium.org/g/blink-dev/c/ZdZXN1D-MtI/)

Inside `reportWin` one can determine its reporting timeout as follows:
```
Expand All @@ -101,8 +101,8 @@ const reportingTimeout = auctionConfig.reportingTimeout ?

From the context of a web page, whether custom reporting timeout is enabled can be queried as follows:
```
const reportingTimeoutEnabled = navigator.protectedAudience ?
navigator.protectedAudience.queryFeatureSupport("reportingTimeout") : false;
const reportingTimeoutEnabled = navigator.protectedAudience &&
navigator.protectedAudience.queryFeatureSupport("reportingTimeout");
```

## Returning multiple bids from generateBid()
Expand All @@ -121,14 +121,23 @@ the `targetNumAdComponents` and `numMandatoryAdComponents` bid fields will be
considered.

## Cross-origin trusted signals
[Intent to Ship](TBD)
[Intent to Ship](https://groups.google.com/a/chromium.org/g/blink-dev/c/5nvBAjmoO2g)

From context of a web page:
```
navigator.protectedAudience && navigator.protectedAudience.queryFeatureSupport(
"permitCrossOriginTrustedSignals")
```

## Real time reporting
[Intent to Ship](https://groups.google.com/a/chromium.org/g/blink-dev/c/9_dR-BdyeWE)

From context of a web page:
```
navigator.protectedAudience && navigator.protectedAudience.queryFeatureSupport(
"realTimeReporting")
```

## Getting browser-side detectable features as an object
Sometimes it's desirable to get status of all features detectable via `queryFeatureSupport` in a
forward-compatible way. Sufficiently recent versions provide this functionality via
Expand All @@ -153,7 +162,8 @@ An example return value would be:
{
"adComponentsLimit":40,
"deprecatedRenderURLReplacements":false,
"reportingTimeout":true,
"permitCrossOriginTrustedSignals":true
"permitCrossOriginTrustedSignals":true,
"realTimeReporting":true,
"reportingTimeout":true
}
```

0 comments on commit e159770

Please sign in to comment.