Foxy Forum Status

We're no longer responding to questions via our forum, but we will keep it up for historical reasons. If you can't find the answer you're looking for, please visit our knowledge base or contact us. If there's enough interest in the future, we may bring the forum back.

Goal Funnel Not Displaying Correctly in Google Analytics

in Help edited October 2013
Hello everybody!

I recently did a site redesign and for some reason the "cart" step in the goal tracking process is not registering.

This is the code I currently have in my cart template:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

<html xmlns="">;
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" href="https://^^store_domain^^/themes/standard/styles.css"; type="text/css" media="screen" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
if ( == -1 && typeof(fc_json.custom_fields) != "undefined") {
if (fc_json.custom_fields.length > 0) {
window.location.hash = fc_json.custom_fields.replace( /\&/g, '&' );
if (typeof(fc_json.custom_fields) != "undefined") {
var href_link = $(this).attr('href') + fc_json.custom_fields.replace( /\&/g, '&' );
$(this).attr('href', href_link);

<script type="text/javascript">

var _gaq = _gaq || [];

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);


<script type="text/javascript" charset="utf-8">
// e.preventDefault(); // TODO
// setTimeout('document.location = "' + this.href + '";', 200); // TODO


Which I believe to be correct.

Here's my store:

Store is

I have pictures of my funnel visualization and page settings (ir, its set to track multiple top level domains) but I'm not sure how to attach images into this post :(

The other steps are working fine, and my e-commerce data is tracking just fine, but for some reason the Cart step isn't showing up.

Thoughts, anyone?
  • fc_adamfc_adam FoxyCart Team

    Actually, the cart tracking happens on your website - rather than on the cart directly. You have an error on your website because the analytics code is being included before the FoxyCart includes. If you switch those around, that should fix the error.
  • I am also having issues with the goal funnel visualization. Cart and Checkout pages show 0 visitors but the Checkout is showing 9.

    I've followed the directions for googleanalytics_async and believe I have set it up correctly. My store is at We are about to set up an adwords campaign so I need to see how traffic is flowing through the site. Any assistance would be appreciated.
  • fc_adamfc_adam FoxyCart Team

    I'm not seeing any site at - is that the correct domain?
  • I guess the server was down momentarily. It should work now if you try again. Thanks!
  • fc_adamfc_adam FoxyCart Team

    Still not loading up for me - is it loading up for you?
  • Arrgghhhh...Network Solutions!! It was up, now it is down. I appreciate your help Adam, I will repost when we are online again.
  • Hey Adam, site is back up again if you could take a look.
  • fc_adamfc_adam FoxyCart Team
    I am seeing an issue - particularly with your cart template. It looks like you have two closing </head> tags, and as such with our we include the jQuery on the cart, your analytics javascript is being included before that is added in.

    I'd suggest correcting the </head> tag issue, and then making sure that the javascript blocks on your cart template are included after the CSS style tag. Recache and resave your template, and see if that fixes the issue you're experiencing.
  • Thanks Adam, I will try that and report back when some orders have been completed.
  • Adam, I've made the suggested changes and I think it is working better. Perhaps the GA Integration Wiki could explain where exactly to add the code in the Cart, Checkout and Receipt in the "Setting Up Your FoxyCart Templates, The Easy Way"

    I have a couple follow up questions.

    1. In the Creating Your Goals section of the wiki the instructions say to...Switch the Match Type to “Exact Match”.
    However Google Analytics does not have the option of "Exact Match" anymore. The options are Equals to, Begins with and Regular Expression. Which of those should the /receipt be set to? I have it set to "Equal to" but I suspect it should be "Begins with"

    2. I made two purchases as a test on my site yesterday. However my Funnel shows 2 people going in through the Cart, 3 people going in through the Checkout, and 2 people reaching the Receipt page. I'm confused as to how anyone could enter through the Checkout without first going through the Cart.

    I hope these questions are helpful to others setting up Foxy Cart Analytics.
  • winstonwinston FoxyCart Team

    Thanks for the suggestion on updating the wiki. I believe you want "Begins with" as the match type, with a value still of '/receipt'. This will capture all users who make it to a receipt page. I've updated the wiki to reflect that.

    As for your second question, I'll pass that along to someone who is more knowledgeable on GA. Unfortunately, Adam is out for the next week or so, so it may take a little while for us to figure out the answer. We appreciate your patience.
  • FleefFleef Member
    edited November 2013

    When a customer first enters the cart page from clicking on an 'add to cart' link, the URL ends "/cart".

    When the user updates the quantity on the cart page, .php is appended to the URL so the changes can be parsed, so the URL ending becomes "/cart.php".

    Therefore, I'd suggest setting to the exact match type ("Equals to"), as using "begins with" will track another cart "entrance" when a user simply updates the quantity. This would erroneously reduce your goal conversion rate between the cart and checkout/receipt steps.

    To throw out some things to test on your second question, you may have triggered a checkout view in GA yourself even on your dev server. Also, I expect that the URL request made by FC when caching your templates also shows up in GA, which could be another explanation.
  • winstonwinston FoxyCart Team

    Thanks for the input and help!
  • @fleef

    Hmmm...well this is a little confusing.

    In GA you are given the option to set match type on the destination only, not on the funnel steps. However they also say:

    The match type you select for the Goal URL also applies to any URL in the Funnels section.

    So, whatever you set for the goal also applies to the funnel steps.

    So my question is, do urls in the process append any special characters after the ".php" in the url?

    Does it go exactly like this....

    Or does it go something like this...

    If it is the first case one should use the match type "Equals to". But if it is the second case one should use "Begins with". Right?
  • Hi @easinewe

    Following the instructions at in the "Configuring Your Profile Settings" section, you tell GA to exclude the fcsid query parameter. I have all configurations set to "equals to" and it's tracking as I would expect it to.

    Hope this helps!
  • fc_adamfc_adam FoxyCart Team
    edited November 2013

    The way our analytics set up is configured, we actually dictate what the page URL is for the cart, checkout and receipt pages - so no matter what the URL shows, the checkout will be tracked as /checkout - so setting it up as an exact match is the correct approach. Your funnel steps should not have the .php appended to the end - the goals should be set up exactly how they're documented on the wiki.
Sign In or Register to comment.