cart template setup for Google Analytics integration

kanjigirlkanjigirl Member
in Help edited March 2010
What exactly is the CART template? Is that the products page that has links to FoxyCart, or something else?

Re: "CART: Add the following above the </body> tag on your CART template. Do not include the GA script calls on your cart template or you'll register that page twice (the visit to the cart page is tracked by a Javascript call on your product page)"

I'm trying to set up GA for FoxyCart in WordPress. Am I supposed to put the GA snippet in the footer? If so, how will that *not* be called twice on the CART page?
Comments
  • Another thing - my client's product links look like this:

    <a href="https://strikemodels.foxycart.com/cart?name=BBSYST-2A&price=1&category=S1 "class="foxycart">Add to Cart</a></td><td class="column-2">Shipping $1 per shipment</td><td class="column-3">$1</td>

    They don't have a code parameter in there which it says Google Analytics needs - can 'code=BBSYST-2A' work along with 'name=BBSYST-2A' or do they need to be two separate values? I'm thinking we just add '&code=Something' to the query?
  • bjbkbjbk Member
    Hey kanjigirl,

    Firstly, the cart template is the template that defines the look and feel of the FoxyCart cart object (the one that appears in the popup when you add something to the cart). This is accessible from the FC admin, just like you access the checkout template from the admin. In there is where you add the google analytics code to the cart page.

    As for your second post there, Brett may correct me here, but you could use the name as the code too, but as noted in the wiki, in version 060 of FoxyCart it will make a code from your name already if you don't specify one.

    Hope that helps.
  • Thanks!
  • brettbrett FoxyCart Team
    @bjbk I think you covered it, except "in there is where you _don't_ add the google analytics code to the cart page" ;)

    @kanjigirl, let us know how it goes.
Sign In or Register to comment.