Closed brian-ecker-adroll closed 3 years ago
Hi @brian-ecker-adroll: Just to check, is your Origin Trial token being injected into the page by a third-party script that is loaded from the same domain that the token was issued to? Can you provide a link to the failing page?
@samdutton is a great source of help.
Hi @michaelkleber. Yep the origin trial token is being injected into the page by a third-party script loaded from the same origin the token was issued to. Here's a link to a third-party use where it fails: http://adroll-cdn-staging.s3.amazonaws.com/daroit/thisisfine.html
And here's a link to a same-origin (first party use) example where it succeeds: https://s.adroll.com/tmp/daroit/thisisfine.html
Aha: FLoC is only available in secure contexts. Load your failing page over HTTPS instead.
Does testing with an HTTPS URL work for you?
If not, a couple of troubleshooting suggestions:
• Can you see the token in the page by calling (say) document.querySelectorAll('meta[http-equiv="origin-trial"]')
?
• Is the token injected before the call to document.interestCohort()
?
I can see f.prototype.addTrialToken
in roundtrip.js, but it's a little hard to work out where this is being called. (I also get a lot of net::ERR_BLOCKED_BY_CLIENT
errors.)
Ah yes, secure-only (HTTPS) appears to work. Thank you, @michaelkleber and @samdutton!
I'm attempting to run an third party origin trial test using a token that was registered as:
I am able to retrieve a floc ID and version from
document.interestCohort
when I dynamically inject the origin-trial token on a test page running on my origin. I get a result like{id: "1234", version: "chrome.1.1"}
. But when I attempt to inject the origin-trial token on a test page different from my origin (i.e. in a third party context) thedocument.interestCohort
function remains undefined.macOS 10.15.2 Chrome 90.0.4430.93 chrome://settings/privacySandbox is enabled no ad blockers running with the following flags
--enable-blink-features=InterestCohortAPI --enable-features="FederatedLearningOfCohorts:update_interval/10s/minimum_history_domain_size_required/1,FlocIdSortingLshBasedComputation,InterestCohortFeaturePolicy"
https://floc.glitch.me/ works correctlyThe script on both test pages is served from my origin. The only difference is the origin of the page itself.