Zen Cart Logo
Forums / All Other Contributions/Addons / Google Analytics Integration

Google Analytics Integration

Views: 225,777

Results 121 to 140 of 660
21 Nov 2006, 17:30
#121
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Google Analytics Integration

You undestand javascript code? function zen_urchinTracker() executed after the page is loaded. So tracking code generated after the page is loaded!
If you want to see this and other "after-loaded-generated-code" in FF you must do:

  1. Select all (ctrl-A);
  2. Click right mouse button;
  3. View source code of selected...
21 Nov 2006, 20:08
#122
nellie avatar

nellie

New Zenner

Join Date:
Sep 2005
Posts:
49
Plugin Contributions:
0

Re: Google Analytics Integration

Ok, I am using 1.2.7, so this does not work for me then. Has anyone got something like this to work on ver 1.2.7?

22 Nov 2006, 08:07
#123
samad64 avatar

samad64

Totally Zenned

Join Date:
May 2006
Location:
Texas
Posts:
554
Plugin Contributions:
2

Re: Google Analytics Integration

a_berezin:

You undestand javascript code? function zen_urchinTracker() executed after the page is loaded. So tracking code generated after the page is loaded!
If you want to see this and other "after-loaded-generated-code" in FF you must do:

  1. Select all (ctrl-A);
  2. Click right mouse button;
  3. View source code of selected...

Gotcha, now I see it :) Thanks! I'm not as familiar with Javascript as I am with other programming languages, so it just had me confused. Thanks for pointing it out to me :)

23 Nov 2006, 08:52
#124
samad64 avatar

samad64

Totally Zenned

Join Date:
May 2006
Location:
Texas
Posts:
554
Plugin Contributions:
2

Re: Google Analytics Integration

andrew,

sorry to bother you but in IE6 there is a Javascript runtime error. Here are the (not so great) details:

Line: 26
Char: 3
Error: Unknown runtime error
Code: 0
URL: http://www.getyourgameshere.com/

You have same problem on your site here:
Line: 25
Char: 3
Error: Unknown runtime error
Code: 0
URL: http://zen-cart.spb.ru/

The line reads:

scrUTM.innerHTML = "\n _uacct = 'UA-XXXXXX-X';\n urchinTracker();\n";

on your site. Any idea?

23 Nov 2006, 11:08
#125
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: Google Analytics Integration

getyourgameshere.com:

in IE6 there is a Javascript runtime error.
Thank you!
UPDATED!
Last version v v 1.1.2 23.11.2006 14:01

27 Nov 2006, 08:41
#126
samad64 avatar

samad64

Totally Zenned

Join Date:
May 2006
Location:
Texas
Posts:
554
Plugin Contributions:
2

Re: Google Analytics Integration

OK. I think I have figured out what could be causing some products not to show up in E-commerce analysis in Google Analytics.

I'm hoping I did this fix right - I'll know within a couple of days because I just applied it :P. Its based off the previous fix that Andrew did for Internet Explorer, and as we all know that is probably the most popular browser still at this time (though rapidly falling to Firefox)

Open includes/modules/pages/checkout_success/jscript_google_analytics.php

Line 47 reads

frmUTM.innerHTML = txtUTM;

IE hates the innerHTML thing and throws javascript errors.

Change the line to read:

frmUTM.text = txtUTM;

I have just applied the proposed fix to my site, so I will report back shortly if I sell anything and tell you how it goes. The code that Andrew has works fine if you use a non-IE browser such as Firefox, but IE is a b*tch and likes to screw things over :)

27 Nov 2006, 15:53
#127
dinki avatar

dinki

Zen Follower

Join Date:
Oct 2006
Posts:
206
Plugin Contributions:
0

Re: Google Analytics Integration

Is there any way to get more descript page names? What I mean is when I view my reports, I get names like:

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

Is there a way to have it display something other than this? The best candidate would be what's in the title tag.

28 Nov 2006, 09:08
#128
100asa avatar

100asa

Totally Zenned

Join Date:
Oct 2006
Location:
Italy
Posts:
636
Plugin Contributions:
0

Re: Google Analytics Integration

I've just installed this mod (great a_berezin).
In past I've add google code in footer: must I delete code from footer?
Because customer have place an order, but in google analytics I can't see nothing in ecommerce section.
Try I my mod work: https://www.100asa.it

28 Nov 2006, 17:15
#129
samad64 avatar

samad64

Totally Zenned

Join Date:
May 2006
Location:
Texas
Posts:
554
Plugin Contributions:
2

Re: Google Analytics Integration

100asa:

I've just installed this mod (great a_berezin).
In past I've add google code in footer: must I delete code from footer?
Because customer have place an order, but in google analytics I can't see nothing in ecommerce section.
Try I my mod work: https://www.100asa.it

if you have installed andrews mod.. then yes you need to delete the one you put in the footer manually

sometimes my analytics reports an e-commerce sale, other times it doesn't.. not sure why. trying to figure out how to get it to work a bit more often but the change i did doesnt seem to help much :(

29 Nov 2006, 10:00
#130
100asa avatar

100asa

Totally Zenned

Join Date:
Oct 2006
Location:
Italy
Posts:
636
Plugin Contributions:
0

Re: Google Analytics Integration

I've just post an email to Google analytics team, to ask to solve this problem.
I've deleted from footer the original google code, and now I can't see the visitors and other analytics information.
But in the html view of my page I see the a_berezing google analytics code.
A-berezin: can you help me?

29 Nov 2006, 11:45
#131
100asa avatar

100asa

Totally Zenned

Join Date:
Oct 2006
Location:
Italy
Posts:
636
Plugin Contributions:
0

Re: Google Analytics Integration

Quick reply by Google team:
"complete a transaction and send us page result"
I'm doing...

29 Nov 2006, 16:23
#132
taipa avatar

taipa

New Zenner

Join Date:
Nov 2005
Posts:
54
Plugin Contributions:
0

Re: Google Analytics Integration

a_berezin:

You undestand javascript code? function zen_urchinTracker() executed after the page is loaded. So tracking code generated after the page is loaded!
If you want to see this and other "after-loaded-generated-code" in FF you must do:

  1. Select all (ctrl-A);
  2. Click right mouse button;
  3. View source code of selected...

THANK YOU!

Perhaps you should put these instructions in your readme.txt file? Not everyone knows this, and I was going nuts trying to find the code in my footer in FF and IE (since it does NOT show up there if you just View Source normally!).

Took me 13 pages to find the answer, but thanks for posting this info or I never would have understood!

29 Nov 2006, 16:28
#133
100asa avatar

100asa

Totally Zenned

Join Date:
Oct 2006
Location:
Italy
Posts:
636
Plugin Contributions:
0

Re: Google Analytics Integration

I've added another one time the google original code to footer, and google analytics now work ok.

30 Nov 2006, 06:46
#134
samad64 avatar

samad64

Totally Zenned

Join Date:
May 2006
Location:
Texas
Posts:
554
Plugin Contributions:
2

Re: Google Analytics Integration

hm.. unfortunately that 'code fix' i suggested on the previous page or the page before doesn't work too well.. still not getting all of my sales on there :(

30 Nov 2006, 07:52
#135
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: Google Analytics Integration

The possible reasons:

  1. User setting javascript off;
  2. Google server Is inaccessible/overloaded;
  3. javascript errors in another javascript scripts, before this javascript executed;
  4. User does not wait for ending complete loading of page;
  5. Something else :-(
30 Nov 2006, 07:56
#136
100asa avatar

100asa

Totally Zenned

Join Date:
Oct 2006
Location:
Italy
Posts:
636
Plugin Contributions:
0

Re: Google Analytics Integration

I've posted to google analytics team html code of sale processed into my website.
We hope in their quick reply.

30 Nov 2006, 08:09
#137
samad64 avatar

samad64

Totally Zenned

Join Date:
May 2006
Location:
Texas
Posts:
554
Plugin Contributions:
2

Re: Google Analytics Integration

Hi Andrew,

I think there may be something else - I just did a test transaction in Firefox, and I got this error in Javascript console:

Error: __utmSetTrans is not defined
Source File: https:// https://www.xxxxxxx.com/ checkout_success.html
Line: 45

However, when I see source the way you showed me (thanks again!).. i see this in header:

function zen_utmSetTransX() {
var frmUTM = document.createElement("form");
frmUTM.id = "utmform";
frmUTM.name = "utmform";
frmUTM.style.display = "none";
var txtUTM = "";
txtUTM += "\n <textarea id="utmtrans">\n";
txtUTM += " UTM:T|141|GYGH|11,79||7,80|Plano|Texas|United States\n";
txtUTM += " UTM:I|141|SDRW|SD and miniSD Card Reader / Writer|M3, G6, Passcard3|3,99|1\n";
txtUTM += "\n </textarea>\n";
frmUTM.text = txtUTM;
document.body.appendChild(frmUTM);
__utmSetTrans();
}

So.. product is correctly being made and everything. However, __utmSetTrans(); doesn't want to work - this may be a google problem. Hopefully 100asa can get google to respond accordingly :)

I have an idea however.. what if we were to copy __utmSetTrans(); and put into the jscript_google_analytics.php file?

30 Nov 2006, 08:20
#138
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: Google Analytics Integration

Sorry, My previous post was addressed getyourgameshere.com.

To 100asa.

  1. On your site http://www.100asa.it/ function zen_urchinTracker() does not execute. Why - I don't know.

  2. Who, why and for what purposes add to your head this strange code?

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><meta content="MSHTML 6.00.2600.0" name="GENERATOR"><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><meta content="MSHTML 6.00.2600.0" name="GENERATOR">
  1. You see your site on Markup Validation Service - http://validator.w3.org/check?uri=http%3A%2F%2Fwww.100asa.it%2F&charset=%28detect+automatically%29&doctype=Inline&ss=1&verbose=1
30 Nov 2006, 08:36
#139
samad64 avatar

samad64

Totally Zenned

Join Date:
May 2006
Location:
Texas
Posts:
554
Plugin Contributions:
2

Re: Google Analytics Integration

i am currently trying a slight alternative to the original function.. will post up details once analytics updates

30 Nov 2006, 08:43
#140
100asa avatar

100asa

Totally Zenned

Join Date:
Oct 2006
Location:
Italy
Posts:
636
Plugin Contributions:
0

Re: Google Analytics Integration

a_berezin:

Sorry, My previous post was addressed getyourgameshere.com.

To 100asa.

  1. On your site http://www.100asa.it/ function zen_urchinTracker() does not execute. Why - I don't know.

  2. Who, why and for what purposes add to your head this strange code?

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><meta content="MSHTML 6.00.2600.0" name="GENERATOR"><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><meta content="MSHTML 6.00.2600.0" name="GENERATOR">

> 
> 3. You see your site on Markup Validation Service - <http://validator.w3.org/check?uri=http%3A%2F%2Fwww.100asa.it%2F&charset=%28detect+automatically%29&doctype=Inline&ss=1&verbose=1>

Sorry, I've just opend my homepage <https://www.100asa.it> on firefox and IE, but I can't see what you say.
This is html of my homepage