How do I set s.referrer as ""? | Community
Skip to main content
Level 2
Jan 12, 2021 2:24 PM UTC
Solved

How do I set s.referrer as ""?

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
yuhuisg
yuhuisgAccepted solution
New Participant
Jan 13, 2021 2:56 PM UTC

As described here: https://experienceleague.adobe.com/docs/analytics/implementation/vars/page-vars/referrer.html?lang=en#s.referrer-in-appmeasurement-and-launch-custom-code-editor, 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.

4 replies

yuhuisg
yuhuisgAccepted solution
New Participant
Jan 13, 2021 2:56 PM UTC

As described here: https://experienceleague.adobe.com/docs/analytics/implementation/vars/page-vars/referrer.html?lang=en#s.referrer-in-appmeasurement-and-launch-custom-code-editor, 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.

Translate
Level 2
Jan 13, 2021 5:24 PM UTC

@yuhuisg : Thanks for your response. I am setting the s.referrer="" post page refresh, before the tag is fired. It keeps defaulting to location.referrer.

Translate