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

Google Analytics Integration

Views: 225,781

Results 181 to 200 of 660
20 Dec 2006, 9:01 AM
#181
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Google Analytics Integration

Stenrique:

I've downloaded the mod., read the forum and readme file. I'm still rather confused as to its installation.

There are two types of installs. Choose one or the other:

  1. variant_javascript install method:
    Easiest install (does not require a template file edit) but does not work for everyone. Try it first.

UPLOAD:
/includes/templates/YOUR_TEMPLATE/jscript/jscript_google_analytics.php
/includes/templates/YOUR_TEMPLATE/jscript/on_load/on_load_google_analytics.js

And PATCH the DB with the provided SQL

  • OR -
  1. variant_include install method:

UPLOAD:
/includes/templates/YOUR_TEMPLATE/common/tpl_footer_googleanalytics.php

EDIT:
tpl_footer.php or tpl_main_page.php or any other that you want.
(for example: copy template_default/common/tpl_footer.php then edit with instructions in readme and save in YOUR_TEMPLATE/common directory).

And PATCH the DB with the provided SQL

-Woody

20 Dec 2006, 9:10 AM
#182
woodymon avatar

woodymon

Totally Zenned

Join Date:
Sep 2004
Posts:
2,309
Plugin Contributions:
1

Re: Google Analytics Integration

Woodymon:

<div style="position: absolute; top: -1000px; left: -1000px;"><span class="ygtvtn"> </span><span class="ygtvtm"> </span><span class="ygtvtmh"> </span><span class="ygtvtp"> </span><span class="ygtvtph"> </span><span class="ygtvln"> </span><span class="ygtvlm"> </span><span class="ygtvlmh"> </span><span class="ygtvlp"> </span><span class="ygtvlph"> </span><span class="ygtvloading"> </span></div> ``` > > 1. Does anyone have a clue what the source would be of all the strange span classes and non-breaking spaces would be from?

Update on my question.. Apparently it is the result of installing Yahoo Tree Menu (Categories) mod. Still unsure of code purpose but that is a question for the YTM support thread.

20 Dec 2006, 1:37 PM
#183
a_berezin avatar

a_berezin

Deceased

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

Re: Google Analytics Integration

Woodymon:

There are two types of installs. Choose one or the other:
...
Thank you Woody! Add this comments to readme.

11 Jan 2007, 8:03 AM
#184
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Google Analytics Integration

I have this mysql error while trying to use the sql file:


1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'customers', 'delivery', 'billing'),'), (NULL, 'Affiliation', 'G
in:
[INSERT INTO zen_configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES (NULL, 'Analytics Account', 'GOOGLE_ANALYTICS_UACCT', 'UA-XXXXXX-X', 'Enter your Google Analytics account number', @t4, 1, NOW(), NOW(), NULL, NULL), (NULL, 'Target Address', 'GOOGLE_ANALYTICS_TARGET', 'customers', 'What adress (City/State/Country to correlate the transaction with) use in Analytics transaction?', @t4, 2, NOW(), NOW(), NULL, 'zen_cfg_select_option(array('customers', 'delivery', 'billing'),'), (NULL, 'Affiliation', 'GOOGLE_ANALYTICS_AFFILIATION', '', 'Optional partner or store affilation', @t4, 3, NOW(), NOW(), NULL, NULL), (NULL, 'Use sku/code', 'GOOGLE_ANALYTICS_SKUCODE', 'products_id', 'Using as Product SKU code', @t4, 4, NOW(), NOW(), NULL, 'zen_cfg_select_option(array('products_id', 'products_model'),');]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

15 Jan 2007, 8:14 AM
#185
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Google Analytics Integration

I found out the reason: I believe my server has the option to auto-strip backslash on (which is called automagicquote or something, forgot it), that's why the script wont work for everyone. I had to manually execute the script (and the modify the groupid).
Anyhow, it works now, thank you for this great mod, save me time editing the template.

16 Jan 2007, 8:51 PM
#186
dwessell avatar

dwessell

Zen Follower

Join Date:
Mar 2005
Posts:
143
Plugin Contributions:
0

Re: Google Analytics Integration

Hi all.. I'm a tad confused on something.. How is this contribution differ from just adding the Google Analytics code to the bottom of the footer?

Thanks
David

27 Jan 2007, 4:24 PM
#187
kaylala avatar

kaylala

New Zenner

Join Date:
Apr 2006
Location:
Baltimore
Posts:
41
Plugin Contributions:
0

Re: Google Analytics Integration

I also had the same mysql error as posted above by "yellow1912"... but I do not know how to manually execute the script like they did. Any tips?

thanks!

3 Feb 2007, 7:48 PM
#188
mafiasam avatar

mafiasam

Zen Follower

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

Re: Google Analytics Integration

I had this older version of analytics > v 1.1.2 23.11.2006 14:01 on my site and it was working great until I had to restore a full backup of my store and the database. Now the code looks like this when I do a view page source...

<script type="text/javascript">
function zen_urchinTracker() {
  var scrUTM = document.createElement("script");
  scrUTM.type = "text/javascript";
  scrUTM.src = "http://www.google-analytics.com/urchin.js";
  document.body.appendChild(scrUTM);
  var scrUTM = document.createElement("script");
  scrUTM.type = "text/javascript";
  scrUTM.text = "\n  _uacct = 'UA-737751-1';\n  urchinTracker();\n"; 
  document.body.appendChild(scrUTM);
  
}
</script>

Not sure if that looks right but my analytics are not being recorded now. Need some advice on how to uninstall and do fresh install of this older version or possibly upgrade to the newest verison.

zencart version 1.3.6

thanks

4 Feb 2007, 12:21 PM
#189
a_berezin avatar

a_berezin

Deceased

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

Re: Google Analytics Integration

Delete
/includes/templates/YOUR_TEMPLATE/jscript/on_load/on_load_google_analytics.js
/includes/templates/YOUR_TEMPLATE/jscript/jscript_google_analytics.*
/includes/modules/pages/checkout_success/jscript_google_analytics.*

4 Feb 2007, 12:30 PM
#190
mafiasam avatar

mafiasam

Zen Follower

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

Re: Google Analytics Integration

a_berezin:

Delete
/includes/templates/YOUR_TEMPLATE/jscript/on_load/on_load_google_analytics.js
/includes/templates/YOUR_TEMPLATE/jscript/jscript_google_analytics.*
/includes/modules/pages/checkout_success/jscript_google_analytics.*

I am assuming that was for uninstalling the contribution...

Well, I ended up figuring it out. Basically when the backup was restored there were name changes to various files and folders. So the folder
/includes/templates/YOUR_TEMPLATE/jscript/on_load/
was changed to a file and obviously appeared to the app that it was missing. I restored the folder and now it's back to its reliable old self.

Thanks Andrew.

6 Feb 2007, 8:36 AM
#191
100asa avatar

100asa

Totally Zenned

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

Re: Google Analytics Integration

It's strange: yesterday I've had 2 orders, eur247,00 and eur1.160,37
In analytics I see totale ecommerce transaction=eur248,00
It's strange!!!

6 Feb 2007, 10:14 AM
#192
a_berezin avatar

a_berezin

Deceased

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

Re: Google Analytics Integration

100asa,
What version and what variant you use?

7 Feb 2007, 6:04 PM
#193
100asa avatar

100asa

Totally Zenned

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

Re: Google Analytics Integration

@version $Id: tpl_footer_googleanalytics.php,v 1.2.1 02.12.2006 13:06

7 Feb 2007, 8:29 PM
#194
a_berezin avatar

a_berezin

Deceased

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

Re: Google Analytics Integration

Last version is:

  • @version $Id: tpl_footer_googleanalytics.php, v 1.2.2 16.12.2006 13:36
8 Feb 2007, 7:37 AM
#195
100asa avatar

100asa

Totally Zenned

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

Re: Google Analytics Integration

I've just downloading and replace with last version. I've only change this
number_format($products->fields['final_price'], 3, '.', '')
with this
number_format($products->fields['final_price'], 2, ',', '')
because I'm use Euro currency
Is it all right?

8 Feb 2007, 8:00 AM
#196
a_berezin avatar

a_berezin

Deceased

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

Re: Google Analytics Integration

!!!!!!!:lamo:
Why you do this updates and then ask me why YOUR modifications does not work? You must understand what you do before you do any changes. RTFM

13 Feb 2007, 4:46 PM
#197
100asa avatar

100asa

Totally Zenned

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

Re: Google Analytics Integration

this changes was suggested by you, in another thread!

13 Feb 2007, 4:56 PM
#198
a_berezin avatar

a_berezin

Deceased

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

Re: Google Analytics Integration

Where??? ??

14 Feb 2007, 8:14 AM
#200
100asa avatar

100asa

Totally Zenned

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

Re: Google Analytics Integration

the link at your website to download the last version of google analytics is wrong: it point at google froogle. Give us, please, the right link to download the last version analytics integration