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

WIP API #1

Merged
merged 3 commits into from
Sep 11, 2024
Merged

WIP API #1

merged 3 commits into from
Sep 11, 2024

Conversation

andyleiserson
Copy link
Collaborator

No description provided.

Copy link
Member

@martinthomson martinthomson left a comment

Choose a reason for hiding this comment

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

Lots of comments here, most of which lead to more work. But this is a good starting point.

api.bs Outdated Show resolved Hide resolved
api.bs Outdated Show resolved Hide resolved
api.bs Show resolved Hide resolved
api.bs Outdated Show resolved Hide resolved
When an [=impression=] occurs, information about the impression is saved by the
browser in a write-only store. This includes an identifier for the impression
and some metadata about the impression, such as whether the impression was an
ad view or an ad click.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ad view or an ad click.
ad view or an ad click.

The write-only piece is negotiable. I can see why a site couldn't modify its store of impressions, but it's also not really necessary if the reading by other sites is controlled properly.

The whole business with "what does the e-Privacy Directive say about storing information" is silly. It matters, of course, but not every regulatory system will grow a PECR-like piece of baggage.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The write-only term was actually in the original and I also had some doubts about it. I think it's an oversimplification. We should discuss the characteristics of the store somewhere (I think I added a section for that), but it takes more than just saying "write only" to capture the important characteristics.

api.bs Outdated Show resolved Hide resolved
api.bs Outdated
required unsigned long histogramSize;

unsigned long lookbackDays = Infinity;
PrivateAttributionImpressionType impression;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
PrivateAttributionImpressionType impression;
required DOMString aggregationSystemId;

Now, I don't think that this is a string that someone will be happy typing often:

let whatsit = await privateAttribution.measureConversion({aggregationSystemId: "joe", ...});

That's already unwieldy.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

How about shortening it to aggregator?

api.bs Show resolved Hide resolved
api.bs Outdated Show resolved Hide resolved
# Implementation Considerations # {#implementation-considerations}

* Management and distribution of values for the following:
* Histogram size
Copy link
Member

Choose a reason for hiding this comment

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

Two things on this that are somewhat in tension:

  1. When it comes down to it, the browser should really care how big histograms are. Sites get to do basically whatever with CPU and network resources and it's hardly going to be that bad if a site wants a really big histogram.
  2. I don't like the idea of really big histograms that basically make a mockery of our aggregation aspirations.

However, I think that the resolution of that tension is in the MPC (DAP specifically). We might want to ask aggregation service operators to limit histogram size as some function of the number of reports they aggregate. (I still somewhat like the idea of refusing to return a value if an aggregate is smaller than some threshold, even though it is perverse from a strictly DP interpretation perspective.) If the aggregator supports more, then the API should not be where limits are applied. Also, different browsers will have different views on this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If we're using DAP, then doesn't the browser need to know the histogram size to construct the report?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, we'll need to know what size to make. We'll ask the site to give us the size they want.

But we don't need to validate or limit that. If it is the wrong size, that's their problem.

api.bs Outdated Show resolved Hide resolved
api.bs Outdated Show resolved Hide resolved
@martinthomson martinthomson mentioned this pull request Sep 9, 2024
@andyleiserson
Copy link
Collaborator Author

I pushed some additional edits here: https://github.com/andyleiserson/api/compare/api...andyleiserson:api:api-2?expand=1 (will open a new PR after this one is merged, or I can add the changes to this one).

@martinthomson
Copy link
Member

Generally, I'd be OK with iterating on this. But given its current state, I'm inclined to merge this one and then you are targeting main again. Let me take another quick look, but I think I'll merge this and try to keep up momentum.

@martinthomson martinthomson merged commit 8adc624 into private-attribution:main Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants