When customers are using the Lead.Capture API and if they want to track the page visits/source parameter values -> we suggest the customers to read the ProspectId from the browser cookies and pass it to the JSON request.

Here is the piece of script to read the ProspectID from the browser cookies using PHP.

$cookie_name = "ORG11350";
$ProspectId = $_COOKIE[$cookie_name];
echo $ProspectId;

Where ORG11350 is the cookie name set in the browser.

Please refer the screenshot for your reference.

$_COOKIE is the PHP function to read the value of the browser defined cookies by using the cookies name.