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

Google Analytics Integration

Views: 225,791

Results 401 to 420 of 660
24 Aug 2008, 10:16 AM
#401
a_berezin avatar

a_berezin

Deceased

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

Google Analytics Integration

Hi Eunan,
Please read this - https://www.google.com/support/googleanalytics/bin/answer.py?answer=55480&utm_id=ad
I see Google analytics code in your page:

<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-5363789-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
24 Aug 2008, 10:44 AM
#402
a_berezin avatar

a_berezin

Deceased

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

Re: Google Analytics Integration

Hi michaelhl,

michaelhl:

I discover that the script produces a mistake when there is a apostrophe in the productname.
I fix this bag in new version v 2.2.
We'll just wait for when the new version will be activated in download area.

24 Aug 2008, 10:44 AM
#403
a_berezin avatar

a_berezin

Deceased

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

Re: Google Analytics Integration

v 2.2 19.08.2008 15:03
A lot of different changes and bugfix.

24 Aug 2008, 2:05 PM
#404
michaelhl avatar

michaelhl

New Zenner

Join Date:
Oct 2005
Location:
Germany
Posts:
60
Plugin Contributions:
0

Re: Google Analytics Integration

First your contributions are great and usefull and I try to use most of them.
But I find another problem. Most of our user, like I myself, use the Internet-Explorer. Only about 30% use Fire-Fox (but this rate grows).
In Internet-Explorer the script "DOM_ready" produces an Error in page when the product page is loaded. After pressing the reload Button the error isn't longer permanent. I noticed this first by using a lightbox - clone which also use this function. After I comment out the rows of this script in the jscript_google........php there is no error message in the left corner.

25 Aug 2008, 8:16 AM
#405
a_berezin avatar

a_berezin

Deceased

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

Re: Google Analytics Integration

michaelhl
This and other error fixed in version 2.2

26 Aug 2008, 12:18 PM
#406
michaelhl avatar

michaelhl

New Zenner

Join Date:
Oct 2005
Location:
Germany
Posts:
60
Plugin Contributions:
0

Re: Google Analytics Integration

Hi Andrew,
when will the version 2.2. come ? Until now, there is only 2.12. from march of this year.

27 Aug 2008, 7:08 AM
#407
a_berezin avatar

a_berezin

Deceased

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

Re: Google Analytics Integration

Hi michaelhl,
I download it to DL-area 24/08/08. Now we just wait for when the this version will be activated.

If you do not want to wait - PM to me, I send you the latest version.

27 Aug 2008, 6:48 PM
#408
michaelhl avatar

michaelhl

New Zenner

Join Date:
Oct 2005
Location:
Germany
Posts:
60
Plugin Contributions:
0

Re: Google Analytics Integration

Hello Andrew,
ist it right?

 
if(GOOGLE_ANALYTICS_USE_PAGENAME == 'true') {
  $google_analytics_page = "'" . zen_output_string_protected($breadcrumb->last()) . (isset($_GET['page']) ? ' (' . sprintf(PREVNEXT_TITLE_PAGE_NO, $_GET['page']) . ')' : '') . '"';
} else {
  $google_analytics_page = '';

It opens with "'" and close with '"'.
It is line 27 to 30 in tpl_footer_googleanalytics.php

27 Aug 2008, 6:51 PM
#409
michaelhl avatar

michaelhl

New Zenner

Join Date:
Oct 2005
Location:
Germany
Posts:
60
Plugin Contributions:
0

Re: Google Analytics Integration

I change it as follows and now there are no mistakes in internet explorer:

 
if(GOOGLE_ANALYTICS_USE_PAGENAME == 'true') {
  $google_analytics_page = "'" . zen_output_string_protected($breadcrumb->last()) . (isset($_GET['page']) ? ' (' . sprintf(PREVNEXT_TITLE_PAGE_NO, $_GET['page']) . ')' : '') . "'";
} else {
  $google_analytics_page = '';
}
27 Aug 2008, 7:16 PM
#410
michaelhl avatar

michaelhl

New Zenner

Join Date:
Oct 2005
Location:
Germany
Posts:
60
Plugin Contributions:
0

Re: Google Analytics Integration

Hi Andrew,
my last posting was just the wrong way, because the inverted comma produces again a mistake. It must be

 
if(GOOGLE_ANALYTICS_USE_PAGENAME == 'true') {
$google_analytics_page = '"' . zen_output_string_protected($breadcrumb->last()) . (isset($_GET['page']) ? ' (' . sprintf(PREVNEXT_TITLE_PAGE_NO, $_GET['page']) . ')' : '') . '"';
} else {
$google_analytics_page = '';
28 Aug 2008, 8:43 AM
#411
a_berezin avatar

a_berezin

Deceased

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

Re: Google Analytics Integration

Hi michaelhl,
You are right. Fix it in next version.

28 Aug 2008, 10:03 AM
#412
michaelhl avatar

michaelhl

New Zenner

Join Date:
Oct 2005
Location:
Germany
Posts:
60
Plugin Contributions:
0

Re: Google Analytics Integration

It's a great work. All is viewable in Google Analytics. The net amount, the tax, the shipping costs, the products. Well done!!!

I thought it might slow down the shop but it seems it fasten it up. Great!

29 Aug 2008, 5:06 PM
#413
toyseller avatar

toyseller

Zen Follower

Join Date:
Jun 2008
Location:
UK
Posts:
209
Plugin Contributions:
0

Re: Google Analytics Integration

I cannot get the e-commerce part of analytics to work.

I thought Id set up everything correctly but when going on Adwords to verify the action code it says verification failed and no amounts are being shown in the e-commerce part of analytics.

Im not sure if Im typing in the correct url when I verify with
https://www.tidytoys.co.uk/shop/index.php?main_page=checkout_success

Ive put extra coding into includes/modules/pages/checkout_success/header_php.php

ie .....

// Needs reworking in v1.4 for checkout-rewrite
$zv_orders_id = ($_SESSION['order_number_created'] >= 1) ? $_SESSION['order_number_created'] : $orders_id;
$orders_id = $zv_orders_id;

// Added the below field for Google Analytics E-commerce Tracking (in the footer file)
$zv_order_tax = $orders->fields['order_tax'];
$zv_order_city = $orders->fields['delivery_city'];
$zv_order_state = $orders->fields['delivery_state'];
$zv_order_country = $orders->fields['delivery_country'];

// Google Analytics Tracking (This can be removed and not harm anything)
//Altered code below to accomdate additional fields that Google Analytics can Track
$products_query = "select products_id, products_name, products_model,products_price, products_quantity from " . TABLE_ORDERS_PRODUCTS . "
where orders_id = '" . $zv_orders_id . "'
order by products_name";
$products_google = $db->Execute($products_query);
//Google codes******
while (!$products_google->EOF) {
$products_array_google[] = array('id' => $products_google->fields['products_id'],
'text' => $products_google->fields['products_name'],
'model' => $products_google->fields['products_model'],
'price' => $products_google->fields['products_price'],
'quantity' => $products_google->fields['products_quantity']);
$products_google->MoveNext();
}
//******End Google Codes
// End Google Analytics Code

// prepare list of product-notifications for this customer
$global_query = "SELECT global_product_notifications
FROM " . TABLE_CUSTOMERS_INFO . "
WHERE customers_info_id = :customersID";

Ive found where the 10 digit conversion code is xxxxxxxxxx and
changed the code to the code number on Adwords.

Ive turned the e-commerce on in the Analytics panel.

30 Aug 2008, 9:04 AM
#414
toyseller avatar

toyseller

Zen Follower

Join Date:
Jun 2008
Location:
UK
Posts:
209
Plugin Contributions:
0

Re: Google Analytics Integration

Ive managed to get the analytics e-commerce working.

Earlier on I found a thread that said the add an extra file with a piece of Javascript in it. Later on in the thread it said it was no longer needed. I removed mine and its removal seems to have kicked my Analytics into action.

2 Sep 2008, 2:36 AM
#415
chaddb avatar

chaddb

New Zenner

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

Re: Google Analytics Integration

I installed the latest version, 2.2, and i'm seeing analytics code on my site, and I have Analytics setup. I'm getting nothing in Analytics thought.

http://www.collectiblefinewine.com

Any thoughts?

I installed the earlier version, 2.12, and had the same results....nothing.

I'm lost.

2 Sep 2008, 3:30 AM
#416
tophand avatar

tophand

Totally Zenned

Join Date:
Jan 2007
Location:
1.5 miles from Home
Posts:
674
Plugin Contributions:
0

Re: Google Analytics Integration

chaddb:

I installed the latest version, 2.2, and i'm seeing analytics code on my site, and I have Analytics setup. I'm getting nothing in Analytics thought.

http://www.collectiblefinewine.com

Any thoughts?

I installed the earlier version, 2.12, and had the same results....nothing.

I'm lost.

Takes 24 hours for data to post to your account.
This is every day, so you won't see todays data until tomorrow and so on...

M

2 Sep 2008, 3:40 AM
#417
chaddb avatar

chaddb

New Zenner

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

Re: Google Analytics Integration

tophand:

Takes 24 hours for data to post to your account.
This is every day, so you won't see todays data until tomorrow and so on...

M

I've had it installed for 6 days. Still no data.

2 Sep 2008, 6:43 AM
#418
a_berezin avatar

a_berezin

Deceased

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

Re: Google Analytics Integration

File tpl_footer_googleanalytics.php
Find

  $google_analytics_page = "'" . zen_output_string_protected($breadcrumb->last()) . (isset($_GET['page']) ? ' (' . sprintf(PREVNEXT_TITLE_PAGE_NO, $_GET['page']) . ')' : '') . '"';

Replace by

  $google_analytics_page = '"' . zen_output_string_protected($breadcrumb->last()) . (isset($_GET['page']) ? ' (' . sprintf(PREVNEXT_TITLE_PAGE_NO, $_GET['page']) . ')' : '') . '"';
2 Sep 2008, 12:45 PM
#419
0be1 avatar

0be1

Totally Zenned

Join Date:
Sep 2004
Location:
Murfreesboro, TN
Posts:
479
Plugin Contributions:
0

Re: Google Analytics Integration

ok ok, I must be in complete moron mode or something as this mod seems easier to install than the one i have used in the past from econcepts. However, I have followed your directions in the readme file and it seems that the site is not tracking properly.

Can someone please help assist in the troubleshooting part?

the site is: http://www.bornagaintechnologies.org

tia...

0be1

2 Sep 2008, 5:53 PM
#420
a_berezin avatar

a_berezin

Deceased

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

Re: Google Analytics Integration

Not included tpl_footer_googleanalytics.php