Skip to content

Instantly share code, notes, and snippets.

@brennandunn
Created September 22, 2016 12:04
Show Gist options
  • Save brennandunn/e4d1b11695ebd654e77279b7b03cea18 to your computer and use it in GitHub Desktop.
Save brennandunn/e4d1b11695ebd654e77279b7b03cea18 to your computer and use it in GitHub Desktop.
$(function(){
params = jQuery.deparam.querystring()
for (var key in params) {
if (key.indexOf('utm') === 0) {
$('form#leadpages-form-selector-here').append(
$('<input type="hidden">').attr('name', key).val(params[key]))
)
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment