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

Topics FPD module: initial release #8646

Merged
merged 8 commits into from
Jul 28, 2022
Merged

Conversation

dgirardi
Copy link
Collaborator

@dgirardi dgirardi commented Jul 5, 2022

Type of change

  • Feature

Description of change

This adds a new topicsFpdModule that queries the topics api to populate user.data.

Since document.browsingTopics() always returns an empty list for me, I need volunteers to test this in the real world.

Other information

Closes #7968
Depends on #8626
Documentation TBD

@dgirardi dgirardi mentioned this pull request Jul 5, 2022
1 task
@dgirardi
Copy link
Collaborator Author

dgirardi commented Jul 5, 2022

Note that this affects anyone who's using FPD modules, by adding an additional promise resolution at the beginning of auctions - it was done with #8626 in mind. IMO this should wait for that to get merged as to not needlessly affect the majority of users (who are not using topics).

@dgirardi dgirardi added feature needs 2nd review Core module updates require two approvals from the core team labels Jul 5, 2022
@patmmccann
Copy link
Collaborator

Note this has one review already from @vkimcm ; only needs one more

@dgirardi
Copy link
Collaborator Author

Updated to merge in GreedyPromise; this is now mergable, however, note that the spot testing from #8630 was done before the changes you requested here @patmmccann. I used the example topics as reported there but the new logic is, technically, untested.

return topics;
}

const topicsData = getTopics().then((topics) => getTopicsData(getRefererInfo().domain, topics));
Copy link
Collaborator

@patmmccann patmmccann Jul 27, 2022

Choose a reason for hiding this comment

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

It seems we should potentially use the domain of the url in https://developer.mozilla.org/en-US/docs/Web/API/Document/currentScript

Or perhaps a configuration override is sufficient.

Pubishers may wish to indicate the breadth of the footprint here, eg hearst.com instead of somemagazine.com or cafemedia.com instead of cafedelites.com.

The topics api results are reporteed to be dependent on the domain of the script which calls it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure I understand - do you mean that topics will return different results if you use <script src="//rubicon.com/prebid.js" /> compared <script src="//appnexus.com/prebid.js" />? that seems insane.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's how it is described

Copy link
Collaborator

@patmmccann patmmccann Jul 28, 2022

Choose a reason for hiding this comment

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

So it appears there's been some clarification:

"A design goal of the Topics API is to enable interest-based advertising without the sharing of information to more entities than is currently possible with third-party cookies. The Topics API proposes that topics can only be returned for API callers that have already observed them, within a limited timeframe.

Key Term
A Topics API caller is the entity that calls the document.browsingTopics() JavaScript method, and will use the topics returned by the method to help select relevant ads. Typically, a call to document.browsingTopics() would be from code included in a site from a third party such as an adtech platform. The browser determines the caller from the site of the current document. So, if you're a third party on a page, make sure you call the API from an iframe that your site owns."

This suggests only if you call the api from inside a frame and do the post-message will you get different behavior

Let's keep that for a follow up and cancel this change request to this pr

Copy link
Collaborator

Choose a reason for hiding this comment

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

@dgirardi testing successful

@patmmccann patmmccann merged commit 95ee493 into prebid:master Jul 28, 2022
JacobKlein26 pushed a commit to nextmillenniummedia/Prebid.js that referenced this pull request Feb 9, 2023
* Topics FPD module

* Small improvements

* Map taxonomyVersion to segtax, modelVersion to segclass

* Convert fpdModule & topicsFpdModule to use GreedyPromise
jorgeluisrocha pushed a commit to jwplayer/Prebid.js that referenced this pull request May 23, 2023
* Topics FPD module

* Small improvements

* Map taxonomyVersion to segtax, modelVersion to segclass

* Convert fpdModule & topicsFpdModule to use GreedyPromise
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature needs 2nd review Core module updates require two approvals from the core team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Topics api results on user.data
3 participants