For cookie compliance, we have to refresh the landing page if a user opts in too Analytics cookies. This causes inflated session refresh visits because document.location is set to our domain.
How do I set s.referrer as "" / null so Adobe believes the marketing channel is direct rather than session refresh?
As described here: https://experienceleague.adobe.com/docs/analytics/implementation/vars/page-vars/referrer.html?lang=e... you can simply use s.referrer = "".
However, you'll need to add your own logic so that this is done only after when the page was loaded immediately after the user has given consent.