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

Appnexus keywords in Prebid Server differ from normal Prebid.js #2647

Closed
dbemiller opened this issue May 29, 2018 · 3 comments
Closed

Appnexus keywords in Prebid Server differ from normal Prebid.js #2647

dbemiller opened this issue May 29, 2018 · 3 comments
Assignees

Comments

@dbemiller
Copy link
Contributor

dbemiller commented May 29, 2018

Type of issue

Bug? At the very least, it's surprising behavior for publishers.

Description

In Prebid.js, the appnexus keyword bidder params look like:

  "keywords": {
    "foo": ["bar", "baz"],
    "fizz": ["buzz"]
  }
}

In Prebid Server, we expect them to look like:

{
  "keywords": [
    {
      "key": "foo",
      "value": ["bar", "baz"]
    },
    {
      "key": "fizz",
      "value": ["buzz"]
    },
  ]
}

Publishers who follow the docs expect the same params to be used for server- or client- side auctions.

Feature request

I wish I could fix this on the server... the prebid.js API is better. Unfortunately these params are stored in the database, so I can't do much about it on my side.

Could we hack it into the other param conversions?

Relates to #2420

@josephtyler
Copy link
Contributor

josephtyler commented May 29, 2018

This bug is what I'm seeing, except the examples are swapped.

Prebid Server looks like this:

{
  "keywords": {
    "foo": ["bar", "baz"],
    "fizz": ["buzz"]
  }
}

Prebid.js like this:

{
  "keywords": [
    {
      "key": "foo",
      "value": ["bar", "baz"]
    },
    {
      "key": "fizz",
      "value": ["buzz"]
    },
  ]
}

It appears that Prebid Server is expecting the same format as Prebid.js. This is the error I'm seeing in the bid response:

Invalid request format: request.imp[0].ext.appnexus failed validation.
keywords: Invalid type. Expected: array, given: object

@jsnellbaker
Copy link
Collaborator

@dbemiller To confirm, this restructuring of the keyword data is needed for both pbs endpoints?

I tried testing it and saw the error @josephtyler reported for the openrtb endpoint and the following error for the legacy endpoint:

json: cannot unmarshal object into Go struct field appnexusParams.keywords of type []appnexus.KeyVal

@jsnellbaker
Copy link
Collaborator

Should be fixed in next release (1.14.0)

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

No branches or pull requests

3 participants