For those who are interessted in the solution, I used following script:
document.addEventListener(adobe.target.event.REQUEST_SUCCEEDED,
function(e) { console.log("Request succeeded", e.detail); var tokens =
e.detail.responseTokens[0];
console.log(tokens["profile.categoryAffinity"]); });And then instead of
logging it, persist it to localStorage or dataLayer