-
Notifications
You must be signed in to change notification settings - Fork 269
Description
Introduction
The current implementation of FLEDGE does not allow for easy management of IGs on devices. For example, there is no way to know if an IG is present or garbage collected. To make sure that the server side is mostly in sync with the client side we propose to have an API extension to delete all IGs on the device for the current domain with an exception list of IGs we would like to keep.
The scenario is that, at IG registration time on an advertiser website, we plan to delete all IGs on the device that are not part of the current profile. Subsequently, we plan to issue a join request for the IGs based on the new state of the profile. For publisher origin IGs we might not need to clear the IGs.
Motivation
The functionality would help in two ways:
- It resets the state of the device IGs making sure that the state is in sync with the server.
- We can avoid keeping track of the IGs server side and rely on a clean slate at registration time.
Design / Proposal
We propose to extend the Fledge API to allow for the following at IG registration time on advertiser website
...
owner = 'https://www.example-dsp.com/';
listOfIGNamesToKeep = ['womens-running-shoes', 'mens-running-shoes’];
leaveAllAdInterestGroups(owner, listOfIGNamesToKeep);
...
<continue with the registration of new IGs>
Where the function leaveAllAdInterestGroups
removes all the interest groups from the current origin domain and owner not matching a name in the listOfIGNamesToKeep
.
Implementation
This function can be cloned and remove the execution_mode restriction with a listOfNamesToKeep
of IG names and made publicly available to be called just before the joinIG calls. Specifically we can add a lookup into a keep_list in this for loop.
while (same_cluster_groups.Step()) {
if (!DoRemoveInterestGroup(db, blink::InterestGroupKey(owner,same_cluster_groups.ColumnString(0))))
Alternative
At a first glance also a call to this function followed by an iteration of calls to this function should be sufficient to support the functionality (while skipping IGs in listOfIGNamesToKeep
).