pitterz
Forum Replies Created
-
Forum: Plugins
In reply to: [Contact Form 7] Contact form 7 and google analytics problemThis is sorted now thanks everyone!
Forum: Plugins
In reply to: [Contact Form 7] Contact form 7 and google analytics problemYea it’s been that long and still no joy.
Any help much appreciated before I remove the form and get a dev guy to code one up?
Forum: Plugins
In reply to: [Contact Form 7] Contact form 7 and google analytics problemThanks for your reply – I’ve set this up as a destination goal using the Creare instructions and still no joy.
If anyone has any other ideas that would be great!
Thanks,
Forum: Plugins
In reply to: [Contact Form 7] Contact form 7 and google analytics problemHi,
We used to have the old google analytics code in the additional settings box and it tracked form submissions fake page views with the below code:
on_sent_ok: “_gaq.push([‘_trackPageview’, ‘/thanks’]);”
Then we updated to universal analytics and replaced the above code that was in the additional settings box with the below and set up an event goal to match it:
on_sent_ok: “ga(‘send’, ‘event’, ‘category’, ‘action’, ‘label’);”
…. but now it doesn’t track form submissions.
I also tried send pageview /thanks with the new universal code and set the page destination as a goal and still no joy.
Please can someone help with this? Do we need to implement Roundcape’s procedure first before this will work??
Any help would be much appreciated.
ThanksHi All,
I was struggling with this, and other posts didn’t seem to resolve.
Additionally, errors were very random, some of my sites work, some don’t. I was getting a “Uncaught ReferenceError: _gaq is not defined” when submitting (you can see this by opening the developer tools, console on google chrome)
At the end I resolved by introducing the following code (Ref 1) on the Header, at the beginning, of the page where your contact form is, replacing the UA-XXXXXX-1 with your analytics code.
<script type=”text/javascript”>
var _gaq = _gaq || [];
_gaq.push([‘_setAccount’, ‘UA-XXXXXXXX-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>
Then you can add the tracking code in the “Additional Settings” of the form, where you replace the /goals/enquiry-sent with whatever goal page you have defined (Ref 2):
on_sent_ok: “_gaq.push([‘_trackPageview’, ‘/goals/enquiry-sent’]);”
This now works consistently across all my websites. Hope this helps!
KR
SiroReferences to above procedure:
Ref 1) https://developers.google.com/analytics/devguides/collection/gajs/
Ref 2) http://www.creare.co.uk/goal-tracking-contact-form-7Found this too which sorted it.
http://www.techiemania.com/how-to-insert-ads-between-wordpress-header-and-posts.html
Also if you want to center it just ad the <center></center>
can anyone help with the code editing please I cant seem to find anything online about it?
Really appreciate it if someone can
Thanks
I’m sorry I dont know what you mean by link to forum?
I need help with the css editing of the theme to insert the adsense code under the header and top nav
thanks