chexton
11/13/2013 - 4:26 AM

add-vero-unbounce-js.js

add-vero-unbounce-js.js

//1. Return to the 'Form Confirmation Dialogue' editor tab
//2. Click the Javascripts button in the bottom left of the editor
//3. Paste the tracking code into the scripts dialogue
//4. Name your script 'KISSmetrics Conversion Event'
//5. Choose 'Head' in the placement dropdown menu

<script type="text/javascript">
  var getUrlParams = function () {
    var params = {},
    hash;
    var hashes = decodeURI(window.location.href).replace(/\+/g," ").slice(window.location.href.indexOf('?') + 1).split('&');
    for (var i = 0; i < hashes.length; i++) {
      hash = hashes[i].split('=');
      params[hash[0]] = unescape(hash[1]);
    }
    return params;
  };
  var urlParam = getUrlParams();
  var identifier = urlParam['email'];
  if (identifier != undefined) {
    _veroq.push(['user', {email: unescape(identifier)}]);
  }
  _veroq.push(['track', 'Unbounce Email Submit']);
</script>