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

Alkimi: Add imp extension support #4213

Open
wants to merge 111 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
4ea2865
Added Alkimi adapter on PBS-GO
kalidas-alkimi Oct 23, 2023
948a653
added jenkinsfile
abalalaev Oct 24, 2023
bdca1b3
added tests to jenkinsfile
abalalaev Oct 24, 2023
36b8b23
fixed alkimi.yaml
abalalaev Oct 26, 2023
deae80d
changed alkimi.yaml
abalalaev Oct 26, 2023
8c247a9
added pbs.yaml
abalalaev Oct 26, 2023
68228ca
added deploy to dev stage
abalalaev Oct 26, 2023
e7346da
changed jenkinsfile
abalalaev Oct 26, 2023
2beae76
changed jenkinsfile
abalalaev Oct 26, 2023
fbd031e
ExtImpAlkimi fix
pro-nsk Oct 26, 2023
8aed78b
ExtImpAlkimi fix
pro-nsk Oct 26, 2023
f5507f3
fix test
pro-nsk Oct 26, 2023
a189059
ExtImpAlkimi fix
pro-nsk Oct 27, 2023
988f4e6
ExtImpAlkimi fix
pro-nsk Oct 27, 2023
b8efa58
ExtImpAlkimi fix
pro-nsk Oct 27, 2023
27f8ac6
ExtImpAlkimi fix
pro-nsk Oct 27, 2023
7e2f882
fix test
pro-nsk Oct 27, 2023
6ebce23
fix test
pro-nsk Oct 27, 2023
6b4bd1b
fix test
pro-nsk Oct 27, 2023
976ef20
fix test
pro-nsk Oct 27, 2023
6072024
fix test
pro-nsk Oct 27, 2023
c3d0f4c
fix test
pro-nsk Oct 27, 2023
9460013
ExtImpAlkimi fix
pro-nsk Oct 27, 2023
dc84584
fix test
pro-nsk Oct 27, 2023
d190a7a
ExtImpAlkimi fix
pro-nsk Oct 27, 2023
415e22b
ExtImpAlkimi fix
pro-nsk Oct 27, 2023
99c748f
ExtImpAlkimi fix
pro-nsk Oct 27, 2023
9a02f7c
ExtImpAlkimi fix
pro-nsk Oct 27, 2023
dde6833
fix test
pro-nsk Oct 27, 2023
3041a86
fix test
pro-nsk Oct 27, 2023
cf71f24
Imp structure updated
kalidas-alkimi Oct 30, 2023
b0a394c
Renamed the Imp structure
kalidas-alkimi Oct 30, 2023
2cba27d
Merge branch 'master' of github.com:prebid/prebid-server into prebid-…
pro-nsk Oct 30, 2023
340d938
Merge master
pro-nsk Oct 30, 2023
5811110
Update alkimi adapter on adapters_builders.go file
kalidas-alkimi Oct 30, 2023
0a93d0f
Merge branch 'master' into master_asterio
pro-nsk Oct 30, 2023
9597943
prebid server v2
pro-nsk Oct 30, 2023
f8bb73b
prebid server v2
pro-nsk Oct 30, 2023
73f72d2
Updated imports according to prebid-server v2
kalidas-alkimi Oct 30, 2023
eeb5cfd
Merge branch 'master' into master_asterio
pro-nsk Oct 30, 2023
0a1e41f
update alkimi adapter
pro-nsk Oct 31, 2023
5cd75fc
update alkimi adapter
pro-nsk Oct 31, 2023
95aea05
update alkimi adapter
pro-nsk Oct 31, 2023
f5cc7b3
update alkimi adapter
pro-nsk Oct 31, 2023
254642e
Update alkimi adapter according to review
kalidas-alkimi Oct 31, 2023
3be547c
Merge branch 'master' into master_asterio
pro-nsk Oct 31, 2023
773bf92
Removed tab spaces
kalidas-alkimi Nov 2, 2023
1f9a2b8
Merge branch 'master' into master_asterio
pro-nsk Nov 8, 2023
7b637d5
unit tests
pro-nsk Nov 8, 2023
38690af
bid count fix
pro-nsk Nov 8, 2023
467a6e5
make bids fix
pro-nsk Nov 8, 2023
ed8e9a2
fix test
pro-nsk Nov 8, 2023
b0fb125
fix test
pro-nsk Nov 8, 2023
33ed0c0
fix test
pro-nsk Nov 8, 2023
0a3f19c
fix test
pro-nsk Nov 8, 2023
3522adc
fix test
pro-nsk Nov 8, 2023
87a2333
Updated the review comments
kalidas-alkimi Nov 9, 2023
f25134d
Merge branch 'master' into master_asterio
pro-nsk Nov 9, 2023
adeeede
fixes
pro-nsk Nov 10, 2023
4013eb5
fix test
pro-nsk Nov 10, 2023
f970b00
Changes for the review
kalidas-alkimi Nov 10, 2023
d717a33
JSON tests
pro-nsk Nov 15, 2023
24b83de
JSON tests
pro-nsk Nov 15, 2023
1c58cff
JSON tests
pro-nsk Nov 15, 2023
39850c1
JSON tests
pro-nsk Nov 15, 2023
6e0b269
JSON tests
pro-nsk Nov 15, 2023
6bc2d7f
JSON tests
pro-nsk Nov 15, 2023
f4581e2
JSON tests
pro-nsk Nov 15, 2023
e31ac96
JSON tests
pro-nsk Nov 15, 2023
0363693
JSON tests
pro-nsk Nov 15, 2023
f2f04f0
JSON tests
pro-nsk Nov 15, 2023
6d2b1a1
JSON tests
pro-nsk Nov 15, 2023
5bee0c6
JSON tests
pro-nsk Nov 15, 2023
9b23941
JSON tests
pro-nsk Nov 15, 2023
bc3f1f6
JSON tests
pro-nsk Nov 15, 2023
f4cb595
JSON tests
pro-nsk Nov 15, 2023
2956753
JSON tests
pro-nsk Nov 15, 2023
88735d4
JSON tests
pro-nsk Nov 15, 2023
c0e6e10
JSON tests
pro-nsk Nov 15, 2023
857a8dc
JSON tests
pro-nsk Nov 15, 2023
70f5518
JSON tests
pro-nsk Nov 15, 2023
48348c5
JSON tests
pro-nsk Nov 15, 2023
e9a81b3
JSON tests
pro-nsk Nov 15, 2023
0aede9d
JSON tests
pro-nsk Nov 15, 2023
4c40256
JSON tests
pro-nsk Nov 15, 2023
cff0982
JSON tests
pro-nsk Nov 15, 2023
cee8706
JSON tests
pro-nsk Nov 15, 2023
4b5c779
JSON tests
pro-nsk Nov 15, 2023
c39d1cb
JSON tests added
pro-nsk Nov 15, 2023
46a764d
imports fixed
pro-nsk Nov 16, 2023
be64f7b
Merge branch 'master' into master_asterio
pro-nsk Nov 16, 2023
681a034
tests fixed
pro-nsk Nov 16, 2023
325861d
tests fixed
pro-nsk Nov 16, 2023
e77d00c
tests fixed
pro-nsk Nov 16, 2023
c3fe4cc
remove unnecessary tests
pro-nsk Nov 16, 2023
39a5b97
Merge branch 'master' into master_asterio
pro-nsk Nov 16, 2023
1e6bfdc
tests fixed
pro-nsk Nov 16, 2023
e90c6d3
tests fixed
pro-nsk Nov 16, 2023
4541d7e
tests fixed
pro-nsk Nov 16, 2023
2d298c2
Merge pull request #2 from prebid/master
pro-nsk Jan 16, 2024
59a1a87
Merge branch 'master_asterio' into master
pro-nsk Jan 16, 2024
7530153
Added User sync url for Alkimi adapter
kalidas-alkimi Jan 16, 2024
4ad7bd0
revert changes
pro-nsk Jan 16, 2024
da32542
fix user-sync url
pro-nsk Jan 18, 2024
c7e0320
Updated the user sync url to prod env instead of dev env
kalidas-alkimi Jan 18, 2024
50a999a
Merge branch 'master' of https://github.com/Alkimi-Exchange/prebid-se…
kalidas-alkimi Jan 18, 2024
92509c8
Merge branch 'master' of github.com:prebid/prebid-server into prebid-…
pro-nsk Jan 18, 2024
f3d1eac
Merge branch 'prebid-master2'
pro-nsk Jan 18, 2024
055866e
Merge pull request #6 from prebid/master
pro-nsk Feb 12, 2025
9b60ac7
Added support for Imp extention object
kalidas-alkimi Feb 13, 2025
9406a5c
Updated the jsonutil
kalidas-alkimi Feb 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions adapters/alkimi/alkimi.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ type adapter struct {
endpoint string
}

type extObj struct {
AlkimiBidderExt openrtb_ext.ExtImpAlkimi `json:"bidder"`
}

// Builder builds a new instance of the Alkimi adapter for the given bidder with the given config.
func Builder(bidderName openrtb_ext.BidderName, config config.Adapter, server config.Server) (adapters.Bidder, error) {
endpointURL, err := url.Parse(config.Endpoint)
Expand Down Expand Up @@ -67,15 +63,15 @@ func updateImps(bidRequest openrtb2.BidRequest) ([]openrtb2.Imp, []error) {
updatedImps := make([]openrtb2.Imp, 0, len(bidRequest.Imp))
for _, imp := range bidRequest.Imp {

var bidderExt adapters.ExtImpBidder
var bidderExt = make(map[string]json.RawMessage)
var extImpAlkimi openrtb_ext.ExtImpAlkimi

if err := jsonutil.Unmarshal(imp.Ext, &bidderExt); err != nil {
errs = append(errs, err)
continue
}

if err := jsonutil.Unmarshal(bidderExt.Bidder, &extImpAlkimi); err != nil {
if err := jsonutil.Unmarshal(bidderExt["bidder"], &extImpAlkimi); err != nil {
errs = append(errs, err)
continue
}
Expand All @@ -92,15 +88,24 @@ func updateImps(bidRequest openrtb2.BidRequest) ([]openrtb2.Imp, []error) {
imp.Instl = extImpAlkimi.Instl
imp.Exp = extImpAlkimi.Exp

temp := extObj{AlkimiBidderExt: extImpAlkimi}
temp.AlkimiBidderExt.AdUnitCode = imp.ID
temp := extImpAlkimi
temp.AdUnitCode = imp.ID
Copy link
Contributor

Choose a reason for hiding this comment

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

Is imp.ID required to be part of impression extension as this is standard ORTB parameter ?
Usually bidder specific custom parameters are added in impression extension.

When bidder receive request, imp.ID can be used as AdUnitCode

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it's required for bidder.
But this is not related to this PR, in this PR we've added support of any parameters in imp.ext map.


tempJson, err := jsonutil.Marshal(temp)
if err != nil {
errs = append(errs, err)
continue
}

newExt := bidderExt
newExt["bidder"] = tempJson

extJson, err := json.Marshal(temp)
newExtJson, err := jsonutil.Marshal(newExt)
if err != nil {
errs = append(errs, err)
continue
}
imp.Ext = extJson
imp.Ext = newExtJson
updatedImps = append(updatedImps, imp)
}

Expand Down
Loading