<form id="callBack" >
<dl>
<dt>Ваше имя</dt>
<dd><input type="text" name="NAME" required=""></dd>
<dt>Телефон</dt>
<dd><input type="phone" name="PHONE" required=""></dd>
</dl>
<button>Свяжитесь со мной</button>
</form>
<form id="callBack" onsubmit="return getCid(); ">
<dl>
<dt>Ваше имя</dt>
<dd><input type="text" name="NAME" required=""></dd>
<dt>Телефон</dt>
<dd><input type="phone" name="PHONE" required="">
<input name="cid" type="hidden" id="cid">
</dd>
</dl>
<button>Свяжитесь со мной</button>
</form>
<script>
function getCid()
{
var match = document.cookie.match('(?:^|;)\\s*_ga=([^;]*)');
var raw = (match) ? decodeURIComponent(match[1]) : null;
if (raw)
{
match = raw.match(/(\d+\.\d+)$/);
}
var gacid = (match) ? match[1] : null;
if (gacid)
{
document.getElementById("cid").value = gacid;
}
return true;
}
</script>