Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get the LeadMachine ID from the query string
<script type="text/javascript">
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
var lead_id = getParameterByName('lead_id');
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment