How have you set up the Additional Settings field? Where can we check the site?
Hi Takayuki,
I have literally just pasted in the following code in to the Additional Settings field as suggested in the article:
on_sent_ok: “pageTracker._trackPageview(‘/vpv/contact-form-submitted’);”
If you like I can organise a login for you to view the site. But if you just want to see the front end you can get to that here: http://www.cyberdo.com.au/contact-us/
Regards,
Mike
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-2504351-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
You are using new version of the tracking code. So you can’t use pageTracker. Change the on_sent_ok line to this:
on_sent_ok: "_gaq.push(['_trackPageview', '/vpv/contact-form-submitted']);"
Tracking Form Submissions with Google Analytics
Thanks very much Takayuki,
You’re right. That works better. I didn’t realise there was a few different versions of the tracking code.
Might be worth adding a note on that to the article: http://contactform7.com/tracking-form-submissions-with-google-analytics/
Regards,
Mike
did your response messages begin displaying after you changed to the newer Google tracking code?
On my websites, I’m using the correct GA tracking code but it makes the responses disappear.
I’m using
on_sent_ok: “_gaq.push([‘_trackPageview’, ‘/homeForm/success’]);”
nevermind – I was testing this on a dev site and didn’t have google analytics code in it (the specific error in firebug console was that _gaq was undefined). It works just fine now that I’ve tested it with the GA script in header.