Skip to main content
Level 2
Oct 9, 2018 5:30 PM UTC
Solved

How can we set the s.referrer in DTM?

For vanity urls, we have the redirect landing our our site with a url parameter of "refd" that has the referring domain in it.

For instance, if our real site is "http://mysite.com" and we have a vanity domain of "http://myfancydomain.com" that redirects to http://mysite.com?redf=myfancydomain.com we need to set the s.referrer to "myfancydomain.com". 

Custom code?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
atusingh17Accepted solution
Adobe Employee
Oct 9, 2018 9:01 PM UTC

Hi,

In case you want to capture "myfancydomain.com" from the URL http://mysite.com?redf=myfancydomain.com, you can use Util.getQueryParam() method to capture refd query string value in s.referrer variable.

Something like this:

s.referrer= s.Util.getQueryParam("redf");

3 replies

atusingh17Adobe EmployeeAccepted solution
Adobe Employee
Oct 9, 2018 9:01 PM UTC

Hi,

In case you want to capture "myfancydomain.com" from the URL http://mysite.com?redf=myfancydomain.com, you can use Util.getQueryParam() method to capture refd query string value in s.referrer variable.

Something like this:

s.referrer= s.Util.getQueryParam("redf");

Translate
Jun 15, 2020 1:34 PM UTC

how do we verify the Referrer Value? it is not displaying in adobe anlaytics debugger like other eVars and props

Translate
Level 2
Oct 10, 2018 9:31 PM UTC

Thank you.

Translate