Google Adwords conversion code and Contact Form 7
UPDATE 25-11-2016: This method no longer works. Check out my updated post for better ways of tracking Adwords conversions through CF7.
In this short post I’ll explain a simple way to add your Adwords Conversion code to Contact Form 7, without going to a thank you page. I’ll assume you’ve got your conversion code ready!
There are some tutorials online that show you how to redirect Contact Form 7 to a thank you page that contains the Adwords Conversion code. This works fine and can be a good opportunity to display some extra information to your lead too.
But one of the great features of CF7 is that it has AJAX form submision: it does not redirect the user after submission.
Here’s a better way to include the Google Adwords conversion code to Contact Form 7:
- Get your conversion code
- Look for the
<img>tag in your conversion code. It looks something like this, on one of the last lines
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/963965306/?label=DN3oCJ-u_FwQ-uLTywM&amp;guid=ON&amp;script=0">
- Edit your Contact Form 7 form and find the “Messages” box
- Add the image tag (only the image tag!) at the end of “Sender’s message was sent successfully”
Save the form and you’re done!
Tip: If you haven’t also set up Google Analytics tracking on your contact form, check out this blog to see how!