Re: Simple Google Analytics - Support
Quote:
Originally Posted by
ptowers49
I'm trying to track traffic from other sites especially cpc that comes in to specific product pages.
Can this be done?
When I look for the google analytics code on pages it appears on the home page and category pages BUT not on product pages!!! Is that right?
You have the code installed incorrectly if it is showing on some pages but not others. If you installed it per the instructions it will appear on all pages of the site including the checkout page.
You can track cpc traffic by then linking your Adwords account to your Google Analytics account and indicating to Google that you want to "Apply Cost Data" to your reports.
This will get you all the detail you need on cpc.
But again, you need to have the GA code installed correctly first and it appears that isn't the case.
There are only a few steps to installing this mod are you sure you are using this one (there is another mod that is not mine out there.)
If you can't figure it out, post a link and I'll see if I can't pin point what might be going on.
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
econcepts
James,
Do you have an affiliate program (like JAM / JROX) installed on your site? This the way this is installed causes it to override the thank you page (footer) of the site and thus renders the Google Analytics Tracking code non-working (it removes it from the page).
If that is the case you can read my post in the link below for installing it with JROX / JAM. Go to the following link and scroll to the bottom of the page (July 22 post). You'll see the instructions for how to do this.
http://www.zencartoptimization.com/2...-the-workbook/
If this does not correct your issue let me know and I can take a look.
Thanks!
Hi Eric,
Thank you for your support on this. We do have an affiliate program installed. It is iDev affiliate. We didn't do the installation so we are looking into how this was integrated. Once we see the integration we will follow the advice on your website and let you know the outcome.
Highest Regards,
James
Re: Simple Google Analytics - Support
Eric,
I've found that I have no footer on the product pages!! www.classicalchandeliers.co.uk
I other sites I am building like www.electrical-and-plumbing-supplies.co.uk that I have not put simple google analystics on yet so I wouldn't think the problem is there... but do have any ideas what the problem might be.
I have loaded glacial age, Image handler 2 , zenlightbox modules.
thanks in anticipation/ Paul
Re: Simple Google Analytics - Support
more info Eric
I get this debug error require(includes/templates/template_default/templates/tpl_modules_xsell_products.php) ? when I look at product pages without the footer
Re: Simple Google Analytics - Support
I have performed this fix to make the footer re-appear on the product pages
Footer not displaying on product pages
looked in includes/templates/glacial_age/templates/tpl_product_info_display.php
and commented out
// require($template->get_template_dir('tpl_modules_xsell_products.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_xsell_products.php');
On line 271
I'll check the analytics again
######################################################################################################################################################___
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
econcepts
James,
Do you have an affiliate program (like JAM / JROX) installed on your site? This the way this is installed causes it to override the thank you page (footer) of the site and thus renders the Google Analytics Tracking code non-working (it removes it from the page).
If that is the case you can read my post in the link below for installing it with JROX / JAM. Go to the following link and scroll to the bottom of the page (July 22 post). You'll see the instructions for how to do this.
http://www.zencartoptimization.com/2...-the-workbook/
If this does not correct your issue let me know and I can take a look.
Thanks!
:lookaroun
Hey Thanks so much for your help. We followed the instructions you provided and the Simple Google Analytics eCommerce Tracking worked. BUT, our iDefAffiliate program did not work anymore. So, we had to back out the changes and add revert back to the 'tple_footer.php' file that you recommended we removed.
We did try to add the iDev Affiliate code to the 'tpl_main_page.php' as you suggested to move the JAM code. But, this caused the site to not even load. We don't have a test environment and we are not php coders, but we do want iDevAffiliate and Google Analytics eCommerce tracking to work at the same time. Do you have a suggested approach to resolve this issue?
For your reference, this is the instructions that the iDevAffiliate gives for Zen integration:
ZenCart Version 1.3.x or Newer
1. Download the template override file: Download Here
2. Save the file to your local harddrive.
3. Edit that file and near the bottom, adjust the path to your iDevAffiliate installation folder/directory.
4. Upload that file to your /zencart/includes/templates/your_template_directory/checkout_success/tpl_footer.php directory.
Notes:
1. The directory your_template_directory is the ZenCart template directory you're using.
2. If the directory checkout_success doesn't exist, create it and upload tpl_footer.php into it.
Here are the contents of the 'template override file they provided:
<?PHP
require(DIR_WS_MODULES . zen_get_module_directory('footer.php'));
if (!$flag_disable_footer) {
?>
<div id="navSuppWrapper">
<div id="navSupp">
<ul>
<li><?PHP echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?PHP echo HEADER_TITLE_CATALOG; ?></a></li>
<?PHP if (EZPAGES_STATUS_FOOTER == '1' or (EZPAGES_STATUS_FOOTER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
<li><?PHP require($template->get_template_dir('tpl_ezpages_bar_footer.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_footer.php'); ?></li>
<?PHP } ?>
</ul>
</div>
</div>
<?PHP
if (SHOW_FOOTER_IP == '1') {
?>
<div id="siteinfoIP"><?PHP echo TEXT_YOUR_IP_ADDRESS . ' ' . $_SERVER['REMOTE_ADDR']; ?></div>
<?PHP
}
?>
<?PHP
if (SHOW_BANNERS_GROUP_SET5 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET5)) {
if ($banner->RecordCount() > 0) {
?>
<div id="bannerFive" class="banners"><?PHP echo zen_display_banner('static', $banner); ?></div>
<?PHP
}
}
?>
<div id="siteinfoLegal" class="legalCopyright"><?PHP echo FOOTER_TEXT_BODY; ?></div>
<?PHP }
if ((int)$orders_id > 0) {
$IDEV = $db->Execute("select class, value from " . TABLE_ORDERS_TOTAL . " where orders_id = '".(int)$orders_id."' AND class in ('ot_coupon', 'ot_subtotal', 'ot_group_pricing')");
while (!$IDEV->EOF) {
switch ($IDEV->fields['class']) {
case 'ot_subtotal':
$order_subtotal = $IDEV->fields['value'];
break;
case 'ot_coupon':
$coupon_amount = $IDEV->fields['value'];
break;
case 'ot_group_pricing':
$group_pricing_amount = $IDEV->fields['value'];
break;
}
$IDEV->MoveNext();
}
$idev_sale_amount = ($order_subtotal - $coupon_amount - $group_pricing_amount);
$idev_sale_amount = number_format($idev_sale_amount,2,'.','');
// Make sure the below path is correctly pointing to your installation folder/directory.
echo "<img border=\"0\" src=\"http://www.yourdomain.com/idevaffiliate/sale.php?idev_saleamt=$idev_sale_amount&idev_ordernum=$orders_id\" height=\"1\" width=\"1\">";
echo "</td></tr></table>";
}
?>
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
ptowers49
I have performed this fix to make the footer re-appear on the product pages
Footer not displaying on product pages
looked in includes/templates/glacial_age/templates/tpl_product_info_display.php
and commented out
// require($template->get_template_dir('tpl_modules_xsell_products.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_xsell_products.php');
On line 271
I'll check the analytics again
######################################################################################################################################################___
That is one way to get around it but not the ideal way. By commenting that out you just removed (in essence) the ability to cross sell products.
A better way to go about it is to reinstall the "cross sell" module which would replace the previously missing file and correct the error (while allowing you to still cross sell).
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
jamesmcl515
:lookaroun
Hey Thanks so much for your help. We followed the instructions you provided and the Simple Google Analytics eCommerce Tracking worked. BUT, our iDefAffiliate program did not work anymore. So, we had to back out the changes and add revert back to the 'tple_footer.php' file that you recommended we removed.
We did try to add the iDev Affiliate code to the 'tpl_main_page.php' as you suggested to move the JAM code. But, this caused the site to not even load. We don't have a test environment and we are not php coders, but we do want iDevAffiliate and Google Analytics eCommerce tracking to work at the same time. Do you have a suggested approach to resolve this issue?
For your reference, this is the instructions that the iDevAffiliate gives for Zen integration:
ZenCart Version 1.3.x or Newer
1. Download the template override file: Download Here
2. Save the file to your local harddrive.
3. Edit that file and near the bottom, adjust the path to your iDevAffiliate installation folder/directory.
4. Upload that file to your /zencart/includes/templates/your_template_directory/checkout_success/tpl_footer.php directory.
Notes:
1. The directory your_template_directory is the ZenCart template directory you're using.
2. If the directory checkout_success doesn't exist, create it and upload tpl_footer.php into it.
Here are the contents of the 'template override file they provided:
<?PHP
require(DIR_WS_MODULES . zen_get_module_directory('footer.php'));
if (!$flag_disable_footer) {
?>
<div id="navSuppWrapper">
<div id="navSupp">
<ul>
<li><?PHP echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?PHP echo HEADER_TITLE_CATALOG; ?></a></li>
<?PHP if (EZPAGES_STATUS_FOOTER == '1' or (EZPAGES_STATUS_FOOTER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
<li><?PHP require($template->get_template_dir('tpl_ezpages_bar_footer.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_footer.php'); ?></li>
<?PHP } ?>
</ul>
</div>
</div>
<?PHP
if (SHOW_FOOTER_IP == '1') {
?>
<div id="siteinfoIP"><?PHP echo TEXT_YOUR_IP_ADDRESS . ' ' . $_SERVER['REMOTE_ADDR']; ?></div>
<?PHP
}
?>
<?PHP
if (SHOW_BANNERS_GROUP_SET5 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET5)) {
if ($banner->RecordCount() > 0) {
?>
<div id="bannerFive" class="banners"><?PHP echo zen_display_banner('static', $banner); ?></div>
<?PHP
}
}
?>
<div id="siteinfoLegal" class="legalCopyright"><?PHP echo FOOTER_TEXT_BODY; ?></div>
<?PHP }
if ((int)$orders_id > 0) {
$IDEV = $db->Execute("select class, value from " . TABLE_ORDERS_TOTAL . " where orders_id = '".(int)$orders_id."' AND class in ('ot_coupon', 'ot_subtotal', 'ot_group_pricing')");
while (!$IDEV->EOF) {
switch ($IDEV->fields['class']) {
case 'ot_subtotal':
$order_subtotal = $IDEV->fields['value'];
break;
case 'ot_coupon':
$coupon_amount = $IDEV->fields['value'];
break;
case 'ot_group_pricing':
$group_pricing_amount = $IDEV->fields['value'];
break;
}
$IDEV->MoveNext();
}
$idev_sale_amount = ($order_subtotal - $coupon_amount - $group_pricing_amount);
$idev_sale_amount = number_format($idev_sale_amount,2,'.','');
// Make sure the below path is correctly pointing to your installation folder/directory.
echo "<img border=\"0\" src=\"http://www.yourdomain.com/idevaffiliate/sale.php?idev_saleamt=$idev_sale_amount&idev_ordernum=$orders_id\" height=\"1\" width=\"1\">";
echo "</td></tr></table>";
}
?>
Yes, this install of iDev is basically the same as it is with JAM (same concept, same files altered.)
You would still want to follow the same instructions as for JAM (of course removing the JAM portion and replacing with the iDev affiliate one).
If you need help send me a private message and I'll take a look.
Thanks!
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
econcepts
Yes, this install of iDev is basically the same as it is with JAM (same concept, same files altered.)
You would still want to follow the same instructions as for JAM (of course removing the JAM portion and replacing with the iDev affiliate one).
If you need help send me a private message and I'll take a look.
Thanks!
Hey Eric,
Once again you are an amazing resource for the Zen Cart community, thank you. Before we give this another shot, I have one additional question.
Do we need to include the entire contents of the 'tpl_footer.php' page on the 'tpl_main_page.php' page or just a snippet that is relevant to iDev?
Thanks again,
James
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
jamesmcl515
Hey Eric,
Once again you are an amazing resource for the Zen Cart community, thank you. Before we give this another shot, I have one additional question.
Do we need to include the entire contents of the 'tpl_footer.php' page on the 'tpl_main_page.php' page or just a snippet that is relevant to iDev?
Thanks again,
James
James,
Thanks for the kind words. I love to help.
To answer your question ...
You do NOT want to include the entire contents of the tpl_footer.php file in the tpl_main_page.php
You only want to include the bit that I have indicated in the instructions at that previous link (let me know if you need that again.)
It would look something like this (at the bottom of your tpl_main_page.php).
PHP Code:
< ?php
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
?>
< ?php
if ($_GET['main_page']=="checkout_success") {
##########################################
## START iDevAffiliate INTEGRATION WITH ZEN CART ##
##########################################
Insert your iDeve Affiliate code here taken from your tpl_footer.php page
#######################################
## END iDevAffiliate INTEGRATION WITH ZEN CART ##
#######################################
} // end if for determining if this was the checkout_success page.?>
Let me know if that helps. Remember, once you do this and find it is working you will need to remove that "checkout_success" directory (the one under your custom template NOT the core one!) for the override to work.
If you need me to fix it for you let me know and I can take a look (I'll PM you the details).