
Originally Posted by
Yaro
Jeking, thank you!
I've did everything according to the installation manual, including file changes, I added this code into tpl_main_page.php:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
// Do nothing
} else {
require(DIR_WS_TEMPLATE . 'google_analytics/google_analytics.php');
}
?>
</body>
And I installed the SQL patch (uploaded a file through the ZC admin)
Why the GA code is not showing now?
Make sure you Change the "admin" and "your_template" folder name to match the name of your custom directory and ftp upload to your sever.
Where ever you see the words "your_template" (in either these instructions, or the file folders included with the install)
you should REPLACE that with the directory name that your template is running from. So for example, if you are running a
custom template and the directory that you decided to keep those template files in is called "mycustomtemplate" then, where ever
you see the words "your_template", you would change it to "mycustomtemplate".
If you are using the default template provided with zen cart, then you would replace each instance of "your_template" with the
following: "template_default"
Make sure you insert this code in the body tag in /includes/templates/[your_template]/common/tpl_main_page.php
At the bottom just before the closing </body> tag:
PHP Code:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
// Do nothing
} else {
require(DIR_WS_TEMPLATE . 'google_analytics/google_analytics.php');
}
?>
The code is not installed on your site yet. Follow the direction for it to show when you view source at the bottom of the page.
Bookmarks