I don't want to have to make use of a destination url, so ideally I would like to be able to add the onclick="_gaq.push(['_trackPageview', '/G1/whatever']);" event to the submit button on the form.

2 Answers 2


This seems to be a valid answer:

Use Contact Form 7. In the "Additional Settings" box enter the following: on_sent_ok:"_gaq.push(['_trackPageview', '/G1/whatever']);"

Where /G1/whatever is the Goal URL you set on your Google Analytics options page.


You should be able to use Contact Form 7 and then attaching a jQuery click event to the submit button:

$(".wpcf7-submit").click(function() {
    _gaq.push(['_trackPageview', '/G1/whatever']);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.