What the Device Type Variable "Referrer" captures (SiteCatalyst tag)

mgensollen
Visitor
mgensollen

I want to collect the previous page URL in Adobe. Currently adobe is passing the Referring URL with the image request, but it is not sending it to any prop or eVar. So, I want to know what the "referrer" variable (out-of-the-box variable) captures. 

Also, I see that there is a Previous Page Extension, how exactly this extension works? Can I just create a variable (eg. previous_page) and select it for Page Value, and then mapped it to an eVar?

Thank you!

2 REPLIES 2
Highlighted

What the Device Type Variable "Referrer" captures (SiteCatalyst tag)

UnknownJ
Occasional Contributor
UnknownJ Occasional Contributor

Hi @mgensollen,

If it was me, I would create a UDO variable to capture previous_url, and then use a Set Data Values extension, scoped to After Load Rules, that sets it to:

document.referrer

Alternatively, if you want to remove any querystring parameters from the preceding URL, you could set it to:

document.referrer.toString().split("?")[0]

Or to get the domain name only, you can generally use:

document.referrer.toString().split("/")[2]

Not all fool-proof, but TIQ's built-in error handling will fail gracefully and leave the value blank if it resists any of those operations being performed against it..

What the Device Type Variable "Referrer" captures (SiteCatalyst tag)

mgensollen
Visitor
mgensollen

Thank you! 

As a note, I used the Previous Page Extension, and select the value of a the variable for page (this will persist the value to the next page in a new variable "previous_page"). It automatically creates a variable in the data layer ("previous_page").