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: AdTonos #3853

Merged
merged 2 commits into from
Sep 12, 2024
Merged

New Adapter: AdTonos #3853

merged 2 commits into from
Sep 12, 2024

Conversation

rkaw92
Copy link
Contributor

@rkaw92 rkaw92 commented Aug 12, 2024

Hi! Meet AdTonos, an audio ad exchange and Prebid member 👋

Docs: prebid/prebid.github.io#5543

func getMediaTypeForImp(responseImpId string, requestImps []openrtb2.Imp) (openrtb_ext.BidType, error) {
for _, requestImp := range requestImps {
if requestImp.ID == responseImpId {
if requestImp.Audio != nil {

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. The current implementation follows an anti-pattern, assumes that if there is a multi-format request, the media type defaults to openrtb_ext.BidTypeAudio, nil. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, we strongly recommend 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
Contributor Author

Choose a reason for hiding this comment

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

(Leaving this here because AdTonos is an audio ad exchange - we incidentally do audio-as-video for publishers which absolutely cannot play an audio ad due to technical constraints, but really we just want to return VASTs with sound only.)

Copy link
Contributor

Choose a reason for hiding this comment

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

@rkaw92 what bot is suggesting is to use Mtype field in the response to decide returned mediaType for an impression instead of relying on impID. For example,

func getBidType(bid openrtb2.Bid) (openrtb_ext.BidType, error) {
	// determinate media type by bid response field mtype
	switch bid.MType {
	case openrtb2.MarkupBanner:
		return openrtb_ext.BidTypeBanner, nil
	case openrtb2.MarkupVideo:
		return openrtb_ext.BidTypeVideo, nil
	case openrtb2.MarkupAudio:
		return openrtb_ext.BidTypeAudio, nil
	case openrtb2.MarkupNative:
		return openrtb_ext.BidTypeNative, nil
	}

	return "", &errortypes.BadInput{
		Message: fmt.Sprintf("Could not define media type for impression: %s", bid.ImpID),
	}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, makes sense. We don't have a way of always returning mtype currently, but I can add logic that will optionally use it when present, and fall back to the current heuristic if not. In the future, when mtype coverage increases, the code will have anticipated it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added handling for when mtype is explicitly indicated and left the guesstimation in place as a fallback, does that look better?

if requestImp.ID == responseImpId {
if requestImp.Audio != nil {
return openrtb_ext.BidTypeAudio, nil
} else if requestImp.Video != nil {

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. The current implementation follows an anti-pattern, assumes that if there is a multi-format request, the media type defaults to openrtb_ext.BidTypeVideo, nil. Prebid server expects the media type to be explicitly set in the adapter response. Therefore, we strongly recommend 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
Contributor Author

Choose a reason for hiding this comment

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

the media type defaults to openrtb_ext.BidTypeVideo, nil.

I think the review bot may be wrong here - we default to audio, not video.

Copy link
Contributor

Choose a reason for hiding this comment

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

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, c3cca60

adtonos

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/adtonos/adtonos.go:21:	Builder			100.0%
github.com/prebid/prebid-server/v2/adapters/adtonos/adtonos.go:33:	MakeRequests		76.5%
github.com/prebid/prebid-server/v2/adapters/adtonos/adtonos.go:72:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v2/adapters/adtonos/adtonos.go:77:	MakeBids		84.2%
github.com/prebid/prebid-server/v2/adapters/adtonos/adtonos.go:111:	getMediaTypeForImp	87.5%
total:									(statements)		84.3%

@@ -0,0 +1,24 @@
endpoint: https://exchange.adtonos.com/bid/{{.PublisherID}}
maintainer:
email: support@adtonos.com
Copy link
Contributor

Choose a reason for hiding this comment

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

Sent email for verification.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you, I believe a response has been sent back accordingly.

Copy link
Contributor

Choose a reason for hiding this comment

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

email verified. thanks!

userSync:
redirect:
url: https://play.adtonos.com/redir?to={{.RedirectURL}}
userMacro: '@UUID@'
Copy link
Contributor

Choose a reason for hiding this comment

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

user sync works.

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, 1147599

adtonos

Refer here for heat map coverage report

github.com/prebid/prebid-server/v2/adapters/adtonos/adtonos.go:21:	Builder			100.0%
github.com/prebid/prebid-server/v2/adapters/adtonos/adtonos.go:33:	MakeRequests		76.5%
github.com/prebid/prebid-server/v2/adapters/adtonos/adtonos.go:72:	buildEndpointURL	100.0%
github.com/prebid/prebid-server/v2/adapters/adtonos/adtonos.go:77:	MakeBids		84.2%
github.com/prebid/prebid-server/v2/adapters/adtonos/adtonos.go:111:	getMediaTypeForBid	71.4%
total:									(statements)		80.7%

@rkaw92
Copy link
Contributor Author

rkaw92 commented Aug 23, 2024

Hi, any more blockers here? I believe I've addressed all the suggestions.

Sorry, must have had an old version of the page loaded. Thanks!

@bsardo bsardo merged commit ffdd75f into prebid:master Sep 12, 2024
5 checks passed
bevenio added a commit to tamedia-adtec/prebid-server that referenced this pull request Oct 30, 2024
commit df58baf
Author: Brian Sardo <1168933+bsardo@users.noreply.github.com>
Date:   Tue Oct 29 21:05:07 2024 -0400

    Cookie Sync: Use max when limit is 0 (prebid#4022)

commit db2a872
Author: Brian Sardo <1168933+bsardo@users.noreply.github.com>
Date:   Tue Oct 29 17:20:57 2024 -0400

    ORTB 2.6: Full support with down convert for 2.5 adapters (prebid#4019)

    Co-authored-by: hhhjort <31041505+hhhjort@users.noreply.github.com>
    Co-authored-by: Veronika Solovei <kalypsonika@gmail.com>

commit 1419761
Author: Scott Kay <noreply@syntaxnode.com>
Date:   Tue Oct 29 16:35:05 2024 -0400

    Rename Blacklisted Apps to Blocked Apps (prebid#3620)

commit ddf897c
Author: AlexBVolcy <74930484+AlexBVolcy@users.noreply.github.com>
Date:   Tue Oct 29 14:07:49 2024 -0400

    Update Cookie Sync Chooser Debug Message to match Java (prebid#3558)

commit a23380f
Author: Mohammad Nurul Islam Shihan <93646635+ishihanvcs@users.noreply.github.com>
Date:   Tue Oct 29 21:34:31 2024 +0600

    ImproveDigital: Remove placementKey & addtlconsent parsing (prebid#3728)

commit 03a4abd
Author: Alex Maltsev <and1sscsgo@gmail.com>
Date:   Tue Oct 22 22:26:45 2024 +0300

    Sample: Fix prebid js loading bug on sample html page (prebid#3792)

commit 18f6798
Author: Sebastien Boisvert <sebhtml@protonmail.com>
Date:   Tue Oct 22 15:15:07 2024 -0400

    Bump Go version to 1.22 in dev containers config (prebid#3983)

commit bcf6491
Author: sindhuja-sridharan <148382298+sindhuja-sridharan@users.noreply.github.com>
Date:   Thu Oct 17 15:20:45 2024 -0600

    GumGum: Declare ORTB 2.6 support (prebid#3985)

commit 451bc44
Author: Bluesea <129151981+blueseasx@users.noreply.github.com>
Date:   Thu Oct 17 03:12:50 2024 +0800

    BlueSea: Add site capability (prebid#3910)

    Co-authored-by: prebid-bluesea <prebid@blueseasx.com>

commit 8134328
Author: Boris Yu <admin@xdevel.info>
Date:   Wed Oct 16 21:08:50 2024 +0300

    Displayio: Make imp.bidfloor optional (prebid#3959)

commit b56923c
Author: Piotr Jaworski <109736938+piotrj-rtbh@users.noreply.github.com>
Date:   Tue Oct 15 21:49:39 2024 +0200

    RTB House: Resolve AUCTION_PRICE macro (prebid#3901)

commit cbe9876
Author: Irakli Gotsiridze <ikagotso@gmail.com>
Date:   Tue Oct 15 23:30:17 2024 +0400

    enable gzip (prebid#3946)

commit 5fcbbbf
Author: Patrick Loughrey <ploughrey@triplelift.com>
Date:   Tue Oct 15 15:19:47 2024 -0400

    Triplelift: Adding flag for 2.6 support (prebid#3966)

commit c37951a
Author: ym-winston <46379634+ym-winston@users.noreply.github.com>
Date:   Tue Oct 15 15:18:54 2024 -0400

    update yieldmo.yaml to indicate support for ortb 2.6 (prebid#3968)

commit 9bb9b3d
Author: bhainesnexxen <146981622+bhainesnexxen@users.noreply.github.com>
Date:   Tue Oct 15 12:09:33 2024 -0700

    Unruly: Indicate Support for OpenRTB 2.6 (prebid#3984)

commit 87d4412
Author: Brian Sardo <1168933+bsardo@users.noreply.github.com>
Date:   Wed Oct 9 19:08:14 2024 +0000

    Refactor: Move privacy init up (prebid#3958)

commit 64584f6
Author: Brian Sardo <1168933+bsardo@users.noreply.github.com>
Date:   Tue Oct 8 19:52:25 2024 +0000

    Refactor: Remove getAuctionBidderRequests (prebid#3957)

commit d54c3ed
Author: ysfbsf <youssef.bsf@gmail.com>
Date:   Tue Oct 8 15:42:40 2024 +0200

    New Adapter: Missena (prebid#3761)

commit 8689e0d
Author: Nick <bansawbanchee@users.noreply.github.com>
Date:   Mon Oct 7 10:39:59 2024 -0400

    Sonobi: native and currency conversion support (prebid#3889)

    Co-authored-by: bansawbanchee <nick@britepool.com>

commit f27bcef
Author: dkornet-ad <169174147+dkornet-ad@users.noreply.github.com>
Date:   Thu Oct 3 09:33:54 2024 +0300

    New Adapter: Bidmatic (prebid#3731)

    authored by @dkornet-ad

commit 6c154e0
Author: Alexander Pykhteyev <alex.pykhteyev@gmail.com>
Date:   Wed Sep 25 23:08:23 2024 +0700

    New Adapter: Streamlyn  (prebid#3900)

    Co-authored-by: apykhteyev <alex@project-limelight.com>

commit 53f51a6
Author: przemkaczmarek <167743744+przemkaczmarek@users.noreply.github.com>
Date:   Wed Sep 25 17:53:07 2024 +0200

    GPC: Set extension based on header (prebid#3895)

commit c42fe53
Author: bkaneyama <brad.kaneyama@gmail.com>
Date:   Wed Sep 25 07:46:01 2024 -0700

    InMobi: mtype support (prebid#3921)

commit 8b1b96e
Author: Brian Sardo <1168933+bsardo@users.noreply.github.com>
Date:   Wed Sep 25 14:22:18 2024 +0000

    Add docs build readme  (prebid#3930)

commit 4462fce
Author: Eugene Dorfman <eugene.dorfman@gmail.com>
Date:   Wed Sep 25 16:11:45 2024 +0200

    51degrees module (prebid#3893)

commit 11b6546
Author: Alex Maltsev <and1sscsgo@gmail.com>
Date:   Mon Sep 23 16:54:18 2024 +0300

    Rubicon: Pass PBS host info to XAPI (prebid#3903)

commit 93368cc
Author: rtuschkany <35923908+rtuschkany@users.noreply.github.com>
Date:   Thu Sep 19 23:45:32 2024 +0200

    ConnectAd: String/int fix (prebid#3925)

commit 905b3a5
Author: ShriprasadM <shriprasad.marathe@gmail.com>
Date:   Thu Sep 19 18:30:20 2024 +0530

    Log non bid reasons in bidder framework (prebid#2891)

    Co-authored-by: Shriprasad Marathe <shriprasad.marathe@pubmatic.com>
    Co-authored-by: ashish.shinde <ashish.shinde@pubmatic.com>
    Co-authored-by: dhruv.sonone <dhruv.sonone@pubmatic.com>

commit 3c4527e
Author: Mikael Lundin <mikael-lundin@users.noreply.github.com>
Date:   Wed Sep 18 13:38:49 2024 +0200

    Adnuntius: Return DSA in bid response (prebid#3777)

commit 640b97c
Author: lm-ved <105272141+lm-ved@users.noreply.github.com>
Date:   Mon Sep 16 12:17:54 2024 +0530

    LemmaDigital: change endpoint (prebid#3862)

commit 3e24be7
Author: Alexander Pykhteyev <alex.pykhteyev@gmail.com>
Date:   Sat Sep 14 04:04:09 2024 +0700

    New Adapter: TGM (prebid#3848)

    Co-authored-by: apykhteyev <alex@project-limelight.com>

commit ffdd75f
Author: Robert Kawecki <rkaw92@users.noreply.github.com>
Date:   Thu Sep 12 21:52:51 2024 +0200

    New Adapter: AdTonos (prebid#3853)

commit c02ee8c
Author: Laurentiu Badea <laurb9@users.noreply.github.com>
Date:   Thu Sep 12 12:34:46 2024 -0700

    Update exchange json tests with correct hb_pb_cat_dur  (prebid#3836)

commit 7613ff5
Author: Laurentiu Badea <laurb9@users.noreply.github.com>
Date:   Thu Sep 12 12:27:07 2024 -0700

    Update adapter json test framework to validate BidVideo (prebid#3835)

commit 6cbedf0
Author: schubert-sc <144821265+schubert-sc@users.noreply.github.com>
Date:   Wed Sep 11 19:41:53 2024 +0300

    Smartx: Declare OpenRTB 2.6 support (prebid#3896)

commit e0a21d0
Author: qt-io <104574052+qt-io@users.noreply.github.com>
Date:   Wed Sep 11 19:31:58 2024 +0300

    QT: Add tcfeu support (prebid#3892)

    Co-authored-by: qt-io <qtssp-support@qt.io>

commit b920cca
Author: Yanivplaydigo <165155195+Yanivplaydigo@users.noreply.github.com>
Date:   Wed Sep 11 19:19:12 2024 +0300

    Playdigo: Add tcfeu support (prebid#3890)

commit 6a011ed
Author: ccorbo <ccorbo2013@gmail.com>
Date:   Wed Sep 11 09:53:54 2024 -0400

    Update github.com/rs/cors to v1.11.0 (prebid#3884)

    Co-authored-by: Chris Corbo <chris.corbo@indexexchange.com>

commit ec6a45d
Author: Steffen Müller <449563+steffenmllr@users.noreply.github.com>
Date:   Wed Sep 4 15:51:44 2024 +0200

    Agma: Allow app.bundle to be used as selector for apps (prebid#3780)

commit 8237f7f
Author: Scott Kay <noreply@syntaxnode.com>
Date:   Tue Sep 3 14:34:56 2024 -0400

    Refactor Bid Splitter Privacy Functions (prebid#3645)

commit f7caea5
Author: Brian Schmidt <brian.schmidt@openx.com>
Date:   Fri Aug 30 06:47:45 2024 -0700

    OpenX: indicate support for OpenRTB 2.6 (prebid#3879)

commit e825553
Author: Ben Oraki <46795400+BenOraki@users.noreply.github.com>
Date:   Fri Aug 30 16:36:22 2024 +0300

    New Adapter: Oraki (prebid#3839)

commit 2e2b49f
Author: escalax <management@escalax.io>
Date:   Fri Aug 30 16:28:04 2024 +0300

    New Adapter: Escalax (prebid#3798)

commit 4ea0e33
Author: Copper6SSP <info@copper6.com>
Date:   Fri Aug 30 16:18:46 2024 +0300

    New Adapter: Copper6SSP (prebid#3755)

commit 8d7117d
Author: Brian Sardo <1168933+bsardo@users.noreply.github.com>
Date:   Tue Aug 27 13:23:34 2024 -0400

    Revert "New Module: 51Degrees (prebid#3650)" (prebid#3888)

    This reverts commit 2606e75.

commit 84a8162
Author: Anand Venkatraman <avenkatraman@pulsepoint.com>
Date:   Thu Aug 22 16:14:32 2024 +0530

    PulsePoint: ortb 2.6 version and gpp support (prebid#3874)

    authored by @anand-venkatraman

commit bd85ba4
Author: Nick Llerandi <nick.llerandi@kargo.com>
Date:   Thu Aug 22 02:15:12 2024 -0400

    specifies ortb 2.6 support (prebid#3) (prebid#3876)

commit 54f8759
Author: dtbarne <7635750+dtbarne@users.noreply.github.com>
Date:   Wed Aug 21 07:26:30 2024 -0500

    Update mobilefuse.yaml to indicate support for OpenRTB 2.6 and GPP (prebid#3871)

commit 59a5b07
Author: mwang-sticky <mwang@freewheel.tv>
Date:   Wed Aug 21 20:26:15 2024 +0800

    freewheel-adapter: support 2.6 (prebid#3873)

commit a556e2d
Author: Dubyk Danylo <45672370+CTMBNara@users.noreply.github.com>
Date:   Wed Aug 21 15:23:39 2024 +0300

    Fix currency conversion bug. (prebid#3867)

    Co-authored-by: ddubyk <ddubyk@magnite.com>

commit d161712
Author: Pubrise <prebid@pubrise.ai>
Date:   Wed Aug 21 12:43:39 2024 +0300

    new adapter (prebid#3833)

    authored by @Pubrise

commit e8509e6
Author: bretg <bgorsline@gmail.com>
Date:   Wed Aug 21 05:40:26 2024 -0400

    declare support for ORTB 2.6 (prebid#3872)

    authored by @bretg

commit 6be7244
Author: Saar Amrani <saar120@gmail.com>
Date:   Wed Aug 21 12:37:59 2024 +0300

    Update Vidazoo bidder info for GPP support (prebid#3869)

commit e4bd6d3
Author: gg-natalia <148577437+gg-natalia@users.noreply.github.com>
Date:   Sun Aug 18 06:52:28 2024 -0300

    ADTS-455 remove video validations (prebid#3842)

    authored by @gg-natalia

commit 2606e75
Author: James Rosewell <james@51degrees.com>
Date:   Fri Aug 16 14:20:22 2024 +0100

    New Module: 51Degrees (prebid#3650)

    Co-authored-by: James Rosewell <james@51degrees.com>
    Co-authored-by: Marin Miletic <mrnmiletic@gmail.com>
    Co-authored-by: Sarana-Anna <anna.sarana@gmail.com>
    Co-authored-by: Eugene Dorfman <eugene.dorfman@gmail.com>
    Co-authored-by: Krasilchuk Yaroslav <legend.ko@hotmail.com>

commit 0e9b234
Author: Antonios Sarhanis <tsarhanis@gmail.com>
Date:   Tue Aug 13 18:28:44 2024 +1000

    Use format=prebid on adserver requests. (prebid#3846)

commit 4d64623
Author: ownAdx <135326256+ownAdx-prebid@users.noreply.github.com>
Date:   Mon Aug 12 18:51:53 2024 +0530

    OwnAdx: Bidder param and URL updates (prebid#3813)

    Co-authored-by: Hina Yadav <hina.yadav@vertoz.com>

commit 2a19924
Author: ahmadlob <109217988+ahmadlob@users.noreply.github.com>
Date:   Mon Aug 12 16:09:23 2024 +0300

    taboola-support-app-in-prebid-server (prebid#3795)

commit 4f177ca
Author: benben2001 <145416009+benben2001@users.noreply.github.com>
Date:   Mon Aug 12 21:07:38 2024 +0800

    New Adapter: MeloZen (prebid#3784)
krdzo pushed a commit to Ogury/prebid-server that referenced this pull request Oct 30, 2024
krdzo added a commit to Ogury/prebid-server that referenced this pull request Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants