Redirecting Parent page from Pardot iFrame

When using Standard Pardot Forms, Pardot will provide HTML code in an <iframe> format to enable you to place your form on a non-Pardot hosted Landing Page. When using the Standard Chili Piper <> Pardot integration outlined  here, the Chili Piper calendar will display within the iFrame that Pardot provides. Additionally, the redirect settings within your Inbound Concierge | Router will take place within this iFrame. 

In some cases for Google Analytics Tracking, other tracking, or user experience purposes, you may want to execute a full page redirect on the parent page instead of a redirect just inside of the iFrame when a meeting is booked or not booked. You can accomplish this using a combination of Chili Piper  Javascript Options and Pardot's Completed Actions -> Thank You Code.

Please make sure to have complete the steps for the Standard Chili Piper + Pardot instructions linked in the first paragraph before proceeding. 

Below are the steps:

  1. In your Pardot Form, navigate to "Completed Actions" -> "Thank You Code" 
  2. In your "Thank You Code", add the script below: 
    1. You will need to define yourSuccessRedirectFunction & yourCloseRedirectFunction from the code below.
    2. You will need to set the Success and Close URL's for your follow up pages if you would like to send your prospects to different Redirect Locations depending on if they book or not. 
    3. The setTimeout function is set to 5000ms or 5 Seconds for Success and 500ms or .5 Seconds for Close. You can edit this if you would like the redirect to happen faster or slower. 
    4. You will need to add your subdomain and router parameters that are provided to you in your Inbound Concierge | Router.
  3. <script src="" type="text/javascript"></script>
    function yourSuccessRedirectFunction(){
    var urlOfRedirectLocation = '';
    setTimeout( function(){ = urlOfRedirectLocation
    }, 5000 )
    function yourCloseRedirectFunction(){
    var urlOfRedirectLocation = '';
    setTimeout( function(){ = urlOfRedirectLocation
    }, 500 )
    ChiliPiper.showCalendar("subdomain", "router", { title: "Thanks! What time works best for a quick call?", titleStyle: "Roboto 22px #EA5938", onSuccess: yourSuccessRedirectFunction, onClose: yourCloseRedirectFunction})
  4. Disable the checkbox in your Pardot form to "Redirect to the following URL instead of showing the form's Thank You Content"
    1. This will be handled with the code above.
  5. Disable your Router Redirect Settings within Chili Piper 
    1. Uncheck the checkbox for "If users successfully schedule a meeting."
    2. Select "Take user back to form" for "Redirect for users who exit without booking a meeting".
    3. These redirect options will be handled with the code provided above. 

Here is an example screenshot of the setup from inside Pardot that will redirect the Parent Page for anyone who does successfully book:

*Remember to use instead of as outlined in the picture above. 

** The picture above does not use the onClose function, thus would only redirect the parent page upon a successful booking.

5. Save your form changes and test it out!

A couple notes:

- If you do not want to redirect the parent page but do want to call a function that sends a Goal Completion Event to Google Analytics, you can accomplish this by using the onRouted: function similar to how you the onSuccess and onRouted functions shown above.  See all Javascript Options here. 

- If you data doesn't seem to be passing thru correctly to Chili Piper, make sure to check your  form field mapping

- As always, if you run into problems or need some further guidance, give us a shout at and we'll be happy to help out. 

Still need help? Contact Us Contact Us