Skip to main content
Problem Solver III
February 9, 2023
Solved

Can I add a hidden property to submit what URL a user is on upon form submission?

  • February 9, 2023
  • 15 replies
  • 3803 views

I have a pop up from which I would like to pass page url information as a silent property so that the welcome email can mention that brand ( or even better shopify product vendor information ). Is this possible?

 

Thanks in advance 

Sean

This topic has been closed for replies.
Best answer by Ashley I.

Hi @SeanMcC ,

Thank you for this great question about Sign-Up forms! 

It sounds like what you are looking for is a Hidden Field that would be captured as a user submits the form in order to collect URL. This field is not shown to users on the frontend, but is captured at a Profile level in Klaviyo as a Property, which you can then use to segment the user, or to add a conditional split to your Welcome Series flow in order to send them the most relevant content. 

By default, all new signups have a Source property as a hidden field. This identifies where the profile came. To set up an additional Hidden Field, please follow these steps while in the Form Editor:

  1. Navigate into your button editor
  2. Select +Add a property under SUBMIT HIDDEN FIELDS
  3. Choose an existing profile property or create a new one
  4. Input the value for the property (URL)
  5. Save the button

In a close up of the Hidden Fields section, a second hidden field, URL, has been added with a specific URL as the value

Note: If you add hidden fields that correspond to properties that already exist on someone's profile, they will be overwritten by the new value when someone submits the form.


If you are unfamiliar with Properties in Klaviyo, feel free to check out this guide in the Help Center: Profile properties reference.

You can also reference these other helpful thread on the Community that discuss the use of Hidden Fields and Custom Properties:


--

Hope this helps!

-- Ashley Ismailovski​​​​​​​

15 replies

Jakub
Partner - Silver
Partner - Silver
October 31, 2023

@rreno thank you a lot this works great

Just for curiosity can it use one property for example URL Visited so i don't need to create this additional one url_visit?

-=JB=-
Problem Solver I
October 31, 2023

@Jakub

I see the confusion.  I probably should’ve labeled them differently.

URL Visited is what you should be using in the form(s) in Klaviyo.

url_visit is used on the javascript coding to capture the information from the customer’s browser.
Here is where it is defined “var url_visit = window.location.pathname;”.  This line says to set the variable called url_visit equal to the window path (aka the URL)

I hope that helps.

Omar
Partner - Platinum
2025 Champion
November 1, 2023

Just adding here, you should also be able to use Google Tag manager to fire of the event to Klaviyo.

 

Omar Lovert // Polaris Growth // Klaviyo Master Platinum Partner

We help with e-commerce growth through CRO, Klaviyo and CVO

Helping E-commerce brands maximize Lifetime Value & Profits with Klaviyo, CRO & CVO - Get your free Audit - https://link.polarisgrowth.com/free-audit
Contributor I
April 11, 2024

@rreno How can we get dynamic page url as we use wordpress platform and try to get page url using API. Can you please provide script for that?

Contributor I
July 18, 2024

You can check here is where it is defined “var url_visit = window.location.pathname;”.  This line says to set the variable called url_visit equal to the window path (aka the URL)