Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How do I set s.referrer as ""?

Trystan_Colwyn-
Level 2
Level 2

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?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution
yuhuisg
Correct answer by
Community Advisor
Community Advisor

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.

View solution in original post

0 Replies
yuhuisg
Correct answer by
Community Advisor
Community Advisor

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.

View solution in original post

Trystan_Colwyn-
Level 2
Level 2

@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.

yuhuisg
Community Advisor
Community Advisor

Hmm, I wonder if this is because a blank string is interpreted as "null", which AA then ignores and falls back to using document.referrer.

In that case, could you tweak your "Session Refresh" Marketing Channel Processing Rules? Such that it is set only on the first page of a visit.

Trystan_Colwyn-
Level 2
Level 2

@yuhuisg: Yep, have updated the Marketing Channel Processing Rules as a back up feels 'more right' to try to correct within s.referrer. 

 

Anyways, thanks for you help!