Skip to content

getBidderRequestsCounter cannot parse ad unit codes with too many dots #12204

Closed
@hkimmgni

Description

@hkimmgni

BUG

getBidderRequestsCounter cannot find the "requestsCounter" when the adunit code contains too many "." (dots). Google Ad Manager GPT allows ad unit codes with more than one dot in the ad unit code.

Description

export function getBidderRequestsCounter(adunit, bidder) {

When it reached getBidderRquestsCounter(), the adunit is being parsed by ".".
So the ad unitgpt-ad-mayoclinic.org-top is broken down as

  • gpt-ad-mayoclinic > org-top > bidders > rise > requestsCounter

instead of

  • gpt-ad-mayoclinic.org-top > bidders > rise > requestsCounter

Steps to reproduce

  1. Open a chrome browser tab
  2. Open Chrome Dev tools
  3. Open the page
  4. Go to console & filter for "INFO: Bids Requested for Auction with id"
  5. Notice, the bidderRequestsCount for Rubicon is 1, but Rise is 0.
    -- Rubicon ad unit code is "test-slot"
    -- Rise ad unit code is "gpt-ad-mayoclinic.org-top.bidders.rise"
  6. Notice, in the network tab there are two bid requests for Rubicon and Rise. Filter for /fastlane|yellowblue/

Test page

https://hyunjoo-test-environment.s3.amazonaws.com/public/github/getBidderRequestsCount/testpage.html?pbjs_debug=true

Expected results

I expected to see bidderRequestsCount to be equivalent to the number of requests in the network tab.

Actual results

I see uneven bidderRequestsCount against the number of requests I see under the network tab.

Platform details

I can see this issue from v8.48.0.

Other information

This is affecting Bidder Rise because Rise is using bids.bidderRequestCount in their bid request payload, here:

loop: bid.bidderRequestsCount || 0,
.
This is also affecting other bidders count.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions