Zen Cart Logo
Forums / All Other Contributions/Addons / Simple Google Analytics - Support

Simple Google Analytics - Support

Views: 451,185

Results 961 to 980 of 2,165
22 Jul 2009, 3:05 PM
#961
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Simple Google Analytics - Support

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
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
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.

.

23 Jul 2009, 2:34 PM
#962
swamyg1 avatar

swamyg1

Zen Follower

Join Date:
Dec 2008
Location:
San Fran
Posts:
382
Plugin Contributions:
0

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.

26 Jul 2009, 1:02 AM
#963
econcepts avatar

econcepts

Totally Zenned

Join Date:
Dec 2005
Posts:
1,505
Plugin Contributions:
2

Re: Simple Google Analytics - Support

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/2007/12/04/google-analytics-site-overlay-trick/

27 Jul 2009, 3:59 PM
#964
iscatech avatar

iscatech

New Zenner

Join Date:
Mar 2009
Posts:
48
Plugin Contributions:
0

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?

28 Jul 2009, 12:16 AM
#965
mcarbone avatar

mcarbone

Zen Follower

Join Date:
Feb 2009
Location:
Simi Valley, CA
Posts:
99
Plugin Contributions:
0

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.

  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

<?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

29 Jul 2009, 1:31 AM
#966
paul3648 avatar

paul3648

Zen Follower

Join Date:
Mar 2007
Location:
Taiwan
Posts:
239
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Does anyone know how to set an "add to cart" goal in Google analytics? I've tried a regular expression

/index.php?main_page=product_info&cPath=.&products_id=.

but this doesn't work.

My intention is to see how many people add to their cart VS actual sales.

29 Jul 2009, 3:44 PM
#967
iscatech avatar

iscatech

New Zenner

Join Date:
Mar 2009
Posts:
48
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Hi paul3648,

You can use the same funnel as I am using:

  1. /index.php?main_page=product_info <<<--- Customer views product details
  2. /index.php?main_page=shopping_cart <<<--- Customer adds product to cart
  3. /index.php?main_page=checkout_shipping
  4. /index.php?main_page=checkout_payment
  5. /index.php?main_page=checkout_confirmation
  6. /index.php?main_page=checkout_success <<<--- Goal URL

Although as you can see a couple posts up, I had to use the full URL for these to work for me, such as:

https://www.yourdomain.com/index.php?main_page=checkout _success

(of course you would change to your domain, etc.)

30 Jul 2009, 4:16 PM
#968
paul3648 avatar

paul3648

Zen Follower

Join Date:
Mar 2007
Location:
Taiwan
Posts:
239
Plugin Contributions:
0

Re: Simple Google Analytics - Support

iscatech:

Hi paul3648,

You can use the same funnel as I am using:

  1. /index.php?main_page=product_info <<<--- Customer views product details
  2. /index.php?main_page=shopping_cart <<<--- Customer adds product to cart
  3. /index.php?main_page=checkout_shipping
  4. /index.php?main_page=checkout_payment
  5. /index.php?main_page=checkout_confirmation
  6. /index.php?main_page=checkout_success <<<--- Goal URL

Thanks iscatech,

I have a functional checkout_success goal, but I'm interested to see how that compares to a separate goal where people click "Add to Cart" and then leave the site.

I will try your first two steps, making product_info an essential step and shopping_cart the goal, but this won't record the "add to cart" clicks that are immediately abandoned. But perhaps that's nitpicking...

31 Jul 2009, 4:12 PM
#969
iscatech avatar

iscatech

New Zenner

Join Date:
Mar 2009
Posts:
48
Plugin Contributions:
0

Re: Simple Google Analytics - Support

I have my site set to display the shopping cart whenever a product is added. So as far as goal tracking is concerned, it would show hits on #1 and #2 of my goal path. (This option is under Admin > Config > My Store > Display cart after adding product.

I can see how many customers abandon at each stage of the process using the Funnel Visualization link in Google Analytics, starting from the product info page.

To see "add to cart" vs. "sales" I think you would use a similar path to mine but start with the cart instead of product info.

31 Jul 2009, 4:53 PM
#970
iscatech avatar

iscatech

New Zenner

Join Date:
Mar 2009
Posts:
48
Plugin Contributions:
0

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?

31 Jul 2009, 11:15 PM
#971
paul3648 avatar

paul3648

Zen Follower

Join Date:
Mar 2007
Location:
Taiwan
Posts:
239
Plugin Contributions:
0

Re: Simple Google Analytics - Support

iscatech:

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?

If you have Google analytics on more than one site, the number at the end of your UA code differentiates the sites. If you just have one site, the number should end with -1.

2 Aug 2009, 6:39 PM
#972
jeffgranite avatar

jeffgranite

New Zenner

Join Date:
Jun 2009
Posts:
4
Plugin Contributions:
0

Re: Simple Google Analytics - Support

please help i just installed the simple analytics

everything looks fine in the admin/config

i have put in the UA code including the last digit (-3) in my case

problem is that its not showing up as installed in my google analytics pages..(logged on through adwords)

the status shows the caution looking sign..(tracking not installed)

i directed the analytics page when setting up to track https://www.thestonesuperstore.com/shop

do i need the /shop?
will this create any problems

it has not yet been 24hrs since install but i was wondering if only the data takes 24hrs to be available or does it takes 24hrs for google to register the actual site..before it can get any data..

anyways the site is https://www.thestonesuperstore.com/shop

not sure what else i need to add

much appreciated in advance

jeff

13 Aug 2009, 9:00 AM
#973
mental_piracy avatar

mental_piracy

New Zenner

Join Date:
Jun 2009
Posts:
11
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Is it possible for the mod to place the template coding twice in each page if I installed it, deleted all files, uninstalled sql, and re-installed it?

My site and admin are running extremely slow, i've moved the google code to the bottom now, I don't know what is going on, it's quite frustrating.

http://www.fantasyblacksmith.com

link to my site above. -Doug

17 Aug 2009, 5:26 PM
#974
creamcrackers avatar

creamcrackers

Zen Follower

Join Date:
May 2009
Posts:
228
Plugin Contributions:
1

Re: Simple Google Analytics - Support

Hi
Thanks for the great mod

I installed it and entered my account id under configuration.

I go down to Activate Conversion Tracking... yes i use adwords... what is the Google Conversion Tracking ID? Where do i get that from, I cant find that in my analytics account OR in my adwords account.

Also i disregarded this:

Google told me to post this into the page: (i didnt is that right?

<script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-10268705-1"); pageTracker._trackPageview(); } catch(err) {}</script>
17 Aug 2009, 5:57 PM
#975
creamcrackers avatar

creamcrackers

Zen Follower

Join Date:
May 2009
Posts:
228
Plugin Contributions:
1

Re: Simple Google Analytics - Support

Hi
I installed everyting
Entered my tracking cookie as UA-10268705-1 and created the adwords code and entered that.

I set it as ecommerce site in google analytics

GA is showing the ! icon and saying that Tracking Not Installed on the profile page.

Ive tried 2 tracking numbers UA-10268705-1 and UA-10268705 and have tried with the new and old js script and made the settings for those in GA

Another thing.. in the install readme you say (for new installs)
BRAND NEW install, you will need to update your database with the googleanalytics.sql file.

Only there is no file by that name in the contribution so i used googleanalytics-INSTALL.sql

I am using Simple SEO URL mod with this contribution, could there be a conflicy?

Thanks again

17 Aug 2009, 6:12 PM
#976
creamcrackers avatar

creamcrackers

Zen Follower

Join Date:
May 2009
Posts:
228
Plugin Contributions:
1

Re: Simple Google Analytics - Support

I am sorry...

There is a difference in the code that ZC is outputting

ZC output

<script type="text/javascript"> _uacct = "UA-10268705-1"; urchinTracker(); </script></body></html>

And here is the output that Google wants (what they told me to paste in my page) - notice that "} catch(err) {}" is missing

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> try { _uacct = "UA-10268705-1"; urchinTracker(); } catch(err) {}</script>
19 Aug 2009, 1:24 AM
#977
vickichiki avatar

vickichiki

New Zenner

Join Date:
Dec 2005
Posts:
24
Plugin Contributions:
0

Re: Simple Google Analytics - Support

I have just installed this mod and followed the instructions, double checked everything but google is still saying tracking information is not there. I have had a look at the page source and it isnt actually appearing at all have I missed something?

I have uploaded the files and they are in the correct directories
As per step 2 I have made sure my tpl_main_page.php includes the code noted and I also put the code from that file before the /body tag
I have installed the sql patch
I have entered my analytics account and configured the settings.

I am not sure why my site isnt producing the code is it perhaps the template that is being used could my programmer have changed something there?

Site: http://www.retail.bubblebubs.com.au

any help greatly appreciated

19 Aug 2009, 4:14 AM
#978
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Simple Google Analytics - Support

vickichiki:

I have just installed this mod and followed the instructions, double checked everything but google is still saying tracking information is not there. I have had a look at the page source and it isnt actually appearing at all have I missed something?

I have uploaded the files and they are in the correct directories
As per step 2 I have made sure my tpl_main_page.php includes the code noted and I also put the code from that file before the /body tag
I have installed the sql patch
I have entered my analytics account and configured the settings.

I am not sure why my site isnt producing the code is it perhaps the template that is being used could my programmer have changed something there?

Site: http://www.retail.bubblebubs.com.au

any help greatly appreciated

Make sure if you use the over ride system you rename the admin folder to match your custom template name, and the /includes/templates/your_custom_template folders. If not it will not show up in your source code.

19 Aug 2009, 6:42 AM
#979
vickichiki avatar

vickichiki

New Zenner

Join Date:
Dec 2005
Posts:
24
Plugin Contributions:
0

Re: Simple Google Analytics - Support

There are no files to go into the templates folder in the admin section only

admin/includes/extra_datafiles
admin/includes/functions

there is one under includes

includes/templates/[your template]/google_analytics which I changed to 'CUSTOM' which is my current template

19 Aug 2009, 7:01 AM
#980
creamcrackers avatar

creamcrackers

Zen Follower

Join Date:
May 2009
Posts:
228
Plugin Contributions:
1

Re: Simple Google Analytics - Support

Hi

My page is outputting in the footer...

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "UA-10268705-1"; urchinTracker(); </script></body></html>

But no vists are being logged in analytics.
There appears to be a line of code missing.. comparing this to the code that google wants

} catch(err) {}</script>

Have I installed an out of date module?

Am I having problems with this because i am usine Simple SEO URL mod with this?

Thanks