I've been trying to achieve following but without success.

I have a task where I have to get the utm_source value and pass it to the form. As an example if user types in on google the domain and goes to our website via Google link I need to add source to the form.

I'm not sure if utm_source is the best way to do this? Basically I have to track from which page user has landed on our website. Can anyone help me out? Perhaps with cookies?

  • A lot of links into your site (most?) won't have a utm_source parameter on the URL. It is great to use if it's present but you'll need a fallback otherwise. This isn't my area of expertise, but I think this information will have to come from the Referer header of the HTTP request. That has limitations as well, though - in particular, if your site is not SSL, the Referer will be stripped out for any visit from an https site. – Reve Oct 9 '19 at 16:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.