Newbie question: JS to capture URL respondent came from? | XM Community
Skip to main content
Question

Newbie question: JS to capture URL respondent came from?


Forum|alt.badge.img+1

I'm using a single anonymous survey link and asking people from around the web to take my survey. I'd like to capture which domain people are coming from. Because of the number of sites involved, using a query string at the end of the survey link is not an option. I'm hoping to use JavaScript to capture it but don't know:

  • how to write the code

  • where to insert the code

Can someone please help? Thank you!!

2 replies

MSobotta
Level 4 ●●●●
Forum|alt.badge.img+25
  • Level 4 ●●●●
  • 187 replies
  • October 14, 2021

Forum|alt.badge.img+1
  • Author
  • 2 replies
  • October 14, 2021

Thanks MSobotta - I just tried this and not working for some reason. Are you aware of any additional JS tools that can be used as an alternative? Thank you!


Leave a Reply