How to Use Pardot Form Handlers with Gravity Forms

What is Pardot?

Pardot is a marketing automation platform that can connect to Salesforce CRM. Here’s an excerpt from Salesforce about the benefits of using a marketing automation platform:

Marketing automation platforms are designed to increase sales and maximize efficiency for companies with complex sales cycles. How do they do that? By managing prospect interactions and online marketing campaigns in one central platform.

Trailhead Resources, Salesforce

Who should use Pardot?

Businesses that would benefit from automating marketing and sales operations, that have large sales teams and/or high traffic, and that have an existing sales funnel are great candidates for a Pardot and Salesforce integration. 

What are the benefits of using Pardot?

With these tools properly implemented and maintained, sales teams’ jobs are much easier, and there is more clarity in metrics reporting. With a centralized marketing ecosystem, it’s also easier to identify opportunities and execute more granular marketing strategies. 

Overall, these tools provide transparency and efficiency to sales and marketing operations and can be one of the most important investments a business can make. 

What are the drawbacks of using Pardot?

That’s not to say that they are a magic pill to solve all your marketing needs right out of the box. These tools can be complex, and they don’t always mould to clients’ needs and operations without some special considerations for implementation. 

It’s important to consider what you expect from Pardot and what aspects of your marketing setup may need to change in order to accommodate these new tools.

One common issue is the limited functionality of Pardot Forms outside of the Pardot ecosystem. 

Pardot Forms have their limits

Some benefits of using Pardot forms don’t apply when you embed those forms outside of the Pardot ecosystem. Some problems include: weird form styling, forms fields not fitting or needing to scroll to see the whole form, hard to edit, tracking issues, and more. Most of these problems are caused by using iframes to embed the forms in your website. 

If you’re using WordPress, I recommend using Gravity Forms and Pardot Form Handlers to bypass those iframe issues. Below is a step by step guide for setting up Pardot form handlers with Gravity Forms.

Integrate Pardot Form Handler with Gravity Forms without any plugins or add-ons

Step 1: Setting Up Pardot Form Handlers

Set up the form handler with the required fields. Make sure none of the fields are required (except for the email field) and that ‘Enable Data Forwarding’ is checked.

If the email is sending autoresponders you may want to also check ‘Disable Data Throttling’ to ensure that if a user fills out the form more than once in a short period of time that they receive all autoresponders.

Set the form’s success location to the appropriate Thank You page.Redirecting users to a thank you page is a good way to track form submissions, but it’s not the only way. Read about event tracking here.

Step 2: Set up an external form

Set up the external form, matching the form fields to those in your form handlers. 

In Gravity Forms, this just means creating a new form and adding a form field for each of the form fields you included in the form handler. Consider using the form handler form field names as field labels in Gravity Forms to make it easier to map fields later on.

Step 3: Integrate the Form Handler as a redirect

Copy the link for the form handler and use it as the redirect for your external form’s default confirmation. 

Map the form fields following the pattern provided:

Paste in the form handler URL and map the fields with matching field names and gravity form field IDs.
Connect the Pardot form handler in the Default Confirmation for you form in Gravity Forms.

Make sure the name used in the field mapping matches the names used in the form handler exactly.

Make a test submission for your form to make sure the data passes through. 

FAQs

Can I use a Form Handler with more than one form?

  • Yes, you can use the same form handler for many different forms without issue. Just make sure to double check your field mapping when you copy and paste the default confirmation.

Do I need to edit the form in Gravity Forms if I change the completion actions for the form handler?

  • No, the completion actions for the form handler are independent from the form fields. If you edit the form fields, however, you will need to make sure that the edits are reflected in your field mapping in your form in Gravity Forms.

Is it possible to use progressive profiling with Gravity Forms?

  • Yes, this is possible. Instead of using Pardot’s progressive profiling, you would instead need to use a plugin like this one to autofill and hide form fields that your users have already filled out. This will not impact the Pardot form handler.

I don’t want to redirect my users to another page when they submit the form. Can I show a thank you message instead?

// Sends data to Pardot without a redirect

add_filter( 'gform_confirmation', 'post_to_third_party', 10, 2 ); 
//replace '2' with form ID for the form you'd like to use for this script

function post_to_third_party( $confirmation, $form, $entry ) {
 
    $post_url = 'insert Form Handler URL here'; 
    //insert Form Handler URL
    
    $body     = array(
        'email' => rgar( $entry, '1' ),
		'field_name' => rgar( $entry, '$FIELD_ID' ),
		// replace field_name with the name of the field, ex. 'email'
                // replace $FIELD_ID with the numerical field ID, ex. '3'
                // repeat for all fields
        
    );
    GFCommon::log_debug( 'gform_confirmation: body => ' . print_r( $body, true ) );
 
    $request  = new WP_Http();
    $response = $request->post( $post_url, array( 'body' => $body ) );
    GFCommon::log_debug( 'gform_confirmation: response => ' . print_r( $response, true ) );
 
    return $confirmation;
}

Now you have your forms set up and ready to go. Another common issue that Pardot users face is Lead Source tracking. Check out this post to learn how to track lead source with the Gravity Forms + Pardot connector. Please feel free to reach out to me if you have any questions or need help implementing this set up with your digital marketing ecosystem.

Posted in Digital Marketing

As always, feel free to reach out if you have any questions about establishing your online presence. I’m happy to just chat, and if I can’t help you I can certainly point you in the direction of someone who can.

Leave a Reply

Your email address will not be published. Required fields are marked *