Skip to content

Instantly share code, notes, and snippets.

@PardotGists
Last active February 19, 2016 19:29
Show Gist options
  • Save PardotGists/3e758fb0f8c56de5f809 to your computer and use it in GitHub Desktop.
Save PardotGists/3e758fb0f8c56de5f809 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
// NOTE: Any modifications to this code may result in it not working properly. Proceed with caution. Pardot Support is unable to troubleshoot problems with this code once it's been modified
var iFrame_Open = '<iframe src="{form handler endpoint URL}'; // replace {form handler endpoint URL} with the actual endpoint URL for the form handler you created earlier
var iFrame_Close = '" width="1px" height="1px" style="display: none;"></iframe>';
var Referee_Email = "%%Referee_Email{url}%%";
var Referee_First_Name = "%%Referee_First_Name{url}%%";
var Referee_Last_Name = "%%Referee_Last_Name{url}%%";
var Referrer_Email = "%%email{url}%%"; var Referrer_First_Name = "%%first_name{url}%%";
var Referrer_Last_Name = "%%last_name{url}%%";
if (Referee_Email != "") { iFrame_Open += '?Referee_Email=' + Referee_Email; if (Referee_First_Name != "") { iFrame_Open += '&Referee_First_Name=' + Referee_First_Name; }
if (Referee_Last_Name != "") { iFrame_Open += '&Referee_Last_Name=' + Referee_Last_Name; }
iFrame_Open += '&Referrer_Email=' + Referrer_Email;
if (Referrer_First_Name != "") { iFrame_Open += '&Referrer_First_Name=' + Referrer_First_Name; }
if (Referrer_Last_Name != "") { iFrame_Open += '&Referrer_Last_Name=' + Referrer_Last_Name; }
document.write(iFrame_Open + iFrame_Close); } </script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment