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

Geolocation RTD module: initial release #10012

Merged
merged 15 commits into from
Jul 19, 2023

Conversation

AdmixerTech
Copy link
Contributor

@AdmixerTech AdmixerTech commented May 30, 2023

Type of change

  • Feature

Description of change

add geolocation rtd provider

Other information

prebid.github.io pull #4607

if (done) return;
done = true;
geolocation && adUnits && adUnits.forEach((unit) => {
unit.bids && unit.bids.forEach(bid => bid.geolocation = cleanObj(geolocation));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of tacking this on to bid requests, it's IMO better to fill this out as FPD (setting the fields in requestBidsObject.ortb2Fragments.global.device.geo). That way a number of bidders will automatically forward that data, and activity controls will automatically control the accuracy.

Otherwise this relies entirely on more work in bid adapters so that they may pick this up. Looking at the spec it looks like most of the fields have a spot with the exception of those about velocity, I'd still put those somewhere under geo.ext.

Copy link
Collaborator

@patmmccann patmmccann May 30, 2023

Choose a reason for hiding this comment

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

i'd prefer the browser doesn't even ask for precise geo unless https://github.com/InteractiveAdvertisingBureau/Global-Privacy-Platform/blob/87935c4b574e974ff20ff5c1b9641374878031e2/Sections/US-National/IAB%20Privacy%E2%80%99s%20National%20Privacy%20Technical%20Specification.md?plain=1#L229 permitted it, or in the EU, special Feature number one. This seems preferable to geo gets asked for then rounded without the proper consent. Does activityControls allow for that? we'd want to prevent invoking this altogether, not just manipulating its input to bid requests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@patmmccann just to be clear, i need to check consent or just ensure that consent string provided ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@AdmixerTech after discussing this offline, this should not use the browser API if the transmitPreciseGeo activity is denied. Activities are very new, but the basic idea is to do something like

if (isActivityAllowed(ACTIVITY_TRANSMIT_PRECISE_GEO, activityParams(MODULE_TYPE_RTD, 'geolocation'))) {
   // call browser geo api
}

Some examples of the activity API in use for reference:

valid: isAllowed(ACTIVITY_ACCESS_DEVICE, activityParams(moduleType, mod, {
[ACTIVITY_PARAM_STORAGE_TYPE]: storageType
}))
};

function isS2SAllowed(s2sConfig) {
return dep.isAllowed(ACTIVITY_FETCH_BIDS, activityParams(MODULE_TYPE_PREBID, PBS_ADAPTER_NAME, {
[ACTIVITY_PARAM_S2S_NAME]: s2sConfig.configName
}));
}

});
});
if (auctionDelay > 0) {
setTimeout(complete, auctionDelay);
Copy link
Collaborator

Choose a reason for hiding this comment

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

the rtd parent module handles auction delay and waitforit, no need for you to

Copy link
Collaborator

Choose a reason for hiding this comment

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

@patmmccann patmmccann changed the title add Geolocation RTD Geolocation RTD module: initial release May 30, 2023
remove auction delay
move geo to ortb2Fragments.global.device.geo
}
function init(moduleConfig) {
geolocation = void 0;
if (!isFn(navigator?.permissions?.query) || !isFn(navigator?.geolocation?.getCurrentPosition)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

we need to suppress this behavior when gpp sid 7 indicates no consent to precise location or GDPR special feature 1 doesnt exist for the vendor(s) https://vendor-list.consensu.org/v2/vendor-list.json .

this doesnt seem to be blocked by additional activity control work

@jdwieland8282
Copy link
Member

The ID PMC agrees that the module should first check the CMP api to determine whether the user has revoked location sharing before prompting the user for permission to geo locate.

@patmmccann
Copy link
Collaborator

Generally this is looking pretty good; we should add some discussion of interaction with activity control to the doc

@dariaboyko
Copy link
Contributor

Hi! Here are the docs prebid/prebid.github.io#4680

@dariaboyko
Copy link
Contributor

hi! the docs are ready. can you please put a label on that this pr is ready to be merged?

@patmmccann patmmccann self-assigned this Jul 14, 2023
@patmmccann patmmccann added the needs 2nd review Core module updates require two approvals from the core team label Jul 14, 2023
@patmmccann
Copy link
Collaborator

Thanks! @dgirardi could you give another sign off?

@dariaboyko
Copy link
Contributor

Hi @dgirardi ! Can you please check this pull request? Also I have a question when next release is planned?

@patmmccann patmmccann merged commit bc260d7 into prebid:master Jul 19, 2023
2 checks passed
santii7395 pushed a commit to themaven-net/Prebid.js that referenced this pull request Aug 28, 2023
* Update README.md

update

* add geolocation rtd provider

* move config to prams
remove auction delay
move geo to ortb2Fragments.global.device.geo

* tslint

* geolocation cmp allowance

* lint fixes

* test fixes

* test fixes

* testing

* testing 2

* testing 3

* testing 4

---------

Co-authored-by: Daria Boyko <[email protected]>
Co-authored-by: dariaboyko <[email protected]>
@dariaboyko dariaboyko deleted the geolocationRTD branch July 31, 2024 07:38
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.

None yet

6 participants