Enhance module A/B testing by adding an ad server targeting keyword into the response
Motivation
Indicate to a particular ad server consuming targeting keywords whether the module was run and not, so it can be reflected in the reporting and allow to compare control vs. treatment variants in terms of f.e. revenue.
Background
Currently we have the A/B testing for modular infrastructure this implemented in PBS-Java: https://github.com/prebid/prebid-server/issues/3681
The proposal is to add "adserver-targeting": "keyword-name". That will be added as a distinct keyword to the targeting keywords in the response to be sent to GAM. The value should be "skip" if the module was not run and "run" if it was run. Note the "adserver-targeting" param in the abtests[] config:
{
"hooks": {
"modules": {
"my-module": {
"params-seen-by-module": { ... }
}
},
"execution-plan": {
"abtests": [{
"accounts": [ 123, 456 ], // ignore if in account-level config
"module-code": "my-module",
"enabled": true, // defaults to false
"percent-active": 5, // defaults to 100
"log-analytics-tag": true, // defaults to true
"adserver-targeting": "keyword-name"
},{
... abtest config for other modules ...
}],
"endpoints": {
"/openrtb2/auction": {
...
}
}
}
}
}
Objectives
- Add the above config option.
- Implement the functionality in the core to add this keyword with "skip" or "run" value depending on whether the module was run or not (probably that choice of a status is retained in the context until the response forming stages of the auction)
Discussed in backlog, seems straightforward but waiting to meet with @justadreamer to confirm intention before moving to ready for dev.
@Net-burst just checking if you have any thoughts here. Discussed at the PMC and we are ready to move it to ready-for-dev if you're good with this addition.
Discussed again backlog. There is a possibility the targeting keyword might need to be moved from the execution plan to the module config to avoid a major refactor.
Discussed with @Net-burst. The only change we'll make to the spec is that the GAM keyword should rather take a string value reflecting the A/B testing infrastructure status: "run" or "skip" .
The rationale is that this is extendable for future statuses should we ever need them. While what was originally proposed as 0 or 1 status would be too restrictive and would require breaking changes if we ever need to extend.
The corresponding KVP would look like:
{"<keyword-name>" : "run"}
or
{"<keyword-name>" : "skip"}
(also updated the main description, thanks @Net-burst for pointing out this design flaw)