Google Analytics integration not fully working with 0.7

kanjigirlkanjigirl Member
in Bugs & Feature Requests edited April 2011
I used this thorough guide to get GA integrated on 0.7 on my client's WordPress site:

http://wiki.foxycart.com/integration/googleanalytics_async

Here's the product page on the site:

http://www.strikemodels.com/products/

The cookie test appeared to be okay - I think. I did a bunch of test runs and then waited to see the funnel - the funnel shows the right number at the top, but otherwise is full of zeros.

I went through the complete documentation again line by line, the cookies looked okay again. I ran more tests and this morning just checked the funnel again - same results, nothing in the funnel.

Please help. I don't know what to try next, but I do remember we had a rough time getting the former instructions to work with 0.6.

One of the things I see on our old checkout.html file is that we had to put part of the Analytics integration code in the head section, and that seemed to help get things working in 0.6 for this WordPress site. This is the code in the head section of the old checkout file:
<script type="text/javascript">
	var analyticsFileTypes = [''];
	var analyticsEventTracking = 'enabled';
</script>
<script type="text/javascript">
	var _gaq = _gaq || [];
	_gaq.push(['_setAccount', 'UA-8921152-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';
		(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
	})();
</script>

Is that something we need to try for 0.7, something like that?
Comments
  • sparkwebsparkweb Member, Integration Developer, FoxyShop, Order Desk
    Don't know if this will help simplify it at all, but I put together a simpler guide for the installation here:

    http://www.foxy-shop.com/wp-content/uploads/2011/02/FoxyCart_Google_Analytics.txt

    Just the straight code samples you need to add to the pages and templates. I know you've been over and over it, but this might be a fresh perspective.
  • Thanks, I'll go through your guide this afternoon.
  • Sparkweb, I'm reassured to say that your guide's code was exactly identical to what I had in my pages, so that makes me feel a bit better.

    I did also find some GA code in my head section on the checkout.html page, leftover from the 0.6 FoxyCart stuff. I removed that, and maybe it will make a difference. Beginning another round of testing now.
  • sparkwebsparkweb Member, Integration Developer, FoxyShop, Order Desk
    That testing is so hard because you have to wait so long to see the results. Good luck!
  • brettbrett FoxyCart Team
    @sparkweb, we should probably add that to our wiki as a "Simplified Instructions" section. You ok with that?
  • sparkwebsparkweb Member, Integration Developer, FoxyShop, Order Desk
    Sure Brett, go for it!
  • brettbrett FoxyCart Team
    Nice. Added a "simple" section to the wiki. Hopefully that'll help others. Thanks @sparkweb for pointing out that a simple copy/paste approach would be worthwhile.
Sign In or Register to comment.