Pass UTM Params into page to then pass into embedded Formsite form


I’m using an embedded Formsite form on our landing pages which I’m wanting to pass UTM parameters into. Formsite states I need to pass it into the page then pass it into the embedded form from there. Here’s their instructions on it. Any thoughts on the script I need for that?


Hi @Joe_Parry,

I took a look at the instructions and it seems pretty straight forward.

1.) Add some newer jQuery

2.) Get & decode the URL parameters

3.) Place them with the proposed prePopulate method

It should be a quick 30min to an hour project with proper QA.

My agency has developed over 100 custom scrips and integrations for Unbounce so feel free to DM me, if you want us to solve this for you.



Had the same problem, had a developer solve for me and he used this script to pass utm_source to formsite form field 7. Hope it helps!

<script type="text/javascript">

function getParameterByName(name, url) {
  if (!url) url = window.location.href;
  name = name.replace(/[\[\]]/g, "\\$&");
  var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
      results = regex.exec(url);
  if (!results) return null;
  if (!results[2]) return '';
  return decodeURIComponent(results[2].replace(/\+/g, " "));


if(getParameterByName(‘utm_source’)) {_
var utm_source = getParameterByName(‘utm_source’);_
key: “”,_
width: “100%”,_
mobileResponsive: true,_
prePopulate: { ‘7’:utm_source},_

} else {
    key: "",
    width: "100%",
    mobileResponsive: true