Hi! I'm using the following snippet to get and log the data returned by the FLoC API
async function getAndLogFlocData() {
try {
if (document.interestCohort) {
const { id, version } = await document.interestCohort();
logToDatabase(id, version)
} catch (err) {
// handle error
}
}
getAndLogFlocData()
However, some of my entries contain empty ids and versions while others log them correctly. Is this an issue with the FLoC API or am I missing something?
Hi @gonzen2310: This is indeed what's expected. Only some people are assigned a FLoC — for example, if you have browsed too few different websites, your cohort id will be empty.
Hi! I'm using the following snippet to get and log the data returned by the FLoC API
However, some of my entries contain empty
id
s andversion
s while others log them correctly. Is this an issue with the FLoC API or am I missing something?P.S: I set a valid token in the response header