How to Pass Aweber Parameters to a WordPress Blog

The Aweber contact software has an integrated plugin that works with WordPress. This plugin does not automatically send URL parameters with the form, however. You may want to pass along parameters for campaign tracking codes or affiliate codes so you receive proper credit for a lead or referral. You can add a function to WordPress in order to send along the parameters with the contact form.

Things You'll Need

  • FTP program
Show More

Instructions

    • 1

      Open your FTP program and connect to the Web server for your WordPress site. Double-click "wp-content" and "themes." Double-click the specific theme folder used on your WordPress site. Right-click "functions.php" and click "Open" or "Edit." If you are using a FTP program that does not let you edit files, download "functions.php" to your computer and open it with a text or HTML editor.

    • 2

      Scroll to the end of the functions.php file and click before the final "?>" symbol in this file. Type "add_filter('query_vars', 'parameter_queryvars' );" and press "Enter." Type "function parameter_queryvars( $qvars )" and press "Enter." Type { $qvars[] = 'refid';return $qvars; }." Press "Enter." This function allows WordPress to call the reference ID as part of the link parameter.

    • 3

      Type "function echorefid() {" and press "Enter." Type "global $wp_query;
      if (isset($wp_query->query_vars['refid']))" and press "Enter." Type "{ print $wp_query->query_vars['refid']; } }" and press "Enter." This function finds the Aweber parameter passed from the contact form and outputs it.

    • 4

      Save the functions.php file. If you downloaded this file, replace the existing functions.php file with the edited version.

    • 5

      Load the Aweber contact form page in a text editor, HTML editor or the FTP file editor. Scroll through this page to find the code "<input type="hidden" name="meta_adtracking" value="">." Add "<?php echorefid();?>" to the value parameter in this code. Once you have saved the contact form, the Aweber parameter that passed through the WordPress blog functions now display on the form page. You can call this function in other locations if it does not fit appropriately on the contact page.

Related Searches:

References

Resources

Comments

Related Ads

Featured