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 API Didn't Log Observation #330

Open
relevance-api-topics opened this issue Aug 1, 2024 · 4 comments
Open

Topics API Didn't Log Observation #330

relevance-api-topics opened this issue Aug 1, 2024 · 4 comments

Comments

@relevance-api-topics
Copy link

Hi Topics API experts,

We are having a blocking issue where a successful observation through fetch call cannot be recognized by Chrome:

The context is we are having adtech JS plugin into publishers website, and through the JS plugin we are doing the fetch observation call. However, the observation is not recognized by Chrome.

E.g.

Successful Request:
1

Successful Response:
2

No Chrome recognition:
3

Anything we missed to let Chrome recognize the successful JS Plugin observation call? Thanks.

@xyaoinum
Copy link
Collaborator

xyaoinum commented Aug 1, 2024

Thanks for reporting the issue. To help us investigate further, could you please confirm:

  1. Did you force a topics calculation in the internals page after the observation?

2. Was the page still open at that time? (The page needs to be closed for the observation to be actually recorded)

  1. Was the page opened via user, or did it open automatically? (Per the explainer: only sites that were navigated to via user gesture are included (as opposed to a redirect, for example)).

Thanks!

@relevance-api-topics
Copy link
Author

thanks for the information! 2. & 3. are the issue for us, thanks.

@relevance-api-topics
Copy link
Author

HI @xyaoinum, hope to reopen this discussion, once in a while we are facing this issue where the request and response sounds valid but nothing is recorded for topics in internal dashboard.

Would you please help elaborate how do you validate No.3? thanks.

@xyaoinum
Copy link
Collaborator

xyaoinum commented Aug 23, 2024

Hi @relevance-api-topics,

To validate if a page is loaded via user, you can follow these steps:

  1. Start Chrome with flags: --force-enable-metrics-reporting --metrics-upload-interval=5 --force-msbb-setting-on-for-ukm
  2. Load your page
  3. Go to chrome://ukm (may need to click "Refresh"). You should see a row with your page's URL and with Source Type NAVIGATION_ID. Expand that row, and you should see a row with PageLoadInitiatorForAdTagging --> FromUser --> 1

I do want to make a correction to my previous answer: No.2 isn't necessary. The page doesn't need to be closed for the observation to be recorded. However, the Topics API call may race with the "Calculate Now" action. So you should consider adding a brief delay before clicking "Calculate Now".

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

No branches or pull requests

2 participants