Skip to content

Commit

Permalink
add viewabilty field
Browse files Browse the repository at this point in the history
  • Loading branch information
monicaroxanabota committed Jan 21, 2025
1 parent 0a24410 commit 216311a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
3 changes: 2 additions & 1 deletion adapters/connatix/connatix.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ func buildRequestImp(imp *openrtb2.Imp, ext impExtIncoming, displayManagerVer st

impExt := impExt{
Connatix: impExtConnatix{
PlacementId: ext.Bidder.PlacementId,
PlacementId: ext.Bidder.PlacementId,
ViewabilityPercentage: ext.Bidder.ViewabilityPercentage,
},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
},
"ext": {
"bidder": {
"placementId": "some-placement-id"
"placementId": "some-placement-id",
"viewabilityPercentage": 0.6
}
}
}
Expand Down Expand Up @@ -78,7 +79,8 @@
"displaymanagerver": "test-1.0.0",
"ext": {
"connatix": {
"placementId": "some-placement-id"
"placementId": "some-placement-id",
"viewabilityPercentage": 0.6
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion adapters/connatix/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ type impExt struct {
}

type impExtConnatix struct {
PlacementId string `json:"placementId,omitempty"`
PlacementId string `json:"placementId,omitempty"`
ViewabilityPercentage float64 `json:"viewabilityPercentage,omitempty"`
}

type bidExt struct {
Expand Down
3 changes: 2 additions & 1 deletion openrtb_ext/imp_connatix.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package openrtb_ext

type ExtImpConnatix struct {
PlacementId string `json:"placementId"`
PlacementId string `json:"placementId"`
ViewabilityPercentage float64 `json:"viewabilityPercentage"`
}
4 changes: 4 additions & 0 deletions static/bidder-params/connatix.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"type": "string",
"minLength": 1,
"description": "Placement ID"
},
"viewabilityPercentage": {
"type": "number",
"description": "Declared viewability percentage (values from 0 to 1, where 1 = 100%)"
}
},
"required": ["placementId"]
Expand Down

0 comments on commit 216311a

Please sign in to comment.