Skip to content

Commit

Permalink
PBS USGen skiprate (#5887)
Browse files Browse the repository at this point in the history
* PBS USGen skiprate

* Update pbs-usgen.md
  • Loading branch information
bretg authored Feb 14, 2025
1 parent 0fac2c4 commit 0fdab76
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
39 changes: 39 additions & 0 deletions prebid-server/developers/add-a-privacy-module-java.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,3 +280,42 @@ public class MyPrivacyModule implements PrivacyModule, Loggable {
}
}
```

## Privacy Trace Log and Analytics

The privacy module interface logs information that analytics adapters may want to consume. For example, if you're an analytics provider
and want to check whether there was a skipRate config present, you can read the log for `skipped:true` and log however your analytics requires.

For example:

```

Check failure on line 291 in prebid-server/developers/add-a-privacy-module-java.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Fenced code blocks should have a language specified

prebid-server/developers/add-a-privacy-module-java.md:291 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md040.md
{
"description": "Invocation of Activity Infrastructure.",
"activity": "transmitUfpd",
"activity_invocation_payload": {
"component_type": "BIDDER",
"component_name": "bidderA"
}
},
{
"description": "Setting the default invocation result.",
"allow_by_default": true
},
{
"description": "Processing rule.",
"rule_configuration": {
"and": [
{
"privacy_module": "iab.usgeneral",
"skipped": true,
"result": "ABSTAIN"
}
]
},
"result": "ABSTAIN"
},
```

## Further Reading

- [Building a privacy module](/prebid-server/developers/add-a-privacy-module.html)

Check failure on line 321 in prebid-server/developers/add-a-privacy-module-java.md

View workflow job for this annotation

GitHub Actions / run markdownlint

Unordered list style

prebid-server/developers/add-a-privacy-module-java.md:321:1 MD004/ul-style Unordered list style [Expected: asterisk; Actual: dash] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md004.md
20 changes: 20 additions & 0 deletions prebid-server/features/pbs-usgen.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,26 @@ Prebid approach, but they want to process SID 8 with this custom module.
}
```

### Testing

Before turning on the USGen module 100%, some host companies may want to partially enable it in order to gague impact. This can be done using the privacy module `skipRate` parameter. Here's an example account config:

```json5
{
"privacy": {
"modules": [{
"code": "iab.usgeneral",
"skipRate": 95, // only run on 5% of requests. Default is to run on 100%, i.e. skipRate 0
"config": {
"skipSids": [9]
}
}]
}
}
```

In order to utilize this test though, you will need an analytics adapter that can read the Activity Infrastructure log. See [privacy module analytics](/prebid-server/developers/add-a-privacy-module-java.html#privacy-trace-log-and-analytics) for more detail.

### Troubleshooting

Additional information about the outcoming of privacy module processing can be obtained by setting `ext.prebid.trace: "basic"`.
Expand Down

0 comments on commit 0fdab76

Please sign in to comment.