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

Simple Google Analytics - Support

Views: 451,170

Results 1,421 to 1,440 of 2,165
8 Feb 2011, 2:30 PM
#1421
econcepts avatar

econcepts

Totally Zenned

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

Simple Google Analytics - Support

stylishbb123:

Hi,

My version of Zen Cart (quite old due for upgrade) is V 1.3.8a.

I installed Simple Google Analytics in an attempt to get google Ecommerce working.

The install seemed to go OK, however when I did a test order, using "test bean bag" found in "pet bean bag" directory.

The checkout_succes page didn't load completely, it loaded the background and nothing else.

After reading online I downloaded and installed the ZenCart debug utility and it began outputting messages like the one below....

Basically whats happening is that the html_header file cannot find the google_analytics.php file. After changing things around a bit and copying the google_analytics file into 3 different places namely

my_template/checkout_success/google_analytics/
my_template/checkout_success/
my_template/google_analytics/

There is no more output from the debug utility.

However being the sceptic that I am, I'd like to ask... Even though all seems well, will the actual google analytics have survived the copying and pasting of files into different places in order to overcome the error, I'm thinking not?

Copying it into those three areas probably isn't a good idea. That could throw off tracking.

The reason you got a blank page is because there is a PHP error in your code (that you inserted to to 'require' the file on the page.)

Looking at your error messages, it appears you are missing a 'slash' in the following location.

google_analytics**/**google_analytics.php

I would remove all areas you added the file to, only add it as directed in the install, and then make sure you have the slash in place so it can find the file in the proper location.

Let me know if that works.

8 Feb 2011, 2:32 PM
#1422
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

bubbas454:

Hi,

I appear to be having the same issues as Jim

I have configuered everything in admin but still getting this error at analytics:

Profile Name: https://www.themakeupartistboutique.com
Website URL: http://www.themakeupartistboutique.com
Web Property ID [?] : UA-21172541-1
Tracking Status: Warning Tracking Not Installed (Last checked: 08-Feb-2011 06:19:49 )
The Google Analytics tracking code has not been detected on your website's homepage. For Analytics to function, you or your web administrator must add the code to each page of your website.

Any idea?

Many thanks

Emma

Check my reply to him. It sounds like it might be the same thing. Try adding the slash and recheck. Let me know if that works. (This is done within your Google Analytics account in the "Edit Profile" section for the site in question.

8 Feb 2011, 7:58 PM
#1423
stylishbb avatar

stylishbb

New Zenner

Join Date:
Jan 2011
Posts:
5
Plugin Contributions:
0

Re: Simple Google Analytics - Support

I've got the script setup exactly as in the install instructions, however the checkout_success page now refuses to show.

The error message from the debugger is

[08-Feb-2011 19:54:50] PHP Warning: require(includes/templates/orange/checkout_success//google_analytics.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home2/stylish/public_html/includes/templates/orange/common/html_header.php on line 132
[08-Feb-2011 19:54:50] PHP Warning: require(includes/templates/orange/checkout_success//google_analytics.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home2/stylish/public_html/includes/templates/orange/common/html_header.php on line 132
[08-Feb-2011 19:54:50] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'includes/templates/orange/checkout_success//google_analytics.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home2/stylish/public_html/includes/templates/orange/common/html_header.php on line 132

essentially it is looking for the google analytics file here...

includes/templates/orange/checkout_success//google_analytics.php

instead of here

includes/templates/orange/checkout_success/google_analytics/google_analytics.php

however I'm unsure how to sort this problem. If i try to edit the directory in the html_header page the problem is still there except it will try to look eg. includes/templates/orange/checkout_success/google_analytics//google_analytics.php

It is a really daft problem involving / and .. in php paths but I've tried adding and removing / and .. and all sorts of things and it keeps looking everywhere but the right place :cry:

8 Feb 2011, 8:37 PM
#1424
stylishbb avatar

stylishbb

New Zenner

Join Date:
Jan 2011
Posts:
5
Plugin Contributions:
0

Re: Simple Google Analytics - Support

I've managed to sort the problem however not in a way I'd have liked.

Inside the checkout_success was a tpl_footer.php file as soon as I deleted this everything worked fine. It seems that as soon as any page is places into the checkout_success folder it causes this line...

require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');

to fail as the $base_page changes to be looking /checkout_success and I've tried concatenating ../ and allsorts to this and can't get it up to parent directory.

The issue now though is that the footer.php file was there for a reason, it contained custom Jrox code in it. So now how can I ensure that the Jrox code appears only on the checkout_success page BUT I'm not allowed to create any overrides?

Alternatively, is there any way to include ../ or similar to force this line

require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');

to look here /includes/templates/orange/google_analytics/google_analytics.php ?

The sites URL is Stylish Bean Bags . co . uk if you want to take a look, at the minute though its working as I've still got the footer deleted. Its probably easier to put the Jrox code onto the checkout_success some other way, hopefully?

8 Feb 2011, 11:04 PM
#1425
rorrock avatar

rorrock

New Zenner

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

Re: Simple Google Analytics - Support

econcepts:

Check my reply to him. It sounds like it might be the same thing. Try adding the slash and recheck. Let me know if that works. (This is done within your Google Analytics account in the "Edit Profile" section for the site in question.

I have the same problem..
I have tried the trailing slash as well..

Any ideas..

When I look at the source there is gaps in the lines..

<script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-21272482-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script>
8 Feb 2011, 11:22 PM
#1426
bubbas454 avatar

bubbas454

New Zenner

Join Date:
Feb 2010
Posts:
18
Plugin Contributions:
0

Re: Simple Google Analytics - Support

econcepts:

Check my reply to him. It sounds like it might be the same thing. Try adding the slash and recheck. Let me know if that works. (This is done within your Google Analytics account in the "Edit Profile" section for the site in question.

Yep tried it no idea what to try next or what I am actually doing wrong

9 Feb 2011, 4:02 AM
#1427
jar3300 avatar

jar3300

New Zenner

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

Re: Simple Google Analytics - Support

econcepts:

No, you don't need to uninstall and re-run the SQL. That is all fine (ignore the error messages as it just means the mod is already installed.)

The reason you are not getting any tracking and Google says not installed is because you have not entered your Google Analytics tracking id into the site yet. :)

I went to your site and did a view source. Your tracking id is "UA-xxxxx-xx". This is just filler I included in the mod (placeholder). You need to get the Google Analytics id from within your analytics account and then place it into the section found in the "Google Analytics Configuration" within the Zen Cart Admin (found under the 'Configuration' menu option.)

Once you add that tracking id and save, you'll need to go back to your GA account and 'verify install' for the profile you are tracking.

Google will then be able to verify the code exists and the tracking ID is correct. Shortly after (give it about 24 hours or so) you should start seeing tracking in your Google account.

It is working. I kept hitting the back button and clicking on check status. I went out and signed back in and it shows "receiving data".
thanks
jim

9 Feb 2011, 2:46 PM
#1428
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

stylishbb:

I've managed to sort the problem however not in a way I'd have liked.

Inside the checkout_success was a tpl_footer.php file as soon as I deleted this everything worked fine. It seems that as soon as any page is places into the checkout_success folder it causes this line...

to fail as the $base_page changes to be looking /checkout_success and I've tried concatenating ../ and allsorts to this and can't get it up to parent directory.

The issue now though is that the footer.php file was there for a reason, it contained custom Jrox code in it. So now how can I ensure that the Jrox code appears only on the checkout_success page BUT I'm not allowed to create any overrides?

Alternatively, is there any way to include ../ or similar to force this line

to look here /includes/templates/orange/google_analytics/google_analytics.php ?

The sites URL is Stylish Bean Bags . co . uk if you want to take a look, at the minute though its working as I've still got the footer deleted. Its probably easier to put the Jrox code onto the checkout_success some other way, hopefully?

Yes, that will cause issues (the added footer file in the 'checkout_success' directory.)

I've written a number of posts that answer the JROX issue so that can be corrected as well.

Here is your answer:

http://www.zencartoptimization.com/2007/08/15/now-available-google-analytics-uncovered-for-zen-cart-the-workbook/

Scroll down to the comment I wrote on July 22, 2009. The details on how to make the two work together are there.

Let me know if that helps.

9 Feb 2011, 2:50 PM
#1429
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

bubbas454:

Yep tried it no idea what to try next or what I am actually doing wrong

@rorock and @bubbas454,

Keep trying. The code looks right. Check Jim's reply in post #1429

http://www.zen-cart.com/forum/showpost.php?p=993069&postcount=1429

He had the same issue and simply 'kept re-verifying'. Google eventually 'found it'.

Let me know if you have similar experiences.

11 Feb 2011, 6:50 PM
#1430
hermes369 avatar

hermes369

New Zenner

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

Re: Simple Google Analytics - Support

OK. I have two sites using Simple Google Analytics:

scubadorag.com and supernutrient.com

They are both using Zen 1.3.9h. They are almost identical on the back end. I have separate Google Analytics accounts tracking both. One is giving me results in the eCommerce area (scubadorag.com) and one isn't (supernutrient.com). I can't see anything that is different between the two and I'm about to lose my mind.

I'm hoping that another set of eyes notices anything obvious that I've done to screw up.

Thank you!

12 Feb 2011, 2:33 PM
#1431
carol2848 avatar

carol2848

New Zenner

Join Date:
Nov 2007
Posts:
78
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Ever since I installed the Jrox footer file in its own "CheckoutSuccess" folder (per Jrox instructions), Google analytics doesn't report any of my sales. I have Simple Google Analytics v. 1.2.2 installed. Any ideas what I can do to fix this? (I posted this several days ago, but in the wrong forum--so this is a re-post)

12 Feb 2011, 6:10 PM
#1432
redbaron2 avatar

redbaron2

New Zenner

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

Re: Simple Google Analytics - Support

hermes369:

OK. I have two sites using Simple Google Analytics:

scubadorag.com and supernutrient.com

They are both using Zen 1.3.9h. They are almost identical on the back end. I have separate Google Analytics accounts tracking both. One is giving me results in the eCommerce area (scubadorag.com) and one isn't (supernutrient.com). I can't see anything that is different between the two and I'm about to lose my mind.

I'm hoping that another set of eyes notices anything obvious that I've done to screw up.

Thank you!
The main problem I see in the source code of the two sites is (scubadorag.com) has the GA code in the right spot before the </head> tag. The (supernutrient.com) site has the GA code after the beginning of the <body> tag. The GA code needs to be before the </head> tag. I hope this helps.

14 Feb 2011, 6:51 AM
#1433
alisontin avatar

alisontin

New Zenner

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

Re: Simple Google Analytics - Support

Thank you for sharing great information here. It is really helpful.

14 Feb 2011, 9:52 AM
#1434
carol2848 avatar

carol2848

New Zenner

Join Date:
Nov 2007
Posts:
78
Plugin Contributions:
0

Re: Simple Google Analytics - Support

carol2848:

Ever since I installed the Jrox footer file in its own "CheckoutSuccess" folder (per Jrox instructions), Google analytics doesn't report any of my sales. I have Simple Google Analytics v. 1.2.2 installed. Any ideas what I can do to fix this? (I posted this several days ago, but in the wrong forum--so this is a re-post)

Still trying! Would I hurt anything if I copied the tpl_main_page.php file from the "common" folder, and put it in the new (jrox) "checkout success" folder?

14 Feb 2011, 4:57 PM
#1435
carol2848 avatar

carol2848

New Zenner

Join Date:
Nov 2007
Posts:
78
Plugin Contributions:
0

Re: Simple Google Analytics - Support

These files -- the jrox "Checkout_success" and the "common" are both at includes -> templates -> MYTEMPLATE ->

14 Feb 2011, 7:08 PM
#1436
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

Redbaron2:

The main problem I see in the source code of the two sites is (scubadorag.com) has the GA code in the right spot before the </head> tag. The (supernutrient.com) site has the GA code after the beginning of the <body> tag. The GA code needs to be before the </head> tag. I hope this helps.

This actually depends on the type of tracking used. Not all GA code goes in the same place. One of your sites is using Asych. Tracking (which should be before the closing </head> tag and the other is using either ga.js or Legacy (urchin) code (which should be at the bottom of the page before the closing </body> tag.

Neither of the positions will affect ecom tracking. If one site is tracking and the other isn't there is something else wrong.

Have you made sure that you selected 'this is an ecommerce site' from within both of the profiles? (This is done from within your Google Analytics account. If that is not turned on in one account, Google will not pick up the Ecom. tracking.

Let me know if that works.

14 Feb 2011, 7:09 PM
#1437
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

carol2848:

These files -- the jrox "Checkout_success" and the "common" are both at includes -> templates -> MYTEMPLATE ->

Did you get to read my post about how to integrate these two? Scroll down a few posts back and you'll find a link to an article I wrote with comments explaining how to do this.

Let me know if that helps.

14 Feb 2011, 7:49 PM
#1438
pepsishot avatar

pepsishot

New Zenner

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

Re: Simple Google Analytics - Support

Please, I am looking for some help with my GA on my site: https://www.ambersscrapattic.com/shop

I thought I had everything where it should go. However, it's been over a week now. GA is still saying that I haven't installed any code. My admin area has the proper code GA gave me for tracking in it's configuration. I have also made sure that I checked the box saying my site is ecomm.

I am sinking in over my head trying to find where I've gone wrong. I am a beginner I admit. I know I have done something either wrong or just incomplete. I just don't know what or where to fix.

If someone could please send me in the right direction I would really appreciate it.

Thank you!

Amber

14 Feb 2011, 8:07 PM
#1439
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

carol2848:

Still trying! Would I hurt anything if I copied the tpl_main_page.php file from the "common" folder, and put it in the new (jrox) "checkout success" folder?

You don't want to do that. You need to get rid of the checkout_success folder and merge the JROX alterations into the tpl_main_page.php file found in your 'common' folder.

14 Feb 2011, 8:10 PM
#1440
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

pepsishot:

Please, I am looking for some help with my GA on my site: https://www.ambersscrapattic.com/shop

I thought I had everything where it should go. However, it's been over a week now. GA is still saying that I haven't installed any code. My admin area has the proper code GA gave me for tracking in it's configuration. I have also made sure that I checked the box saying my site is ecomm.

I am sinking in over my head trying to find where I've gone wrong. I am a beginner I admit. I know I have done something either wrong or just incomplete. I just don't know what or where to fix.

If someone could please send me in the right direction I would really appreciate it.

Thank you!

Amber

You don't have any tracking code on the pages of your site, that is why Google is not seeing it.

Make sure you complete step 3 of the README file. That is a line of code which inserts the tracking on the page. Then you'll need to copy and paste your tracking ID provided by Google into your Zen Cart admin in the area found under Configuration > Google Analytics Configuration.