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

Simple Google Analytics - Support

Views: 451,169

Results 1,441 to 1,460 of 2,165
14 Feb 2011, 8:18 PM
#1441
pepsishot avatar

pepsishot

New Zenner

Join Date:
Aug 2007
Location:
Upstate, NY
Posts:
48
Plugin Contributions:
0

Simple Google Analytics - Support

econcepts:

Make sure you complete step 3 of the README file. That is a line of code which inserts the tracking on the page.

There were 2 parts to step 3. A) to the tpl_main_page.php and then B) to the html_header.php

I opened both and added the code that was listed in the README. I don't see where my GA code should go in there.

I'm sorry, could you please break it down for me?

My admin has my GA code. I believe that part is done correctly. It's the step 3 that is my hang up. I think.

Thank you.

Amber

15 Feb 2011, 4:00 PM
#1442
hermes369 avatar

hermes369

New Zenner

Join Date:
Dec 2006
Location:
Augusta, GA
Posts:
74
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Thank you Redbaron2 and econcepts. I've made sure that the code is the same on both, and yes, e-commerce is checked inside of Google Analytics. It's making my head hurt!

I think I've tried this before; but, in case I haven't, I've added a trailing slash to the Website URL in the hopes that makes the difference. ARGH!

16 Feb 2011, 3:57 AM
#1443
pepsishot avatar

pepsishot

New Zenner

Join Date:
Aug 2007
Location:
Upstate, NY
Posts:
48
Plugin Contributions:
0

Re: Simple Google Analytics - Support

pepsishot:

There were 2 parts to step 3. A) to the tpl_main_page.php and then B) to the html_header.php

I opened both and added the code that was listed in the README. I don't see where my GA code should go in there.

I'm sorry, could you please break it down for me?

My admin has my GA code. I believe that part is done correctly. It's the step 3 that is my hang up. I think.

Thank you.

Amber

Now I'm more confused than ever. While waiting for additional help... my cart disappeared. My host told me to remove my attempt to add this simple google analytics mod and see what happens. I did and now my cart is back. Which is great I guess. But I really want to add this tracking and can't seem to get it to work.

Any ideas?

The steps are very easy to follow and yet I've gone wrong somewhere.

Thank you for any help you may offer me.

Amber

16 Feb 2011, 1:44 PM
#1444
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

pepsishot:

Now I'm more confused than ever. While waiting for additional help... my cart disappeared. My host told me to remove my attempt to add this simple google analytics mod and see what happens. I did and now my cart is back. Which is great I guess. But I really want to add this tracking and can't seem to get it to work.

Any ideas?

The steps are very easy to follow and yet I've gone wrong somewhere.

Thank you for any help you may offer me.

Amber

Amber,

Send me a private message and we'll work through it here.

Thanks!

18 Feb 2011, 4:00 AM
#1445
hermes369 avatar

hermes369

New Zenner

Join Date:
Dec 2006
Location:
Augusta, GA
Posts:
74
Plugin Contributions:
0

Re: Simple Google Analytics - Support

hermes369:

I've added a trailing slash to the Website URL in the hopes that makes the difference. ARGH!

No dice. Still nothing. :-(

18 Feb 2011, 12:31 PM
#1446
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

hermes369:

No dice. Still nothing. :-(

What's the URL of the website?

18 Feb 2011, 6:16 PM
#1447
hermes369 avatar

hermes369

New Zenner

Join Date:
Dec 2006
Location:
Augusta, GA
Posts:
74
Plugin Contributions:
0

Re: Simple Google Analytics - Support

econcepts:

What's the URL of the website?

http://www.supernutrient.com/cart/index.php

When I look at the content overlay in Google Analytics on scubadorag.com (the other cart, where google analytics is reporting), I can see where people are clicking on the link to the cart. However, on supernutrient.com, there are no clicks registered on the link to the cart, despite our getting plenty of orders. Also, there are no registered clicks inside the cart. On the scubadorag.com overlay, there are clicks registered inside the cart.

Thanks for your help.

21 Feb 2011, 4:27 PM
#1448
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

hermes369:

http://www.supernutrient.com/cart/index.php

When I look at the content overlay in Google Analytics on scubadorag.com (the other cart, where google analytics is reporting), I can see where people are clicking on the link to the cart. However, on supernutrient.com, there are no clicks registered on the link to the cart, despite our getting plenty of orders. Also, there are no registered clicks inside the cart. On the scubadorag.com overlay, there are clicks registered inside the cart.

Thanks for your help.

The overlay is not a good indicator of clicks etc... Until it gets revamped I wouldn't even look at it. Here's why:

http://www.zencartoptimization.com/2007/12/04/google-analytics-site-overlay-trick/

21 Feb 2011, 4:32 PM
#1449
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

hermes369:

http://www.supernutrient.com/cart/index.php

When I look at the content overlay in Google Analytics on scubadorag.com (the other cart, where google analytics is reporting), I can see where people are clicking on the link to the cart. However, on supernutrient.com, there are no clicks registered on the link to the cart, despite our getting plenty of orders. Also, there are no registered clicks inside the cart. On the scubadorag.com overlay, there are clicks registered inside the cart.

Thanks for your help.

Looking at the code on the pages, both looks ok. This leads me to believe that the issue is one which is related to the Google Analytics account side of things.

Have you compared the tracking id that you are using in the cart which is not reporting with the tracking id of the same profile (in your Google Analytics account) to ensure they are the same. I've seen where a store accidentally inserts the tracking ID from a different profile and thus the tracking funnels there and not into the proper one they are looking at.

If that is correct, the only way I would be able to see what you might have done wrong is to get access to your Google Analytics account to check it out. The on page code looks good so the problem likely is in there somewhere.

Send me a private message if you want me to let you know what we could do.

Thanks!

22 Feb 2011, 7:06 PM
#1450
it2steve avatar

it2steve

New Zenner

Join Date:
Feb 2011
Posts:
22
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Quick question. running the latest Zen Cart with a template add-on. I don't know too much about this kind of thing but am smart enough to NOT make a change without a backup or int the middle of a rush.

In trying to install the Google analytics I think I have it all covered except the 'last part'?

  • Ive signed up on google got my code / put it in admin/config
  • copied the two files into the proper directories on my site (renamed admin folder and 'my template' folder
  • Step 3 - made the change in tpl_main_page.php
  • Step 3 part B (HERE IS MY ISSUE) - make change in html_header.php ...
    I dont have that page listed? I'm assuming it's because of the template I am using? I have a tpl_headed.php BUT there is no </head> tag found at the bottom of it?

Any suggestions?

i was scared to add it to the tpl_header page as I was right in the middle of a rush and didn't wanna brick my site.

23 Feb 2011, 1:58 PM
#1451
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

it2steve:

Quick question. running the latest Zen Cart with a template add-on. I don't know too much about this kind of thing but am smart enough to NOT make a change without a backup or int the middle of a rush.

In trying to install the Google analytics I think I have it all covered except the 'last part'?

  • Ive signed up on google got my code / put it in admin/config
  • copied the two files into the proper directories on my site (renamed admin folder and 'my template' folder
  • Step 3 - made the change in tpl_main_page.php
  • Step 3 part B (HERE IS MY ISSUE) - make change in html_header.php ...
    I dont have that page listed? I'm assuming it's because of the template I am using? I have a tpl_headed.php BUT there is no </head> tag found at the bottom of it?

Any suggestions?

i was scared to add it to the tpl_header page as I was right in the middle of a rush and didn't wanna brick my site.

Copy the html_header.php file from the 'template_default' directory (into your own custom directory) and then work with that. That is how you get it into there if not already present.

23 Feb 2011, 9:58 PM
#1452
it2steve avatar

it2steve

New Zenner

Join Date:
Feb 2011
Posts:
22
Plugin Contributions:
0

Re: Simple Google Analytics - Support

econcepts:

Copy the html_header.php file from the 'template_default' directory (into your own custom directory) and then work with that. That is how you get it into there if not already present.

Thanks for the quick reply, HOWEVER I did notice that I am getting movement on my google analytics now. Should I leave it be or is there something necessary in that header that you think I'd need? I'm not much into all the php / web stuff and like to keep it as simple as possible.

24 Feb 2011, 2:43 PM
#1453
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

it2steve:

Thanks for the quick reply, HOWEVER I did notice that I am getting movement on my google analytics now. Should I leave it be or is there something necessary in that header that you think I'd need? I'm not much into all the php / web stuff and like to keep it as simple as possible.

You will need the header file if you switch to the new Asychronous tracking method Google has (you get that option from with my Analytics admin and can choose between three different tracking codes.)

If you are using anything but the asych code it should work but I would advise for correctness to add the proper info the the html header as not doing so can cause problems in the future. Partially installing something is never a good idea.

25 Feb 2011, 2:26 PM
#1454
it2steve avatar

it2steve

New Zenner

Join Date:
Feb 2011
Posts:
22
Plugin Contributions:
0

Re: Simple Google Analytics - Support

econcepts:

You will need the header file if you switch to the new Asychronous tracking method Google has (you get that option from with my Analytics admin and can choose between three different tracking codes.)

If you are using anything but the asych code it should work but I would advise for correctness to add the proper info the the html header as not doing so can cause problems in the future. Partially installing something is never a good idea.

again, thanks for your help... you don't think that copying that html_header.php will change the appearance or functionality of my 'current' template?

If it's easier to look at what I have it's at electronicCrap.com (I know catchy) I just started this thing 10 days ago to help out with hard to find items for a select group and it's gone nuts, 100 orders in 10 days. I thought I'd use this tool to see what the possibilities of 'expanding' are.

Just scared to mess something up that's working so well.

[EDIT] just tried to drop it in and the site went away until I pulled it back out. any thoughts?

25 Feb 2011, 3:29 PM
#1455
countrycharm avatar

countrycharm

Totally Zenned

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

Re: Simple Google Analytics - Support

Eric which code show the most data and does the best job. The legacy 'urchin.js' tracking code, the ga.js tracking code or the newest Asynchronous tracking code released in Dec 2009 by Google. I always wondered about that. Thanks for you response.

27 Feb 2011, 2:59 PM
#1456
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

it2steve:

again, thanks for your help... you don't think that copying that html_header.php will change the appearance or functionality of my 'current' template?

If it's easier to look at what I have it's at electronicCrap.com (I know catchy) I just started this thing 10 days ago to help out with hard to find items for a select group and it's gone nuts, 100 orders in 10 days. I thought I'd use this tool to see what the possibilities of 'expanding' are.

Just scared to mess something up that's working so well.

[EDIT] just tried to drop it in and the site went away until I pulled it back out. any thoughts?

That file should not alter the look of your template at all.

It should drop in flawlessly and have no negative impact. If the site goes away (white page) when you drop it in that means you have a PHP error somewhere in the file (likely created from attempting to add new lines of code but not completed correctly.)

The way to find out where your error is is to check your error log (found in your cache directory). This will tell you the exact location of the PHP error so you can correct it.

27 Feb 2011, 3:03 PM
#1457
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

countrycharm:

Eric which code show the most data and does the best job. The legacy 'urchin.js' tracking code, the ga.js tracking code or the newest Asynchronous tracking code released in Dec 2009 by Google. I always wondered about that. Thanks for you response.

Google says the newest code will give you the 'most' information. However, many people don't even know 'how or where' to find that info (or even set it up) by using new tracking codes so it doesn't matter.

All forms of tracking will provide you with the basic info you need to run a successful business. I've found that the ga.js tracking code produces a larger margin of error specifically with regard to ecommerce tracking (inconsistent reporting) so I never personally use that.

I tend to stay with either the older urchin methods (for most accurate results) and have been migrating to the asych tracking on a few sites. ONce I determine the asych tracking is as accurate in core data (the info I use to run a business) as the legacy urchin code I'll migrate to that fully.

28 Feb 2011, 4:04 AM
#1458
countrycharm avatar

countrycharm

Totally Zenned

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

Re: Simple Google Analytics - Support

econcepts:

Google says the newest code will give you the 'most' information. However, many people don't even know 'how or where' to find that info (or even set it up) by using new tracking codes so it doesn't matter.

All forms of tracking will provide you with the basic info you need to run a successful business. I've found that the ga.js tracking code produces a larger margin of error specifically with regard to ecommerce tracking (inconsistent reporting) so I never personally use that.

I tend to stay with either the older urchin methods (for most accurate results) and have been migrating to the asych tracking on a few sites. ONce I determine the asych tracking is as accurate in core data (the info I use to run a business) as the legacy urchin code I'll migrate to that fully.
Thanks for the information

4 Mar 2011, 5:53 PM
#1459
minu avatar

minu

New Zenner

Join Date:
Dec 2010
Posts:
35
Plugin Contributions:
0

Re: Simple Google Analytics - Support

I have installed the Google Analytics by Andrew, but I can't find the support thread for it. Would anybody direct me to the right thread.

Thanks to All

4 Mar 2011, 6:58 PM
#1460
ashleyng2 avatar

ashleyng2

New Zenner

Join Date:
Dec 2010
Posts:
27
Plugin Contributions:
0

Re: Simple Google Analytics - Support

econcepts:

Just submitted a new 1.2.4 version of this mod that includes a fix for the popup window issue some have experienced.

If you have 1.2.3 version you do not need to upload any files. All you have to do is take the following action to remedy the situation.

Open the file "html_header.php" file from your template directory 'common' folder (making sure you have the proper location for the template you are using if custom.)

  1. Once opened, find the section of code that looks like this (usually just before the closing </HEAD> tag):

Find this:

<?php if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") { require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php'); } ?>

And change to this:

<?php /* Begin Simple Google Analytics */ if (in_array($current_page_base,explode(",",'popup_image,popup_image_additional,pop up_cvv_help,popup_coupon_help,popup_attributes_qty_prices,popup_search_help,popu p_shipping_estimator')) ) { //Skip outputting the tracking code as this is a pop-up window } else { // Print tracking code to page if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") { require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php'); } } // end if for page determination /* End Simple Google Analytics */ ?>

That should correct the issue. If you find that any other pages are causing the same issue (I think I got them all) just add that to the array shown here and it will eliminate the problem on those pages.)

If you can' wait for the new version to be activated in the Zen Cart downloads section you can get the newest version from the following link right now:

http://www.zencartoptimization.com/downloads/

Post any issues in this forum.

Thanks for this fix, was a bit boggled by this. I know this post was a while ago but I have made one addition to a popup which was not included and fixed the space in the wordings. I shall highlight the addition in bold.

<?php
/* Begin Simple Google Analytics */
if (in_array($current_page_base,explode(",",'popup_image,popup_image_additional,popup_cvv_help,popup_coupon_help,popup_attributes_qty_prices,popup_search_help,popup_shipping_estimator,[B]info_shopping_cart[/B]')) ) {
//Skip outputting the tracking code as this is a pop-up window
} else { // Print tracking code to page
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
}
} // end if for page determination
/* End Simple Google Analytics */
?>