-
Notifications
You must be signed in to change notification settings - Fork 84
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
Support for First Party Data #134
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added a few comments/questions/suggestions. Kindly have a look at it.
PrebidMobile/API1.0/src/main/java/org/prebid/mobile/PrebidServerAdapter.java
Outdated
Show resolved
Hide resolved
@avohraa, I have added changes with you proposals. |
|
If take a look at a request from PS to a bidder you will see that PS sends
"user": {
"ext": {
"data": {
"bidders": ["randomdata"]
}
}
}
"ext": {
"prebid": {
"data": {
"bidders": ["rubicon"]
}
}
} |
This solution for First Party Data is a common method of passing FPD to all adapters, by way of the ACL. To answer your question yes, each adapter will need to read from an internal data structure to consume it. As a goal of Prebid in general, we are working towards having an externally (publisher facing) method to pass common features for each bidder. This iteration we are integrating FPD and will attempt to follow OpenRTB like attributes wherever possible.
As Oleksandr has commented, you cannot corrupt the data by passing the ACL bidder list. If you do so, the solution as shown above will just treat it like first party data and pass it for adapters to consume. |
@yoalex5 Can you resolve the merge conflict ? |
…ty_data # Conflicts: # PrebidMobile/API1.0/src/test/java/org/prebid/mobile/PrebidServerAdapterTest.java
@anwzhang I have resolved the merge conflicts |
@anwzhang, could you please review it ? |
@@ -469,24 +469,39 @@ private JSONObject getPostData() throws NoContextException { | |||
if (ext != null && ext.length() > 0) { | |||
postData.put("ext", ext); | |||
} | |||
|
|||
JSONObject objectWithoutEmptyValues = Util.getObjectWithoutEmptyValues(postData); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see necessary for this part of code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part of code allows us to write an elegant code like:
user.put("keywords", globalUserKeywordString);
ext.put("consent", TargetingParams.getGDPRConsentString());
instead of:
if (!TextUtils.isEmpty(finalKeywords)) {
user.put("keywords", finalKeywords);
}
if (TargetingParams.isSubjectToGDPR() != null) {
ext.put("consent", TargetingParams.getGDPRConsentString());
}
Step by step (during refactoring) I am going to remove redundant if (!TextUtils.isEmpty())
checks
GitHub issue #131
//ACL block
Access Control List
TargetingParams
API:Example:
OpenRTB request:
//data block
2.
global user data
TargetingParams
API:Example:
OpenRTB request:
global context data
TargetingParams
API:Example:
OpenRTB request:
adunit context data
AdUnit
API:Example:
OpenRTB request:
global context keywords
TargetingParams
API:Example:
OpenRTB request:
global user keywords
TargetingParams
API:Example:
OpenRTB request:
adunit context keywords
AdUnit
API:Example:
OpenRTB request:
Deprecated API
AdUnit. userKeywords
was marked as deprecated, because this parameter createsuser.keywords
object.Since
global user keywords
API has been added in this PR and it brings the functionality to work withuserKeywords
onglobal
level hence I have added a compatibility function to createuser.keywords
object.AdUnit.UserKeyword
usesTargetingParams.UserKeyword
inside. The parameterkey
will be omittedandroid_all_cahnges.zip