Hidden Field: pass on source page

I have a signup page for my users and I would like to track, which Landing pages they came from.

Example: landing page is www.domain.com/landing-page

I would like my signup form to pass the information, that the signup came through “landing-page” on to airtable so I can see which landing page performs best

Bonus: even better would be, if I could somehow track which google ads campaign the signup came from - e.g track the Click ID (gclid) from the ads campaign

Is that feasable with something like a hidden field? How would I go about that?

Well, you can access the previous url on your landing page by using javascript, something like:

// Check the link of website user came from
const previousUrl = document.referrer; 

Now, the trouble (for me at least), would be to pass this value to the form via hidden field.

A solution to this need was requested on this post:

I wonder if this can actually be done @artur

1 Like

Those things are all possible but typically requires small JS code snippets like getting referral and intercepting form submission and adding values in the form etc…

Same approach if we need to log the email address of the user updating a record via pencil icon?

Similar I can help on the real page with examples of utm params etc…

It does not work for me, IDK how to get the parameter from costumer area