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
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
Hi
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:
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
Hi, but can the URL be added as a variable?
If the form was on this page, the url would be:
I’m using the same form on several pages but I want the know the URL where the form is completed.
Is this possible? How? :)
Thanks
Kind regards,
Tim
Hi there
Thanks for sharing your question with us!
Unfortunately, a dynamic URL can’t be captured on form submission, so it is best to follow
Thanks for sharing your question with the Community!
-Taylor
If you’re using Shopify, here are the details you need to capture the URL that a customer was on when they submitted your form.
<script>
window.addEventListener("klaviyoForms", function(e) {
if (e.detail.type == 'submit') {
var _learnq = window._learnq || d];
var url_visit = window.location.pathname;
_learnq.push(e'identify', {
'URL Visited' : url_visit
}]);
} // if
}); // addEventListener
</script>
Once pasted, click SAVE in the upper right.
Visit your website and test by filling out your form. Once the form is filled out, look at your Profile in Klaviyo. You will see the new information listed under Custom Properties.
If you want to see the URL listed differently, here is a good resource. Simply look for “pathname” in the Script code above and change it to one of the other variables listed here. https://stackoverflow.com/questions/1034621/get-the-current-url-with-javascript
Hi
This script should work regardless of form name and how the signup form is implemented?
I have a embeded form on many different shopify pages in different folders (lanuguage) and i want to identify customers based on the url they used.
Thx
Thx
Correct, it only overwrites the value.
Just for curiosity can it use one property for example URL Visited so i don't need to create this additional one url_visit?
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.
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
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)
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.