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

Enrichment FPD Module: Support for GPC Detection #8925

Merged
merged 3 commits into from
Aug 30, 2022

Conversation

jlquaccia
Copy link
Collaborator

Type of change

  • Feature

Description of change

  • Added a function within the Enrichment FPD Module to detect whether or not GPC is enabled. If it is enabled, then ortb2.regs.ext.gpc will be set to 1.

Other information

#8424
https://global-privacy-control.glitch.me

@dgirardi can you review when you have time?

validated = processFpd({}, {}).global;
expect(validated.regs).to.equal(undefined);

navigator.globalPrivacyControl = { gpc: 1 };
Copy link
Collaborator

@dgirardi dgirardi Aug 30, 2022

Choose a reason for hiding this comment

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

as I read the proposal this should be true or false. However, I have two objections:

  • aren't we doing this too early? none of my browsers set this, and it's not even mentioned on MDN. Is the proposal final and on its way to implementation?
  • Once the navigator does set this, this test will not work right, because it's going to be a read-only field. I think you need to mock it here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

just updated my PR. somehow missed the true or false part thanks for pointing that out. i think the test is ok now.

correct, from what i gathered as well, this functionality does still seem to be in it's early stages, not 100% sure when it will be fully implemented. it does state here how detection will occur though: https://global-privacy-control.glitch.me/ (was taken from https://globalprivacycontrol.org/, from the faq at the bottom under "I’m a publisher, developer, or other service. How can I support GPC?")

i was aiming to be proactive, however, as you mentioned because this is still in the proposal phase should we hold off entirely for the time being in case specifications change?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it's OK because as it's written the worst that can happen is that we don't pick up the gpc flag. I'm just surprised that we'd get here before MDN :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

haha i agree, MDN typically knows all. least the change on our end for this is pretty minimal/low-risk like you pointed out anyway

@patmmccann patmmccann merged commit 253ef8f into prebid:master Aug 30, 2022
@patmmccann patmmccann self-assigned this Aug 30, 2022
@patmmccann
Copy link
Collaborator

Thanks @jlquaccia !!

JacobKlein26 pushed a commit to nextmillenniummedia/Prebid.js that referenced this pull request Feb 9, 2023
* support for gpc detection

* updated test name and some other minor changes

* adjusted test

Co-authored-by: Jason Quaccia <jasonquaccia@RWC-WS233.local>
jorgeluisrocha pushed a commit to jwplayer/Prebid.js that referenced this pull request May 23, 2023
* support for gpc detection

* updated test name and some other minor changes

* adjusted test

Co-authored-by: Jason Quaccia <jasonquaccia@RWC-WS233.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants