Support » Plugin: Pardot » Pass query string vars to pardot

  • So, I have a site that has a combination of static pages and a WP site. On the static pages I dynamically generate the pardot URL for the form’s iframe, like this: (I have altered some of this to prevent anyone figuring it out who it’s for.

    
    <iframe src="//go.pardot.com/l/XXXXXX/2017-01-17/XXXX?landing_page=current_page<?php 
        if (count($_GET)) {
          foreach ($_GET as $index => $value) {
            echo '&',$index,'=',urlencode($value);
          }
        }
      ?>"..................
    

    This basically allows me to pass any tracking values, like google adwords or google search to pardot for tracking. It works perfectly, the client is able to track utm codes and see what is converting and what isn’t.

    The question is, is there any way to do this with the pardot forms added to the wordpress site using this plugin?

    • This topic was modified 2 years, 2 months ago by John Huebner.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Cliff Seal

    (@cliffseal)

    Hey @hube2,

    Check out the filters section in the FAQ: https://wordpress.org/plugins/pardot/

    It has some examples of appending a query string by filtering the form embed code. Should be pretty similar to what you’re looking for if I understand you correctly!

    Other than the SRC value for the form, is there anything that I can use to determine which of many forms in being shown?

    And it’s a bit confusing

    how does the hook

    
    pardot_form_embed_code_54796
    

    relate to changing form #545

    Well, I figured it out, yes it does work.

    Plugin Author Cliff Seal

    (@cliffseal)

    Great! Did you get the answer you needed?

    So @hube2, what was the answer do those ID numbers need to match?
    I.E. Should the description copy be ’embed code for form #54796′ instead of ’embed code for form #545′ when the example shows: pardot_form_embed_code_54796?

    Thanks,
    Ken

    Yes, the number needs to match the post ID of the pardot form. This is where the filter is used in the pardot plugin

    
    return apply_filters( 'pardot_form_embed_code_' . $args['form_id'], $body_html );
    

    It means that each time a form is added that you need to add more filters. A generic hook would be better. Or even more hooks that let you adjust specific parts of the form rather than parsing html. But I guess it is what it is.

    Thanks John!

    This no longer seems to be working, has something changed?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Pass query string vars to pardot’ is closed to new replies.