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

Simple Google Analytics - Support

Views: 451,177

Results 881 to 900 of 2,165
9 Apr 2009, 1:10 PM
#881
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Simple Google Analytics - Support

dinki:

Me again. On top of the 'Site Search' question, has anyone noticed GA missing sales? I've tried switching from 'ga.js' to 'urchin.js' and I still can't get it to track every sale. I do have GA set for ecommerce.

YES! It's always off. When I look at the ecommerce overview this morning it says that we have had 35 sales from 3-9 to 4-8, when in fact we have had 115! And the sales totals are off, the visitors are off, and who knows what else is off!! I don't know if Paypal payments get registered or not since the user is taken off of the site briefly??

It doesn't match with the Advanced Stats mod, supertracker, or sales report mod. So, I stopped even looking at the GA metrics anymore and I think I will remove this mod from my site since the javascript adds 20+KB to my pages and it's inaccurate.

Can anyone counter my experience? Check your sales against what Google reports. Does it match up?

10 Apr 2009, 6:47 AM
#882
josaltva avatar

josaltva

New Zenner

Join Date:
Aug 2008
Posts:
4
Plugin Contributions:
0

Re: Simple Google Analytics - Support

leave the /includes/templates/[your_template]/common/tpl_main_page.php whit no changes and insert the next code in the /includes/templates/[your_template]/common/tpl_footer.php, note just the bold type is the code you have to insert, the rest of lines are a part of tpl_footer.php

<!--eof- site copyright display -->

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

<?php } // flag_disable_footer ?>
10 Apr 2009, 6:50 AM
#883
josaltva avatar

josaltva

New Zenner

Join Date:
Aug 2008
Posts:
4
Plugin Contributions:
0

Re: Simple Google Analytics - Support

ArthurC:

This is a long long thread. My problem may have been resolved before but I can't find the fix.

Step 3 in the installation of the Simple Google Analytics requires a line of code to be inserted just before the </body> tag at the end of tpl_main_page.php. I did that. The code now looks like this:

<!--eof- banner #6 display --> <?php require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php'); ?> </body> ``` > > And when I run the code, the page source ends like this: > > ``` <!--eof- banner #6 display --> ``` > > That's it. No analytics code. Even lost the </body> tag. > > What am I missing, please.

leave the /includes/templates/[your_template]/common/tpl_main_page.php whit no changes and insert the next code in the /includes/templates/[your_template]/common/tpl_footer.php, note just the bold type is the code you have to insert, the rest of lines are a part of tpl_footer.php

<!--eof- site copyright display -->

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

<?php } // flag_disable_footer ?>
14 Apr 2009, 11:49 AM
#884
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

dinki:

Me again. On top of the 'Site Search' question, has anyone noticed GA missing sales? I've tried switching from 'ga.js' to 'urchin.js' and I still can't get it to track every sale. I do have GA set for ecommerce.

Make sure you have the tracking code inserted properly and more importantly the tracking id should be accurate.

Because Google Analytics runs via JavaScript (as to most tracking programs) you'll always see slight discrepancies in reporting. Those that have disabled JS on their browser or are blocking it will not show in results. This is mentioned in the Google Analytics help section in a few areas but many miss it.

14 Apr 2009, 11:53 AM
#885
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

josaltva:

leave the /includes/templates/[your_template]/common/tpl_main_page.php whit no changes and insert the next code in the /includes/templates/[your_template]/common/tpl_footer.php, note just the bold type is the code you have to insert, the rest of lines are a part of tpl_footer.php

<!--eof- site copyright display -->

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

<?php } // flag_disable_footer ?>

With my contribution you definitely do not want to insert the code into the footer file. Leave that as is.

Actually the lines of code that show at the end of the page are part of the tpl_main_page.php file (not footer). Part of it above the code insert is footer but everything below is part of the main template page.

You want to leave the code inserted as per instruction #3. If it is not showing on the site then something happened during pasting of the code OR you inserted it into a page that is not being used within your current template.

14 Apr 2009, 11:59 AM
#886
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

ArthurC:

This is a long long thread. My problem may have been resolved before but I can't find the fix.

Step 3 in the installation of the Simple Google Analytics requires a line of code to be inserted just before the </body> tag at the end of tpl_main_page.php. I did that. The code now looks like this:

<!--eof- banner #6 display --> <?php require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php'); ?> </body> ``` > > And when I run the code, the page source ends like this: > > ``` <!--eof- banner #6 display --> ``` > > That's it. No analytics code. Even lost the </body> tag. > > What am I missing, please.

Aurthur,

Insert the code as stated in step 3 (into the tpl_main_page.php NOT the footer file).

If you got that installed and the rest of the contribution is in place (you did upload the proper files right?) then all should show on the bottom of the page just fine.

A few things to look for.

  1. Make sure you insert the code into the proper "tpl_main_page.php" file. If you are using a custom template then insert and make sure you upload to your custom directories "common" folder (don't upload to the default template folder or it won't work for you).

  2. After you have the code in place make sure you insert your tracking number into the admin config of the module (found in the admin under configuration).

  3. Choose the type of code you which to show (new GA.js version or legacy urchin.js version) and save (again from admin).

If all is done correctly then you should have the code in place. If the code cuts off the rest of the page (missing </body> tag etc...) then you likely have a typo in the code you pasted so check that.

That should do it.

14 Apr 2009, 12:03 PM
#887
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

lankeeyankee:

YES! It's always off. When I look at the ecommerce overview this morning it says that we have had 35 sales from 3-9 to 4-8, when in fact we have had 115! And the sales totals are off, the visitors are off, and who knows what else is off!! I don't know if Paypal payments get registered or not since the user is taken off of the site briefly??

It doesn't match with the Advanced Stats mod, supertracker, or sales report mod. So, I stopped even looking at the GA metrics anymore and I think I will remove this mod from my site since the javascript adds 20+KB to my pages and it's inaccurate.

Can anyone counter my experience? Check your sales against what Google reports. Does it match up?

There are always MINOR differences in GA reporting due to JavaScript issues. However, providing you have the code setup correctly and completely (typically requires both google admin setup and zen cart setup for the module) you should be within a few sales (give or take).

What you are describing means either the code is not installed correctly or you have them leaving the site and not returning. This is NOT the case all the time with PayPal, and the tracking should pick that all up ok as well (the user is typically sent back automatically to the zen cart site after a purchase to trigger the zen cart processes).

I use PayPal etc... on a number of sites with GA tracking and have had no problems. 95% of the time I see issues as those of what you are experiencing it ends up being incomplete or incorrect tracking setup.

Hope that helps.

14 Apr 2009, 12:05 PM
#888
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

beowulf8:

Hello,

I have installed the Google Analytics Mod and it works fine. Nevertheless, I have a small issue: My site runs in multiple domains (server-related issue).

Google says I must add two lines to the tracking code:

I already did this. Now the second thing they ask for is this:

How can I do this? Please help me!

Thanks a lot!

Beowulf,

PM me and I'll work with you to get this in place.

14 Apr 2009, 4:08 PM
#889
firefish avatar

firefish

New Zenner

Join Date:
Apr 2007
Posts:
5
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Just for the record...
there's no need for any mod...

i have no problems whatsoever in just copying and pasting the adwords code (as generated by google) into
the bottom of tpl_main_page.php

just need to wait for a while to take effect

then the next day, i checked...
the tracking of the website is fine...

btw, zencart is installed in root...

tks!
wee

14 Apr 2009, 6:26 PM
#890
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

firefish:

Just for the record...
there's no need for any mod...

i have no problems whatsoever in just copying and pasting the adwords code (as generated by google) into
the bottom of tpl_main_page.php

just need to wait for a while to take effect

then the next day, i checked...
the tracking of the website is fine...

btw, zencart is installed in root...

tks!
wee

True you can do this but that method will not allow you to fully and properly track ecommerce transactions or adwords conversion tracking. What it will give you is just statistics but they won't be very useful if you don't completely add the rest of the components so you can make more informed decisions.

If you pasted the "adwords tracking code" at the bottom of that page (you can ONLY get this code if you are running paid search and have conversion tracking turned on) you'll really have a mess on your hands when it comes to checking the effectiveness of your site. Adwords conversion tracking should only appear on the thank you page after a sale has been completed to accurately record data.

If you added the "Google analytics tracking code" (very different from the adwords conversion tracking code) to the bottom of that page then as stated above you will only receive general stats on all pages of the site. Ecom tracking code (part of google analytics) needs to also only appear on the thank you page or it will not work.

So it is possible to take the route you did, but your analytics data will be incomplete and provide incorrect data if you do so.

15 Apr 2009, 4:22 AM
#891
firefish avatar

firefish

New Zenner

Join Date:
Apr 2007
Posts:
5
Plugin Contributions:
0

Re: Simple Google Analytics - Support

ah...
thanks for pointing out the subtle but very crucial difference bet. the two...

i guess i will try to implement your code
when i am trying out paid search to track actual conversions.

have you implemented jrox affiliate succesfully to fully encompass the whole spectrum of internet marketing?
i.e. does jrox affiliate tracks affiliates' conversions as well?

15 Apr 2009, 10:41 AM
#892
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

firefish:

ah...
thanks for pointing out the subtle but very crucial difference bet. the two...

i guess i will try to implement your code
when i am trying out paid search to track actual conversions.

have you implemented jrox affiliate succesfully to fully encompass the whole spectrum of internet marketing?
i.e. does jrox affiliate tracks affiliates' conversions as well?

Keep in mind that the difference involves more than just paid search. If you are just posting Google Analytics tracking code into your zen cart site in the tpl_main_page.php file then you will loose the ability to track ecommerce transactions and accurately track goals. Both very important parts of the Google Analytic -- that is, if you are looking to have enough data to tell you how to make more money. If you just want statistics and are not as interested in finding out where you can generate more sales then your method will work.

If you are using JROX then you will need to make a slight modification to the code I have. Let me know when you get to that point. JROX has you alter the footer of the checkout success page during it's install. This overrides the Google Analytics thank you page code. They both work together just fine, but you have to move the JROX code to a different page to get it to work with Google Analytics.

15 Apr 2009, 7:29 PM
#893
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

dinki:

Thanks for the great contrib!

Can someone tell me how to set up 'Site Search'? It's asking for a 'Query Parameter' and I'm not sure what to put. I searched the thread but didn't get any hits. Thanks!

Try this link. http://www.zencartoptimization.com/2007/11/25/how-to-read-your-visitors-minds-with-100-accuracy/ Further down the page I detail how to setup site search.

19 Apr 2009, 3:05 PM
#894
fakedecoy avatar

fakedecoy

Zen Follower

Join Date:
Jul 2006
Posts:
309
Plugin Contributions:
0

Re: Simple Google Analytics - Support

I just read econcept's article that mentions analytics tracking, ecommerce tracking, and adwords conversion tracking being needed. Does this mod install all three? It appears as though it does, as I'm getting all the described info in analytics, but I can't find where the checkout success page is to check for the code for the ecommerce and conversion tracking.

Also, does the conversion tracking track any other PPC keywords like Ask or Yahoo, or is it just adwords?

20 Apr 2009, 12:43 AM
#895
parasols avatar

parasols

New Zenner

Join Date:
Apr 2009
Posts:
2
Plugin Contributions:
0

Re: Simple Google Analytics - Support

Hi,

I installed the google analytics module on v1.3.8, and have followed all the instructions but am getting the below message (I installed the module yesterday morning and have been getting the message since in my google analytics account):
Tracking Not Installed (Last checked: Apr 19, 2009 5:28:41 PM )
The Google Analytics tracking code has not been detected on your website's home page. For Analytics to function, you or your web administrator must add the code to each page of your website.

Did I miss something or does it take a while for it to find the code?
I can't seem to figure out what i've done wrong

I have checked the source info on my home page and don't see the code that I installed on the bottom of tpl_main_page.php

This is the code (only the bold part) I pasted into the file:

<!--eof- banner #6 display -->

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

</body>

Are there spaces between the code and </body> that are missing? Would that make a difference

however when I check the main page source I don't see this, all I see is at the end:

</div> <!--bof- parse time display --> <!--eof- parse time display --> <!--bof- banner #6 display --> <!--eof- banner #6 display -->

The other thing, when I am in the Admin Page for Zen Cart and check the source code I see the below, however the Google Analytics Web Property ID (shown below) is not the one I have for my page.... ?

</div> <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"> var pageTracker = _gat._getTracker("UA-5907240-1"); pageTracker._trackPageview(); </script>

thanks in advance for your help

20 Apr 2009, 2:57 PM
#896
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

fakeDecoy:

I just read econcept's article that mentions analytics tracking, ecommerce tracking, and adwords conversion tracking being needed. Does this mod install all three? It appears as though it does, as I'm getting all the described info in analytics, but I can't find where the checkout success page is to check for the code for the ecommerce and conversion tracking.

Also, does the conversion tracking track any other PPC keywords like Ask or Yahoo, or is it just adwords?

Yes, this module supports all three tracking options. Each is configurable from within the admin (except ecommerce tracking which is automatically put into place upon install.)

You will need to turn on the options from within your Google Analytics account as well (make sure your site is set to an "ecommerce site" in your profile edit area.)

It also automatically adds the required code to the checkout success page as well. This can only be viewed if you complete a successful checkout of course and then "viewing source" on the thank you page.

There should be no need to confirm that though providing you selected that option (adwords tracking) from within the admin, entered your adwords tracking id (different from teh analytics one) and are running a Google Adwords campaign.

Hope that helps.

20 Apr 2009, 3:02 PM
#897
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

parasols:

Hi,

I installed the google analytics module on v1.3.8, and have followed all the instructions but am getting the below message (I installed the module yesterday morning and have been getting the message since in my google analytics account):
Tracking Not Installed (Last checked: Apr 19, 2009 5:28:41 PM )
The Google Analytics tracking code has not been detected on your website's home page. For Analytics to function, you or your web administrator must add the code to each page of your website.

Did I miss something or does it take a while for it to find the code?
I can't seem to figure out what i've done wrong

I have checked the source info on my home page and don't see the code that I installed on the bottom of tpl_main_page.php

This is the code (only the bold part) I pasted into the file:

<!--eof- banner #6 display -->

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

</body>

Are there spaces between the code and </body> that are missing? Would that make a difference

however when I check the main page source I don't see this, all I see is at the end:

</div> <!--bof- parse time display --> <!--eof- parse time display --> <!--bof- banner #6 display --> <!--eof- banner #6 display -->

The other thing, when I am in the Admin Page for Zen Cart and check the source code I see the below, however the Google Analytics Web Property ID (shown below) is not the one I have for my page.... ?

</div> <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"> var pageTracker = _gat._getTracker("UA-5907240-1"); pageTracker._trackPageview(); </script>

thanks in advance for your help

I replied with some details via PM as well (in response to your PM to me) but wanted to list a brief summary here for others.

  1. for the tracking id being different I would recommend checking to make sure the id in the admin is the correct one. Type the proper one in there for the site you are tracking. If that still does not change the id then someone has manually entered the tracking code on the site in a file and that would need to be removed.

  2. in 99% of the cases where tracking code does not show on the bottom of the pages even though one added the line of code in step 3 of the install instructions, the code was entered on the wrong page.

If you are using a custom template make sure you follow the overrides and add the code to that file. If you add it to the default template then upload but you are using a custom template, the code will not show and likely be overridden by the custom page.

20 Apr 2009, 6:25 PM
#898
truble0003 avatar

truble0003

New Zenner

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

Re: Simple Google Analytics - Support

I have a question about the Simple Google Analytics mod. First allow me to explain my setup. I am currently running 1.3.8 on a multi-site mod for 15 seperate domains with 1 single admin on the backend. And here recently I have been plagued by Google Analytic issues.. When I first installed the Simple Google Analytic Mod I customized it so that each domain is configured to have it's own UA-xxxxxxx ID as google provides. However recently the marketing team with my company has asked for a revision to be done because if I go to Google analytics and check out Traffic Sources > All Traffic Sources > Ecommerce > and then select the dimension to = Landing Page, I receive data from the /gateway/transact.dll. First off I thought that this was an issue with my integration, however- the integration of Simple Google Analytics (a.k.a "SGA") seems to work fine, then I thought maybe passing google analytic data through the authorize.php and recapturing when the browser pulls back to success page. Then I realized that through authorizenet, if I use the SIM mod, then authorizenet automatically generates the success page to https://secure.authorize.net/gateway/transact.dll in the address bar. So naturally I thought that was the problem, it made sense though. So I made the changes over to AIM and now the data is still coming in the same way. I was just wondering if anyone else has had this issue, and if there is anything else that I can do to rectify this problem. Maybe moving away from Google Analytics is the best scenario, but there isn't much else choice since the marketers here live in Google. Ok, well thanks in advance for any replies or fixes for this issue.

21 Apr 2009, 4:59 PM
#899
wowflak avatar

wowflak

New Zenner

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

Re: Simple Google Analytics - Support

econcepts:

Keep in mind that the difference involves more than just paid search. If you are just posting Google Analytics tracking code into your zen cart site in the tpl_main_page.php file then you will loose the ability to track ecommerce transactions and accurately track goals. Both very important parts of the Google Analytic -- that is, if you are looking to have enough data to tell you how to make more money. If you just want statistics and are not as interested in finding out where you can generate more sales then your method will work.

If you are using JROX then you will need to make a slight modification to the code I have. Let me know when you get to that point. JROX has you alter the footer of the checkout success page during it's install. This overrides the Google Analytics thank you page code. They both work together just fine, but you have to move the JROX code to a different page to get it to work with Google Analytics.

Hi I would like to know what the mod is for the JROX intergration so that the Analytics keep working as it should.
Thanks

22 Apr 2009, 2:22 PM
#900
econcepts avatar

econcepts

Totally Zenned

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

Re: Simple Google Analytics - Support

wowflak:

Hi I would like to know what the mod is for the JROX intergration so that the Analytics keep working as it should.
Thanks

Here is the route I have taken in the past. This would bee the way I structure the code on the tpl_main_page.php to work with JROX. I added a portion of code between new comments that I call "Additional Tracking".

Make sure you remove the tpl_footer.php file from the area that the JROX install says to place it in order for the override to not take effect.

Make sure you BACKUP the files you are going to change before you do this so you can easily revert to the older version if needed.

I will be making some updates to the GA code here a some point and will include a note on the JROX integration piece for others that may need it.

<!--bof Simple Google Analytics--> <?php require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php'); ?> <!--eof Simple Google Analytics-->

<!-- bof Additional Tracking -->

<?php if($_SERVER['HTTPS']=='on'){ // If page is SSL then use Secure Code ?> <?php if ($_GET['main_page']=="checkout_success") { ?>

Add your JROX Code here

<?php } //End if main page is "checkout_success"?> <?php // Else if not a secure connection then use Non-Secure Code } else { // Nothing Here at the moment but if you wanted to add code that would be non-secure you would add it here. } ?>

<!-- / eof Additional Tracking -->

</body> </html>