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

New Adapter: Bidtheatre #4069

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

andreasgreen
Copy link

var bidExt openrtb_ext.ExtBid
err := jsonutil.Unmarshal(bid.Ext, &bidExt)
if err == nil && bidExt.Prebid != nil {
return openrtb_ext.ParseBidType(string(bidExt.Prebid.Type))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider this as a suggestion. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, recommends implementing a pattern where the adapter server sets the MType field in the response to accurately determine the media type for the impression.

Copy link

Code coverage summary

Note:

  • Prebid team doesn't anticipate tests covering code paths that might result in marshal and unmarshal errors
  • Coverage summary encompasses all commits leading up to the latest one, 3eee6c5

bidtheatre

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/bidtheatre/bidtheatre.go:21:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/bidtheatre/bidtheatre.go:29:	MakeRequests		80.0%
github.com/prebid/prebid-server/v3/adapters/bidtheatre/bidtheatre.go:46:	getMediaTypeForBid	83.3%
github.com/prebid/prebid-server/v3/adapters/bidtheatre/bidtheatre.go:60:	MakeBids		69.6%
github.com/prebid/prebid-server/v3/adapters/bidtheatre/bidtheatre.go:105:	resolveMacros		80.0%
total:										(statements)		75.6%

- video
userSync:
redirect:
url: https://match.adsby.bidtheatre.com/usersync?gdpr={{.GDPR}}&gdpr_consent={{.GDPRConsent}}&cb={{.RedirectURL}}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for redirect we should get 302 not 200
Uploading image.png…

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @przemkaczmarek ,

We require redirect domains to be explicitly whitelisted to perform the redirect, so in this case no redirect is actually made. This means we will need to whitelist each onboarded publisher's prebid-server domain.

See correct 302 redirect for this whitelisted domain as an example:

https://match.adsby.bidtheatre.com/usersync?gdpr=0&gdpr_consent=&cb=https%3A%2F%2Fid5-sync.com%3Fuid%3D%7Buid%7D

Copy link
Author

@andreasgreen andreasgreen Jan 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this approach acceptable @przemkaczmarek ?

@przemkaczmarek przemkaczmarek self-assigned this Nov 26, 2024
@bsardo bsardo added the adapter label Jan 6, 2025
@bsardo
Copy link
Collaborator

bsardo commented Jan 6, 2025

@Rothalack can you please review?

@bsardo
Copy link
Collaborator

bsardo commented Jan 7, 2025

@pm-nikhil-vaidya can you please review?

@pm-nikhil-vaidya
Copy link
Contributor

Sure @bsardo

@Rothalack
Copy link
Contributor

I have no additional feedback for this PR. Looks good to me. You'll probably want to flip pbs support to true on the docs whenever this goes out.

adapters/bidtheatre/bidtheatre.go Show resolved Hide resolved
adapters/bidtheatre/bidtheatre.go Show resolved Hide resolved
adapters/bidtheatre/bidtheatre.go Show resolved Hide resolved
adapters/bidtheatre/bidtheatre.go Show resolved Hide resolved
adapters/bidtheatre/bidtheatre.go Show resolved Hide resolved
adapters/bidtheatre/bidtheatre.go Show resolved Hide resolved
adapters/bidtheatre/bidtheatre.go Show resolved Hide resolved
adapters/bidtheatre/bidtheatre_test.go Show resolved Hide resolved
}
price := strconv.FormatFloat(bid.Price, 'f', -1, 64)
bid.NURL = strings.Replace(bid.NURL, "${AUCTION_PRICE}", price, -1)
bid.AdM = strings.Replace(bid.AdM, "${AUCTION_PRICE}", price, -1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we handle the macro replacement directly within the adapter? Is there a specific reason why it's being done here instead?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is private to the adapter. What exactly do you mean?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to know reason to replace macro here instead of replacing at adapter side while sending out the response

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pm-nikhil-vaidya :

I'm sorry but I don't fully understand what I've done wrong here. What I tried to do was to fulfill this recommendation

We recommend resolving creative OpenRTB macros in your adapter. Otherwise, AUCTION_PRICE will eventually get resolved by the Prebid Universal Creative, but by then the bid price will be in the ad server currency and quantized by the price granularity.

from here: https://docs.prebid.org/prebid-server/developers/add-new-bidder-go.html

and in general just make sure that all occurrences of ${AUCTION_PRICE} are accurately replaced with the bid/winning price.

How do you suggest this is better done?

@andreasgreen
Copy link
Author

Thank you all for your feedback, we will review your comments in detail and address them shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants