Help Search our knowledge base:

Index - FAQ - Misc

 Details
Frequently Asked
Question (FAQ)

Document Number: 1140

Optimize for Printing
E-Mail This Link

 Feedback
This document ...
helps resolve my question or problem.
does not apply to my question or problem.
is inaccurate for my question or problem.
Using Google Analytics with a custom header/footer.

Normally QCCart will configure your Google Analytics ID automatically if you enter your ID into step 8 of the shopping cart. However if you are using a 'Header' And 'Footer' Template then additional steps are required.

A very basic header/footer will look like this

<html>
  <head>
    <title>##HTML.PageTitle##</title>
  </head>
  <body>
    put cart here
  </body>
</html>

In order to add Google Analytic to your pages you need to add this line

<html>
  <head>
    <title>##HTML.PageTitle##</title>
    #include 'main/GoogleAnalytics.html'
  </head>
  <body>
    put cart here
  </body>
</html>

Adding Google Analytic to your header in this way will ensure that the shopping cart creates all the correct JavaScript when needed.

Note: Manually adding the JavaScript code that is provided by Google will make some cart features not function properly.