Customize The WordPress Contact Form 7 Plugin
I ran into an interesting problem the other day. I’m a big fan of the WordPress Plugin Contact Form 7. I’ve used it on many of the wordpress sites I’ve developed, and appreciate the plugin for its simple integration, nice admin interface, and the pretty ajax functionality.
Unfortunately, I recently discovered that the plugin does not allow you to specify custom landing page urls, or Thank You pages for the contact form. Some of you may wonder why I care about reloading the page to say thank you vs. the sleak Ajax popup confirming that your message has been delivered. The answer: Because I’m trying to measure performance of the contact form within my Google Adwords CPC account.
You can use javascript to fire the tracking code to create a virtual page view in analytics, but you cannot properly implement the conversion tracking from Adwords without loading a separate page. As you can imagine, I was slightly frustrated until I discovered a very quick and simple solution.
Important.. This solution only works if you have/want a designated landing page for all forms you are using with Contact Form 7.
Step 1: Browse to wp-content/plugins/contact-form-7
Step 2: Open the contact-form-7.js file in your favorite text editor.
Step 3: Look for the function: wpcf7ProcessJson (line 63)
Step 4: Look for the if statement: if (1 == data.mailSent) (line 90)
Step 5: Insert this line after the jquery (line 92) – location.href=”http://www.yourdomain.com/yourthankyoupage”;
Step 6: Save the file to your server, and test out the form.
Ideally, the author of this plugin will make a change in the next release that allows a custom variable (url) to be stored for each contact form. But until then.. here’s your fix !!!
For .kml files go to: http://www.fileextensionkml.net.
For .3g2 files go to: http://www.fileextension3g2.net.
For .itl files go to: http://www.fileextensionitl.org.
For .bup files go to: http://www.ifileextensionbup.com.
For .svg files go to: http://www.fileextensionsvg.net.
For .part files go to: http://www.fileextensionpart.net.
For .pdf files go to: http://www.ifileextensionpdf.com.
For .jnlp files go to: http://www.fileextensionjnlp.net.
For .ithmb files go to: http://www.fileextensionithmb.com.
Related posts
Posted in Technology | View Comments
-
Dee Wilcox
-
Matt
-
Make Money Pro
-
Audee Velasco
-
Paul
-
Weili Wang
-
rap dinle
-
211.138.124.211:80
-
Tony
-
Daniel Jones
-
Kelly
-
Jho
-
Gayan Menikpura
-
wieyoga
-
Neil Matthews
-
overit
-
George
-
Ahem
-
Jordan McClements
-
Adam Wood
-
Alexandre
-
Doug C.
-
Doug C.
-
רופא שיניים
-
James - New York Themes
-
Andrew Bleakley
-
Jen Rotar
-
Michael
-
Chris
-
Alisa
-
Jake
-
Steve
-
jennyb
-
Jake
-
Daniel Jones
-
Daniel Jones
-
Venkat
-
Frankos
-
Acos
-
Acos
-
Davide
-
Chris
-
Chris
-
Darrin
-
jake
-
Brandon Costa
-
Danyel Little
-
Danyel Little
-
Danyel Little
-
jake
-
Danyel Little
-
Daniel Jones
-
Jake
-
Jake
-
Daniel Jones
-
Daniel Jones
-
Claude Gelinas
-
Jake
-
Jake
-
Daniel Jones
-
Daniel Jones
-
Daniel Jones
-
Jake
-
Daniel Jones




