AnsweredAssumed Answered

URL parameter script not working in Forms 2.0

Question asked by Dan Stevens. Expert on Jun 21, 2014
Latest reply on Jun 25, 2014 by Dan Stevens.
This resource article ( provided us with the necessary guidance to properly pass URL parameters – in our case, referring URL – to our iframed forms.  But this is a forms 1.0 artilce and this no longer works in Forms 2.0.  I would expect Marketo to update this since most of us are probably using Forms 2.0.

The script is contained below and what we included on the iframe landing page:
<script src="//"></script>
<!-- Keep your jQuery up to date -->
    var url = (window.location != window.parent.location) ? document.referrer: document.location;
    var sourceParam = getUrlVars(url)["ref"];
  function getUrlVars(url) {
    var vars = [],
    var hashes = url.slice(url.indexOf('?') + 1).split('&');
    for (var i = 0; i < hashes.length; i++) {
        hash = hashes[i].split('=');
        vars[hash[0]] = hash[1];
    return vars;
Our contact-us page is located here:

oes anyone have any suggestions/fixes for this?