Using Google Analytics with a custom header/footer.
Normally CartManager 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. |