0

We have a external website say www.my-mainsite1.com and it has web page which has a link("link to subsite1") to subsite say www.my-subsite1.com.

When a user is on www.my-subsite1.com, how to check the user came by clicking "link to subsite1" on www.my-mainsite.com

We have limitations on using query string to www.my-subsite1.com. So, any suggestions/tools to identify the link clicks?

nagiah s
  • 117
  • 3
  • 14

1 Answers1

4

If you don't want to use a query param, you can use document.referrer property in your website:

The Document.referrer property returns the URI of the page that linked to this page

It will show you the origin site of the request, otherwise it will be a blank string if the site was opened directly.

Example of a site opened from a link:

enter image description here

Another one without referrer:

enter image description here

cнŝdk
  • 31,391
  • 7
  • 56
  • 78