Skip to content

Comments

New Adapter: Pixfuture#4117

Open
pixfuture-media wants to merge 73 commits intoprebid:masterfrom
pixfuture-media:master
Open

New Adapter: Pixfuture#4117
pixfuture-media wants to merge 73 commits intoprebid:masterfrom
pixfuture-media:master

Conversation

@pixfuture-media
Copy link

This Pixfuture Prebid Server Adapter enables seamless integration with Pixfuture's ad exchange, allowing publishers to leverage their demand through server-side header bidding. The adapter formats outgoing bid requests, processes incoming bid responses, and adheres to OpenRTB standards for efficient and privacy-compliant ad delivery.

@github-actions
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, 3f33089

pixfuture

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:20:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:28:	MakeRequests		85.7%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:49:	getMediaTypeForBid	100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:64:	MakeBids		90.0%
total:									(statements)		91.4%

@github-actions
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, 993f157

pixfuture

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:20:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:27:	MakeRequests		85.7%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:48:	getMediaTypeForBid	100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:63:	MakeBids		90.0%
total:									(statements)		91.2%

@gargcreation1992 gargcreation1992 self-assigned this Dec 24, 2024
@pixfuture-media
Copy link
Author

pixfuture-media commented Dec 27, 2024 via email

@bsardo bsardo changed the title New Pixfuture adapter New Adapter: Pixfuture Jan 6, 2025
@bsardo bsardo added the adapter label Jan 6, 2025
@pixfuture-media
Copy link
Author

I would like to ask for your help with reviewing a pull request [New Adapter: Pixfuture #4117].
Your feedback would be greatly appreciated.
When do you think you might be able to review this?
Thank you in advance for your time and effort.

@github-actions
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, 284c847

pixfuture

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:20:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:27:	MakeRequests		85.7%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:48:	getMediaTypeForBid	100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:63:	MakeBids		90.0%
total:									(statements)		91.2%

@pixfuture-media
Copy link
Author

Thank you, Sheridan,
We will fix it

@github-actions
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, 5d3bef4

pixfuture

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:22:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:28:	MakeRequests		66.7%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:78:	MakeBids		92.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:131:	getMediaTypeForBid	66.7%
total:									(statements)		76.9%

@pixfuture-media
Copy link
Author

Dear Sheridan, we made the requested changes. Please review and approve the merge.

@pixfuture-media
Copy link
Author

Hi team, please review our code and merge it.

Copy link
Contributor

@scr-oath scr-oath left a comment

Choose a reason for hiding this comment

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

Review Update - Pixfuture Adapter

Thanks for the continued work on this adapter. I've done a thorough re-review of the current state. Many of the earlier comments have been addressed (struct naming, alphabetical ordering in exchange/adapter_builders.go, use of http.MethodPost, deleted commented-out code, etc.). However, several issues remain unresolved:


🔴 BLOCKING

1. Alphabetical ordering in openrtb_ext/bidders.go (still broken)

BidderPixfuture is at the end of the coreBidderNames array (after BidderZmaticoo). It needs to be moved to its correct alphabetical position between BidderPGAMSsp and BidderPlaydigo. The const block is correct but the array is not.

2. Missing userMacro in cookie sync configuration (pixfuture.yaml)

The userSync.redirect section is missing a userMacro field. Without this, {{.UserMacro}} in the default RedirectURL template resolves to an empty string, meaning the /setuid callback receives uid= (empty) and no user ID is ever stored. The entire cookie sync becomes non-functional.

Please add the macro your sync endpoint uses to substitute the user ID, e.g.:

userSync:
  redirect:
    url: "https://sync.pixfuture.com/cookiesync?gdpr={{.GDPR}}&consent={{.GDPRConsent}}&us_privacy={{.USPrivacy}}&redirect={{.RedirectURL}}"
    userMacro: "${UID}"

3. Cookie sync endpoint must redirect to PBS /setuid

As @bsardo and @bretg noted, the sync endpoint must ultimately redirect to the PBS host's /setuid endpoint. The {{.RedirectURL}} macro handles constructing that URL, but your server at sync.pixfuture.com/cookiesync must honor the redirect query parameter and redirect the user there with their UID appended. Please confirm this is working.

4. Missing GPP privacy parameters in sync URL

Add GPP macros for compliance with multi-state privacy frameworks:

&gpp={{.GPP}}&gpp_sid={{.GPPSID}}

🟡 SUGGESTIONS (non-blocking but strongly recommended)

5. Memory efficiency in loop patterns (pixfuture.go)

In MakeBids, the for _, bid := range loop copies each openrtb2.Bid struct (which is large). Use index-based iteration instead:

for i := range bidResp.SeatBid {
    for j := range bidResp.SeatBid[i].Bid {
        bid := &bidResp.SeatBid[i].Bid[j]
        bidType, err := getMediaTypeForBid(bid)
        // ...
        bidResponse.Bids = append(bidResponse.Bids, &adapters.TypedBid{
            Bid:     bid,
            BidType: bidType,
        })
    }
}

Also update getMediaTypeForBid to accept a pointer: func getMediaTypeForBid(bid *openrtb2.Bid).

6. Duplicate test files

supplemental/no_bids.json and supplemental/status_204.json are byte-identical (both test HTTP 204). Change no_bids.json to return HTTP 200 with an empty seatbid array to test the empty-bids code path at line 121.

7. Test coverage gaps

Consider adding tests for:

  • Malformed JSON response body (exercises error path at lines 88-92)
  • Multi-impression request (all current tests are single-impression)
  • Bid response with mtype field set (currently all tests use the ext.prebid.type fallback — none exercise the OpenRTB 2.6 MType code path)

✅ Previously raised comments that are now resolved

  • Struct renamed from PixfutureAdapter to adapter
  • testdata directory replaced with pixfuturetest/exemplary + supplemental
  • config.go changes reverted ✅
  • go.mod/go.sum no longer modified ✅
  • coverage.out no longer in the diff ✅
  • docs/pixfuture.md removed from PR ✅
  • exchange/adapter_builders.go alphabetical ordering fixed ✅
  • TestJsonSamples now calls RunJSONBidderTest
  • minLength: 3 added to pix_id schema ✅
  • Uses http.MethodPost instead of "POST"
  • Commented-out code deleted ✅
  • Uses adapters.IsResponseStatusCodeNoContent / CheckResponseStatusCodeForErrors
  • GVL Vendor ID 839 verified ✅
  • Maintainer email verified ✅

@github-actions
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, c1f03ba

pixfuture

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:22:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:28:	MakeRequests		66.7%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:78:	MakeBids		92.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:131:	getMediaTypeForBid	66.7%
total:									(statements)		76.9%

Fix malformed JSON error handling in Pixfuture adapter
@github-actions
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, 0a39bde

pixfuture

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:22:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:28:	MakeRequests		66.7%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:78:	MakeBids		92.3%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:137:	getMediaTypeForBid	69.2%
total:									(statements)		77.6%

Fixed issue with macroses
@github-actions
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, 857c4c1

pixfuture

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:22:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:28:	MakeRequests		66.7%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:78:	MakeBids		92.3%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:137:	getMediaTypeForBid	69.2%
total:									(statements)		77.6%

Reordered by alphabet BidderPixfuture from the list of bidders.
fix order for BidderPixfuture,
@github-actions
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, bac0bf5

pixfuture

Refer here for heat map coverage report

github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:22:	Builder			100.0%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:28:	MakeRequests		66.7%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:78:	MakeBids		92.3%
github.com/prebid/prebid-server/v3/adapters/pixfuture/pixfuture.go:137:	getMediaTypeForBid	69.2%
total:									(statements)		77.6%

@pixfuture-media
Copy link
Author

Hi Sheridan,

We have resolved the following issues:
Alphabetical Ordering: Fixed the ordering in openrtb_ext/bidders.go.
Cookie Sync Configuration: Fixed the missing userMacro in pixfuture.yaml.
Cookie Sync Endpoint: Updated the endpoint to ensure it correctly redirects to the PBS /setuid endpoint.
Please let us know once this code has been merged into production.

Best regards,
Vitali I.

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.

7 participants