Re: Simple Google Analytics - Support
Quote:
Originally Posted by
mcarbone
Hi,
I apologize if this problem was posted elsewhere, but my google analytics is no longer tracking.
I installed the simple google analytics mod and updated my includes/templates/my_template/common/tpl_main_page with this code:
I also updated the admin with the google account number and tested. Everything worked fine at that point. Since then I have had two orders that did not register with Google Analytics. :lamo:
I also have JROX installed, however that integration is in the tpl_footer.php file.
Any feedback always immensly appretiated!
Thank you,
Michelle
Google analytics JAM Affiliate Integration Instructions for Zen Cart
===========================================================================
1) DELETE the directory and file found here /includes/templates/[your template directory here]/checkout_success/tpl_footer.php
2) Open the following file:
/includes/templates/[your template directory here]/common/tpl_main_page.php
And replace the following code at the bottom of the page
PHP Code:
<?php
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
?>
With this code (making sure you put your actual domain name in place of "yourdomainhere.com" in the JAM AFFILIATE portion.)
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 JAM INTEGRATION WITH ZEN CART ##
## ZC Integration code by DrByte 8/2006 ##
##########################################
if (isset($zv_orders_id) && (int)$zv_orders_id > 0 && isset($order_summary) && is_array($order_summary)) {
if (!isset($_SESSION['affiliate_order_id']) || $_SESSION['affiliate_order_id'] != $zv_orders_id ) {
$_SESSION['affiliate_order_id'] = $zv_orders_id;
$commissionable_order_formatted = number_format($order_summary['commissionable_order'], 2, '.', '');
echo '<script language="javascript" type="text/javascript" src="https://www.yourdomainhere.com/affiliates/sale.php?amount=' . $commissionable_order_formatted . '&trans_id=' . $order_summary['order_number'] . '"></script>';
}
}
#######################################
## END JAM INTEGRATION WITH ZEN CART ##
#######################################
} // end if for determining if this was the checkout_success page.?>
3) Save and upload the tpl_main_page.php and you're all set.
.
Re: Simple Google Analytics - Support
I'm getting a funny error when trying to do a site overlay. Everything else within analytics seems to be working just fine, but I need to see what people are clicking on!
20002: Access denied. Please try relaunching site overlay from the report.
Any idea why I'm getting this error? It's been months and no resolution.
Re: Simple Google Analytics - Support
Quote:
Originally Posted by
swamyg1
I'm getting a funny error when trying to do a site overlay. Everything else within analytics seems to be working just fine, but I need to see what people are clicking on!
20002: Access denied. Please try relaunching site overlay from the report.
Any idea why I'm getting this error? It's been months and no resolution.
You'll have to ask Google on this one. That's something that is in their control. Sounds like a permission issue. You won't be able to see what people are clicking on anyhow as the Site Overlay has a fatal flaw.
Read this previous article I wrote about how to correct that:
http://www.zencartoptimization.com/2...overlay-trick/
Re: Simple Google Analytics - Support
Ok, I changed to the full addresses and now my goals work great! Thank you econcepts!
I am still not registering any sales in the eCommerce area, any ideas? I've read the instructions on Google Analytics and it refers to adding some code on the receipt page, like _addTrans() and _addItem() functions, but I don't understand this... any help?
Re: Simple Google Analytics - Support
Hi econcepts,
Thank you for your help, but it is still not working.
I did #1 as requested below, but instead of checkout_success/tpl_footer.php, I deleted the includes/templates/[your template directory here]/templates/tpl_footer.php which is what I thought you meant.
Quote:
1) DELETE the directory and file found here /includes/templates/[your template directory here]/checkout_success/tpl_footer.php
I then inserted the following code in /includes/templates/[my template]/common/tpl_main_page.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 JAM INTEGRATION WITH ZEN CART ##
## ZC Integration code by DrByte 8/2006 ##
##########################################
if (isset($zv_orders_id) && (int)$zv_orders_id > 0 && isset($order_summary) && is_array($order_summary)) {
if (!isset($_SESSION['affiliate_order_id']) || $_SESSION['affiliate_order_id'] != $zv_orders_id ) {
$_SESSION['affiliate_order_id'] = $zv_orders_id;
$commissionable_order_formatted = number_format($order_summary['commissionable_order'], 2, '.', '');
echo '<script language="javascript" type="text/javascript" src="https://www.medsafeglobal.com/jamaffiliates/sale.php?amount=' . $commissionable_order_formatted . '&trans_id=' . $order_summary['order_number'] . '"></script>';
}
}
#######################################
## END JAM INTEGRATION WITH ZEN CART ##
#######################################
} // end if for determining if this was the checkout_success page.?>
..then...nada, zip, zilch after a test order was placed!
:cry:
Could it be that because the cart is on a second level heirarchy (like domain.com/cart) that it is the reason why I'm having issues? Hmmmm
Thanks again for your help!
Michelle
Re: Simple Google Analytics - Support
Ok new question:
In my Google Analytics, in the top right corner I see me tracking number, UA-#######. When I got to check the tracking status I see UA-#######-3. I have also seen in other threads people using a "-1" at the end. What is the difference? Which number do I enter in the GA Config?
I have been using just the number, but GA is not recording ecommerce sales. Could this be why?