URL Part Data Source
Get details of the current URL
Last updated
Get details of the current URL
Last updated
Grab the current path of the page, and push it into a hidden field in your contact form so that you can track which page ( or collection page ) the form was submitted from.
Examples here use the following URL for reference;
https://example.com:8080/path/to/resource?query=value#section2
$url.href
The entire URL
https://example.com:8080/path/to/resource?query=value#section2
$url.origin
The origin of the URL, combining the protocol, domain, and port
https://example.com:8080
$url.pathname
The path section of the URL, which comes after the domain and before the query string
/path/to/resource
$url.search
The entire query portion of the URL, including the leading question mark.
?query=value
$url.protocol
The protocol of the URL
https:
$url.host
Combines the hostname and the port ( if a port is specified )
example.com:8080
$url.hostname
The domain name or IP address part of the URL
example.com
$url.port
The port number of the URL, if specified
8080
See to get individual params.