Developer forum

Forum » Templates » Custom logic based on referral

Custom logic based on referral

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

I need to implement some custom logic based on the referral site.

Is there any way I can access the referral information in the template? API, tag, whatever?

Thank you,
Adrian


Replies

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

You can use Request.Headers["Referer"] in a template. See https://stackoverflow.com/questions/4258217/getting-the-http-referrer-in-asp-net for more info.,

Do note that the referrer is very unreliable. It's often stripped by security software or user agents simply don't send it. If you have control over the referring party and their links, you could include a reference to the site in the URL.

Imar

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Imar,

Thank you for the solution.

In my case the source is  very specific. I have an affiliate marketing platform that is supposed to send traffic over.

Thank you,

Adrian

 

You must be logged in to post in the forum