Skip to content

SmileWanted: Use bid.mtype to set the bid type, add audio and native support - #4699

Open
JFSmile wants to merge 2 commits into
prebid:masterfrom
SmileWanted:smilewanted-bid-mtype
Open

JFSmile wants to merge 2 commits into
prebid:masterfrom
SmileWanted:smilewanted-bid-mtype

Conversation

@JFSmile

@JFSmile JFSmile commented Nov 4, 2026

Copy link
Copy Markdown

🔧 Type of changes

  • bid adapter update

✨ What's the context?

The SmileWanted endpoint returns bid.mtype on its bids. The adapter now uses it to set the bid type, and supports audio and native.

🧠 Rationale behind the change

  • bid.mtype sets the bid type when present: 1 banner, 2 video, 3 audio, 4 native.
  • Without mtype, the bid type still comes from the impression (video, then audio, then native, otherwise banner).
  • Audio and native are declared for app and site.

🧪 Test plan

  • Unit tests for a banner + video impression with mtype 1, with mtype 2 and without mtype.
  • Unit tests for audio and native bids, with and without mtype.
  • SmileWantedBidderTest passes with 100% line and branch coverage of SmileWantedBidder, checkstyle clean.

🏎 Quality check

  • Are your changes following our code style guidelines?
  • Are there any breaking changes in your code?
  • Does your test coverage exceed 90%?
  • Are there any erroneous console logs, debuggers or leftover code in your changes?

- Read bid.mtype (1 banner, 2 video) when it is set.
- Fall back to the impression when mtype is absent.
- Add tests for a banner + video impression with mtype 1, mtype 2 and
  without mtype.
- Declare audio and native media types for app and site.
- Map bid.mtype 3 to audio and 4 to native.
- Without mtype, fall back to the impression: video, then audio, then
  native, otherwise banner.
- Add tests for audio and native bids, with and without mtype.
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.

1 participant