If this is your first visit, check our documentation. To post, register or login.
Forums / All Other Contributions/Addons / Google Analytics Integration

Google Analytics Integration

Started by a_berezin on 20 Aug 2006, 8:28 AM · Views: 226,077

Results 41 to 60 of 660
26 Sep 2006, 5:04 PM
#41
mafiasam avatar

mafiasam

Zen Follower

Join Date:
Jan 2006
Location:
Portland, Oregon
Posts:
256
Plugin Contributions:
0

Google Analytics Integration

after adding this mod to my cart I am getting some problems when viewing in Firefox.

First of all my large image popups are not showing in many cases.
You can view this problem here...
http://www.oldwestgames.com/copag%C3%82%E2%84%A2-poker-size-regular-index-greenburgundy-setup-p-310.html
viewing the same page in IE there is no problem with the large image popup

Upon viewing the errors I do notice that "urchinTracker is not defined" is on all pages - please explain how to get rid of these errors...

i went here
http://www.google.com/support/analytics/bin/static.py?page=troubleshooter.cs&problem=tracking&selected=tracking_php&ctx=tracking_tracking_javascript_27244
used static php solution but that did not work it just added a second tracker error

please help

OldWestPokerSupplies.com – Custom Poker Chips and Other Professional Poker Supplies
Zen Cart 1.3.9.h with Google Base Feeder, Share Bookmarking Widget, Ultimate SEO URL, A Black Pure Template, Quick Updates, Sitemap XML and reCAPTCHA.

26 Sep 2006, 5:38 PM
#42
mafiasam avatar

mafiasam

Zen Follower

Join Date:
Jan 2006
Location:
Portland, Oregon
Posts:
256
Plugin Contributions:
0

Re: Google Analytics Integration

kelvyn:

Ahhh! Same here too! Excellent work - I hadn't made that connection.
Gives me something to think about - I'll see if I can sort this.
Could it be two javascripts interfering? Can Zen even call two JS?

thanks for the quick reply...
I am anxiously waiting your reply...lol
no seriously, i hope you sort it out.
I really want to be able to use this mod...i've been looking everywhere for the answer...no luck.

OldWestPokerSupplies.com – Custom Poker Chips and Other Professional Poker Supplies
Zen Cart 1.3.9.h with Google Base Feeder, Share Bookmarking Widget, Ultimate SEO URL, A Black Pure Template, Quick Updates, Sitemap XML and reCAPTCHA.

27 Sep 2006, 5:42 AM
#43
mafiasam avatar

mafiasam

Zen Follower

Join Date:
Jan 2006
Location:
Portland, Oregon
Posts:
256
Plugin Contributions:
0

Re: Google Analytics Integration

mafiasam:

after adding this mod to my cart I am getting some problems when viewing in Firefox.

First of all my large image popups are not showing in many cases.
You can view this problem here...
http://www.oldwestgames.com/copag%C3%82%E2%84%A2-poker-size-regular-index-greenburgundy-setup-p-310.html
viewing the same page in IE there is no problem with the large image popup

Upon viewing the errors I do notice that "urchinTracker is not defined" is on all pages - please explain how to get rid of these errors...

i went here
http://www.google.com/support/analytics/bin/static.py?page=troubleshooter.cs&problem=tracking&selected=tracking_php&ctx=tracking_tracking_javascript_27244
used static php solution but that did not work it just added a second tracker error

please help

Okay this is a weird one but I figured it out. I'm not sure if it is the GoogleAnalytics or if its the Chemo's Ultimate SEO URLs causing it or what but I do know that it is a naming convention for the product name.

Here's the deal. I went through and hunted down all my products that were having image popup problems and strangely enough they all had the trademark symbol in common; ie, Bee™ Playing cards or Copag™ Playing cards. As soon as I renamed these products the problem was solved and this was only in Firefox not IE so this is really odd.

another odd thing. It doesn't happen with the registered trademark symbol; ie, ESPN® Poker Club Standard Playing Cards.

If anyone understands this or can figure out what's going on please do tell but until then I'm avoiding the ™ symbol.

good luck.
mafiasam

OldWestPokerSupplies.com – Custom Poker Chips and Other Professional Poker Supplies
Zen Cart 1.3.9.h with Google Base Feeder, Share Bookmarking Widget, Ultimate SEO URL, A Black Pure Template, Quick Updates, Sitemap XML and reCAPTCHA.

28 Sep 2006, 9:10 PM
#44
mafiasam avatar

mafiasam

Zen Follower

Join Date:
Jan 2006
Location:
Portland, Oregon
Posts:
256
Plugin Contributions:
0

Re: Google Analytics Integration

More strangeness (yeah it's a word), lol...

I noticed something really odd on my GoogleAnalytics results. Now I am not sure what is the problem here but I was hoping that someone with some experience might have an answer.

I am getting results from a site called http://waselly.com/
and it seems to be infiltrating my results...

you can view it here - http://www.oldwestgames.com/images/google_anomaly.jpg

or it's attached in an abbreviated version

This view is from content by titles under the webmaster view. I am not sure why waselly is being read as one of my page titles. Can anyone explain this?

OldWestPokerSupplies.com – Custom Poker Chips and Other Professional Poker Supplies
Zen Cart 1.3.9.h with Google Base Feeder, Share Bookmarking Widget, Ultimate SEO URL, A Black Pure Template, Quick Updates, Sitemap XML and reCAPTCHA.

29 Sep 2006, 8:21 PM
#45
cuda avatar

cuda

Zen Follower

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

Re: Google Analytics Integration

Well I have been looking to use this module but concerned that if google analytics goes down my site will not load because this mod includes everything at the top. Google actually tells you to include the code at the bottom of the page just before the </body> tag to avoid this issue. So I have come up with a hack to include the code at the bottom. Here it is:

First we need to move files around a bit so they will not load at the top but at the bottom.

  1. Create a new folder in includes/templates/yourtemplate named 'bottom_jscript'

  2. Now move 'jscript_google_analytics.php' to the new folder

  3. Create a new folder in includes/modules/pages/checkout_success named 'google_analytics'

  4. Move 'jscript_google_analytics.php' and 'on_load_google_analytics.js' to this new folder.

Ok now we have our files in the new folders lets move to the hack.

  1. We will add the code below to includes/templates/yourtemplate/common/tpl_main_page.php at the very bottom just before the body tag as instructed by google - and yes I would jump off a bridge if google said too.... :blink:
/** Google Analytics Main Code include
 * load all site-wide bottom jscript_*.php files from includes/templates/YOURTEMPLATE/bottom_jscript/, alphabetically
 */
  $directory_array = $template->get_template_part($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'bottom_jscript'), '/^jscript_/', '.php');
  while(list ($key, $value) = each($directory_array)) {

/**
 * include content from all site-wide bottom jscript_*.php files from includes/templates/YOURTEMPLATE/jscript, alphabetically.
 * These .PHP files can be manipulated by PHP when they're called, and are copied in-full to the browser page
 */
    require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'bottom_jscript') . '/' . $value); echo "\n";
  }

//check to see if current page is checkout_success and include google analytics for order if it is
if($page_directory == 'includes/modules/pages/checkout_success')
{

/**
 * load all google_analytics-specific jscript_*.js files from includes/modules/pages/PAGENAME/google_analytics, alphabetically
 */
  $directory_array = $template->get_template_part($page_directory . 'google_analytics', '/^jscript_/', '.js');
  while(list ($key, $value) = each($directory_array)) {
    echo '<script type="text/javascript" src="' . $page_directory . 'google_analytics' . '/' . $value . '"></script>' . "\n";
  }
/**
 * include content from all google_analytics-specific jscript_*.php files from includes/modules/pages/PAGENAME/google_analytics, alphabetically.
 */
  $directory_array = $template->get_template_part($page_directory . '/google_analytics', '/^jscript_/');
  while(list ($key, $value) = each($directory_array)) {
/**
 * include content from all google_analytics-specific jscript_*.php files from includes/modules/pages/PAGENAME, alphabetically.
 * These .PHP files can be manipulated by PHP when they're called, and are copied in-full to the browser page
 */
    require($page_directory . '/google_analytics' . '/' . $value); echo "\n";
  }
}

That is it now the code will be included on each page and the cart contents will be included at checkout success, had to use a simple check to avoid running code for every page as it is not needed.

I will be testing this but works so far let me know if you have any thoughts.


Barracuda Productions pure instincts

1 Oct 2006, 10:30 PM
#46
mafiasam avatar

mafiasam

Zen Follower

Join Date:
Jan 2006
Location:
Portland, Oregon
Posts:
256
Plugin Contributions:
0

Re: Google Analytics Integration

mafiasam:

More strangeness (yeah it's a word), lol...

I noticed something really odd on my GoogleAnalytics results. Now I am not sure what is the problem here but I was hoping that someone with some experience might have an answer.

I am getting results from a site called http://waselly.com/
and it seems to be infiltrating my results...

you can view it here - http://www.oldwestgames.com/images/google_anomaly.jpg

or it's attached in an abbreviated version

This view is from content by titles under the webmaster view. I am not sure why waselly is being read as one of my page titles. Can anyone explain this?

Figured this out. This Waselly.com site is using my Google Analytics code on a bunch of their pages. It seems to be a coding error because our codes are one number off from each other - a four and a seven. Ten key? lol. Their main page shows the right code but I think that's about it. The rest have my code. They are using a php shopping cart but apparently it's not zencart otherwise the code would be the same site-wide. Am I right?

Anyways I emailed them and requested that they fix it. Wonder how long that will take. I had emailed Google Analytics support for this too but no response and I couldn't find this anywhere in their support pages. Of course it would have to happen to me.

OldWestPokerSupplies.com – Custom Poker Chips and Other Professional Poker Supplies
Zen Cart 1.3.9.h with Google Base Feeder, Share Bookmarking Widget, Ultimate SEO URL, A Black Pure Template, Quick Updates, Sitemap XML and reCAPTCHA.

6 Oct 2006, 3:26 PM
#47
wickedklown avatar

wickedklown

Zen Follower

Join Date:
Aug 2005
Posts:
370
Plugin Contributions:
0

Re: Google Analytics Integration

it seems that i have this contrib installed correctly, however analytics dont seem to be showing my data.

When i check to make sure that its working through analytics, it shows that it is. But still no data is showing up.

Iv read through this topic over and over, and i dont see anyone having a fix for it.

Im using 1.3.5d and i just re-installed the files to make sure they are up to date.

Can someone please help me figgure out why nothing is showing on analytics, yet it says that its gathering data?
Thanks
Benjamin

Super Orders2
Info at a glance
export email address
encrypted master pass
quick updates
recover carts
order Tracking
Tabbed products lite - admin edition
Hosted with sashbox.net <- best host around...

6 Oct 2006, 3:52 PM
#48
wickedklown avatar

wickedklown

Zen Follower

Join Date:
Aug 2005
Posts:
370
Plugin Contributions:
0

Re: Google Analytics Integration

well i dont know if this was the cause of the problem, but
I just noticed that when i go to analytics and click on Site Overlay, it no longer pulls up the front page of my site, it shows this error. Maybe this is why its not working
Failed to Obtain Webpage: http://www.myrcsupply.com/www.myrcsupply.net/index.php?main_page=index
Error Code: 404

i changed my settings on the analytics account, and it has seemed to fix that part.

Im still wondering why nothing is showing up since i installed this modual into the new zencart....

has anyone else experianced this issue?

Super Orders2
Info at a glance
export email address
encrypted master pass
quick updates
recover carts
order Tracking
Tabbed products lite - admin edition
Hosted with sashbox.net <- best host around...

6 Oct 2006, 9:12 PM
#49
linkedla avatar

linkedla

New Zenner

Join Date:
Mar 2005
Location:
Bogotá, Colombia
Posts:
32
Plugin Contributions:
1

Re: Google Analytics Integration

I did copy and paste the google code in the tpl_main_page.php same place for the Comodo script. and it is working smooth. hope this can help some one :wink2:

Visit https://www.colombianhandcrafts.org, we are in the fair trade move!

6 Oct 2006, 10:54 PM
#50
wickedklown avatar

wickedklown

Zen Follower

Join Date:
Aug 2005
Posts:
370
Plugin Contributions:
0

Re: Google Analytics Integration

linkedla:

I did copy and paste the google code in the tpl_main_page.php same place for the Comodo script. and it is working smooth. hope this can help some one :wink2:

please explane a bit more if you would.
Thanks
Benjamin

Super Orders2
Info at a glance
export email address
encrypted master pass
quick updates
recover carts
order Tracking
Tabbed products lite - admin edition
Hosted with sashbox.net <- best host around...

7 Oct 2006, 11:35 AM
#51
jrb1512 avatar

jrb1512

Zen Follower

Join Date:
Sep 2006
Location:
Cheshire, UK
Posts:
100
Plugin Contributions:
0

Re: Google Analytics Integration

im quite concerned about my integration whereby google adwords is saying im getting dozens of clicks a day but in my analytics accounr they never register as visitors? :cry:

7 Oct 2006, 2:39 PM
#52
wickedklown avatar

wickedklown

Zen Follower

Join Date:
Aug 2005
Posts:
370
Plugin Contributions:
0

Re: Google Analytics Integration

make sure you have everything setup correctly.

you prolly are getting those hits, and they just arnt being passed to analytics.

what does your counter say on the admin console? are you gathering traffic?

Super Orders2
Info at a glance
export email address
encrypted master pass
quick updates
recover carts
order Tracking
Tabbed products lite - admin edition
Hosted with sashbox.net <- best host around...

7 Oct 2006, 3:00 PM
#53
jrb1512 avatar

jrb1512

Zen Follower

Join Date:
Sep 2006
Location:
Cheshire, UK
Posts:
100
Plugin Contributions:
0

Re: Google Analytics Integration

from my admin area i am doing ok.. but on analytics i struggle to reach 2 visitors a day

0/07/2006 21 - 49
10/07/2006 21 - 49
10/06/2006 33 - 36
10/05/2006 36 - 57
10/04/2006 51 - 122
10/03/2006 49 - 160
10/02/2006 30 - 77
10/01/2006 37 - 118
09/30/2006 31 - 82
09/29/2006 50 - 109

7 Oct 2006, 3:29 PM
#54
wickedklown avatar

wickedklown

Zen Follower

Join Date:
Aug 2005
Posts:
370
Plugin Contributions:
0

Re: Google Analytics Integration

so analytics is showing data? its just not mached with what you have in the admin?

well its always been that way for me. zc admin always shows a completely different number than analytics. This is becuase ana. is more in depth, and really filters your hits to show you new vs retruning and so forth.

are you hitting the front page alot? looking around your catalog? or maybe you post links to your products/cart, some of which may have your session id, when ppl hit that link they will be givin there own id, which will change the way data shown to you on the admin homepage. adjasent to that would be analytics, which would show you the true number of visitors that is showing to your site. along with where they came from, what ISP they are using, ect/ect/

i would see that your code is setup correctly through your cart, and make sure that google is counting everything.

make sure you enabled e-commerce on your analytics account. and make yourself a test sale, and see if it calc's it tomarrow. or later tonight even. if it does, we know that is prolly working as it should, and that we need to look at somthing else being the issue.

hope this helps

Super Orders2
Info at a glance
export email address
encrypted master pass
quick updates
recover carts
order Tracking
Tabbed products lite - admin edition
Hosted with sashbox.net <- best host around...

7 Oct 2006, 3:50 PM
#55
jrb1512 avatar

jrb1512

Zen Follower

Join Date:
Sep 2006
Location:
Cheshire, UK
Posts:
100
Plugin Contributions:
0

Re: Google Analytics Integration

i'll try a test sale analytics shows i have had 7 visitors between 30/09 and 06/10 whereas adword alone says ive had 30 clicks, and i've had at least 10 different people giving me opinions on my site.

In my adwords settings it is set to e-commerce site. I've checked the code and its setup correctly.

I wonder if adwords support may be able to help...

7 Oct 2006, 4:05 PM
#56
wickedklown avatar

wickedklown

Zen Follower

Join Date:
Aug 2005
Posts:
370
Plugin Contributions:
0

Re: Google Analytics Integration

ya, id try and contact them.

if your apsolutly positive that you have had more visitors in that period than google is showing, you may need to contact them.

another theroy could be that you have more than 1 viewing your site from the same system. iv never been able to verify my data since its in the 1000's a day.

never-the-less id contact them and see why it is that your adwords is showing 30clicks while your analytics isnt showing them

you may also see that on your next billing cycle with google they give you a credit for clicks that where multi's from the same user.
(like a compeditor clicking on your ad over and over) which would only show as one visitor on analytics, but numorus clicks on your adwords account. this happens to us every single month.

let us know what happens

Super Orders2
Info at a glance
export email address
encrypted master pass
quick updates
recover carts
order Tracking
Tabbed products lite - admin edition
Hosted with sashbox.net <- best host around...

9 Oct 2006, 3:23 PM
#57
brad512 avatar

brad512

New Zenner

Join Date:
Mar 2006
Location:
BC, Canada
Posts:
79
Plugin Contributions:
0

Re: Google Analytics Integration

I have been looking over the Google analytics integration module with interest as I believe I may have integrated in into my site incorrectly. As per the instructions from Google https://www.google.com/support/analytics/bin/answer.py?answer=26795&hl=en_US

I had placed the code snippet ( shown below ) in to bottom of tpl_footer.php.

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

I have looked over the Google analytics integration module for remnants of the script, but have found none. It does however appear that Google is notified when a purchase is completed. I have at best rudimentary skills when it comes to scripting - so it doesn't surprise me that I couldn't find the code in question.

Is that correct - the Google analytics integration module only tracks on the purchase of the item?

I would like to install it, but I am very pleased with the current integration (amazing amount of information from Google), and I would hate to interrupt the flow.

I have heard from a forum member that the current state of my install for the script is a less than desirable approach as it generates SSL errors.

Brad

Version 1.3.7

9 Oct 2006, 7:23 PM
#58
brent avatar

brent

Totally Zenned

Join Date:
Mar 2005
Location:
United Kingdom
Posts:
606
Plugin Contributions:
0

Re: Google Analytics Integration

Andrew's mod automatically inserts the code snippet on every page so you'll need to remove your manual entries.

It also takes care of the SSL errors as it checks to see if the page is secure or not and then uses http or https.

9 Oct 2006, 7:27 PM
#59
brad512 avatar

brad512

New Zenner

Join Date:
Mar 2006
Location:
BC, Canada
Posts:
79
Plugin Contributions:
0

Re: Google Analytics Integration

Thank you for that - that's says it in a nut shell

Version 1.3.7

12 Oct 2006, 8:04 PM
#60
morgankhalil avatar

morgankhalil

New Zenner

Join Date:
May 2006
Posts:
16
Plugin Contributions:
0

Re: Google Analytics Integration

wickedklown:

well i dont know if this was the cause of the problem, but
I just noticed that when i go to analytics and click on Site Overlay, it no longer pulls up the front page of my site, it shows this error. Maybe this is why its not working
Failed to Obtain Webpage: http://www.myrcsupply.com/www.myrcsupply.net/index.php?main_page=index
Error Code: 404

i changed my settings on the analytics account, and it has seemed to fix that part.

Im still wondering why nothing is showing up since i installed this modual into the new zencart....

has anyone else experianced this issue?

i had this problem also wickedklown, and here is how i fixed it:
sign in to analytics
click "edit" under settings for your website profile
click "edit" under "Main Website Profile Information"
change "Default page [?]:" to index.php DO NOT INCLUDE http://www.whatever.com