Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Richmedia filtering module #2483

Open
bretg opened this issue Dec 6, 2022 · 3 comments
Open

Richmedia filtering module #2483

bretg opened this issue Dec 6, 2022 · 3 comments
Labels

Comments

@bretg
Copy link
Contributor

bretg commented Dec 6, 2022

I've received a request to have Prebid Server be able to filter out MRAID creatives for a specific account. They refuse to run Prebid SDK/Server in their mobile app without this capability because they have been burned before. They don't trust setting the api field because DSPs can ignore it. They want PBS to be able to recognize and remove bids with MRAID creatives.

Rather than building an MRAID-specific module, I propose calling it the "RichMedia Filter" module. We'll start with just supporting MRAID, but can extend to other scenarios as needed.

My understanding is that MRAID creatives in a bid would contain this code:

<script src="mraid.js"></script> 

Assuming that's enough to identity MRAID, here are the proposed details.

Turning on the Module

Account-Level Config

The expected way this would normally work is for the account to state their preference:

{
   "hooks": {
      "modules": {
         "pb-richmedia-filter": {
            "filter-mraid": true
            // future richmedia filtering options would go here
         }
     }
   }
}

Behavior

Built as a hook in the All Processed Bid Response stage, when invoked, this module:

  1. Determines whether the request needs to be processed. If filter-mraid: true in account config, then continue, else there's nothing to do -- just return to PBS.
  2. Loop through all bid responses
    1. substring search the creative body (adm) for the pattern mraid.js. If it doesn't exist, go on the next bid response.
    2. if mraid.js is found
      1. reject the bid response with code 350 (as defined in Analytics enhancement: return nobids, errors, and removals #2367 (comment))
      2. add an entry to the analytics tag for this rejected bid response. It's ok for a given impid to have more than one atag from the same bidder.
[{
   // scenario: response from bidderA response rejected for imp=1
   activities: [{
    name: "reject-richmedia",
    status: "success", // no errors from the module
    results: [{
        status: "success-block",
        values: { // these are module-specific details about the result
                  "richmedia-format": "mraid"
        },
        appliedto: {
          "bidder": "bidderA",
           impids: ["1"]
        }
     // nothing logged to atags when no rejections take place
   }]
}]
@bretg bretg changed the title Support a richmedia filtering module Richmedia filtering module Dec 6, 2022
@bretg bretg added the Intent to implement An issue describing a plan for a major feature. These are intended for community feedback label Dec 16, 2022
@bretg
Copy link
Contributor Author

bretg commented Feb 10, 2023

Discussed. The one item we need to settle on is the name-spacing of the modulecode.

Current proposal is "VENDOR.MODULE_NAME_WITH_UNDERSCORES"

e.g. pb.richmedia_filter

Going once...

@bretg
Copy link
Contributor Author

bretg commented Jan 2, 2024

Removed the request-level config override. Too complicated for the low value.

@bretg
Copy link
Contributor Author

bretg commented Mar 12, 2024

Done with PBS-Java 2.9

@bretg bretg added PBS-Go and removed Intent to implement An issue describing a plan for a major feature. These are intended for community feedback labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Ready for Dev
Development

No branches or pull requests

1 participant