Glad you got it working. Thanks for posting the solution.
Printable View
Try using this and let me know if it works:
Quote:
CREATE TABLE google_analytics_languages ( languages_id int(11) NOT NULL auto_increment, name varchar(50) NOT NULL default '', code char(10) NOT NULL default '', sort_order int(3) default NULL, PRIMARY KEY (languages_id), KEY idx_languages_name_zen (name) ) ENGINE=MyISAM;
Hi Eric
Thanks for a great mod. I've been using it for a long time on an old store :)
I'm just setting up a new store with 1.5 and cannot work out what settings to use in the Admin Page Registration screen.
I did spot someone else had the problem but figured it out themselves. However, I'm not having that much luck!! I've not actually tried anything yet, I simply don't know where to draw the information needed for:
Page Key:
Page Name:
Page Filename:
PageParameters:
Could you shed some light on it for me (and others) please? As I'm having another dumb. latenight, trying to code moment!
Many thanks and kind regards
Natty
I'm going to have a guess at:
Page Key: Simple Google Analytics
Page Name: ??? - not sure of this one
Page Filename: ??? - or this one
Page Parameters: gID=34 (Looked up in phpMyAdmin configuration_group)
Menu: Configuration
display: checked
sort order: 0
FYI you can also access the page via URL rather than the config menu, eg:
http://www.yourstore.co.uk/youradmin...ion.php?gID=34
I too need to know what to enter in to the admin page registration page in admin on 1.5.
I'm using Zen Cart 1.5, which I am in the process of upgrading my 1.3.9h site to. Simple Google Analytics 1.2.2 was installed on the old site.
I downloaded version 1.2.5 of Simple Google Analytics, renamed the admin folder to the name of my admin folder, renamed "your_template" to the name of my template and uploaded my files. I followed the instructions in the README_UPGRADE-TO-1-2-5.txt file and successfully ran the UPGRADE-toversion-1-2-4.sql patch. The Google Analytics code is appearing correctly on my site, but I don't have the Google Analytics Configuration entry on the Configuration menu on the Admin pages.
Is that what ksookma is talking about with the Admin Page Registration?
What am I missing?
TIA
Just did fresh install on a new site of mine. Version 1.5.0. I installed this mod and cannot get anything to happen once i install the sql patch. Looks like im in the same boat as the previous posts. Need the information for the Admin Page Registration.
The SQL patch did not import correctly during my installation, citing a syntax error instead.
In response to several postings of this nature:
[QUOTE]
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 'TYPE=MyISAM' at line 1
in:
[CREATE TABLE [?QUOTE]
In trying to research the 1064 error where the MySQL tables have not accepted the sql patch, I ran across an answer in this thread.
http://www.zen-cart.com/forum/showthread.php?p=689865
This question seems to pop up in a great many threads where people are installing modules. It probably should have a thread of its own.
Notageek
what is language_key? where to find it? Good question as I don't know either.
Step by Step the Admin
How & what do you put in each section?
Mine never appeared on config after installing this mod
so if all new plugin's require this I would like to know the
meaning of each section in the Admin.
Page Key (e.g. myModPageName)
Page Name (e.g. BOX_MY_MOD_PAGE_NAME)
Page Filename (e.g. FILENAME_PAGE_NAME)
Page Parameters (e.g. option=1 or, more usually, leave blank)
Menu
Display on Menu?
Sort Order
Page Key= The Name of the New Setting?
Page Name? for the title pages or is it the same as above?
Page Filename? is this like a .EXE or .PHP the executes the setting? where are they usually held? admin/includes/functions?
Page Parameters ? No Idea
sort order ? I didn't know the rest of the zen cart settings were sorted so I would need to know the order of whats there now so I don't understand this setting at all.
HELP! lol
Still no luck I read all 172 posts to no avail & re downloaded the mod. I am not recieving errors anywhere! google looks to be finding the code & the sql patch went in I even checked my PHPadmin. It's all there except for tables for config settings looks like Language & groups went it. The config setting are still not showing in my admin panel do I have to name my folder back to ADMIN before I run patch? I have it renamed to something differnt for security. :censored: Frustration is setting in. One more shot at this if anyone have another suggestion to try. if not this mod is coming out & I will put the basic code back in my INDEX.PHP file.
Ok now I am seeing all the tables in MYPHPadmin but still not in admin panel
I managed to get Simple Google Analytics Version: 1.2.5 to work for me on Zen version 1.5 and added to the admin menu. I thought I'd share.
The new GA version does not seem to have a language file to define one of the settings for the admin menu to appear. I created this file: admin/includes/languages/english/extra_definitions/googleanalytics.php and placed the following code in this file:
<?php
define('UN_BOX_GOOGLE_ANALYTICS', 'Simple Google Analytics');
Here are the settings I used in the admin registration page.
Page Key: Simple Google Analytics
Page Name: UN_BOX_GOOGLE_ANALYTICS
Page Filename: FILENAME_CONFIGURATION
Page Parameters: gID=36 (make sure you look up this in your database because the number will be different. see below on how to do this.)
Menu: configuration
Display on Menu? Y
Sort Order: whatever you want
To find the gID number run this select statement in phpMyAdmin:
SELECT * FROM `configuration` WHERE configuration_key like '%google%'
Then look for the configuration_group_id. This is the number to use after gID=
I hope this helps someone!
I've been using Simple Google Analytics successfully for over a year. Tracking visitors and conversions.
I recently installed some 3rd party tracking code using the instructions in this ZenCart Tutorial: https://www.zen-cart.com/tutorials/i...hp?article=399
The tutorial directs you to create a checkout_success directory under includes/templates/XXXXX/ and place a tpl_footer.php file there. That all worked just fine until I realized that this solution caused my Analytics conversion tracking to stop.
It appears to have disabled the execution of the Simple Google Analytics code on the checkout success page. After investigating and running some tests, just the existence of a tpl_footer.php file under checkout_success causes the conversion tracking to stop (ie same file no 3rd party mods in it).
I found some references to this incompatibility in this thread and took the advice to move my tracking code to includes/templates/XXXXX/common/tpl_main_page.php and deleted the checkout_success override directory and tpl_footer.php in it.
This solved the problem, conversion tracking is working again and my 3rd party tracking code is executing.
I just wanted to share this experience. I don't understand why the incompatibility occurred but I'm very glad to have it all working again!
I just re-downloaded it I will try it & let you know:clap:
It Worked like a Charm! the /languages/english/extra_definitions/googleanalytics.php is not in the mod.
After I made that file & then pointed the Admin Register page to the correct place using the ID from the phpadmin it came right up.
So a update will be required on this one to make it really simple for people that know even less then me about php/Sql.
I understand the PCI compliance but I don't have to like it either.
Thank You joepixel & pinkchalkstudio for the help on this one.
:D I just Love Zen Cart! I don't think I would be running a E commerce business without it!
Now to get this puppy set up!
Thanks Joepixel, I have been looking for a solution for over a week and your solution works.
I'm currently in the process of looking at this a a few other mods to make sure they are 1.5 compatible. I've got them all working on 1.5 but have noticed that it is not as smooth for others so I'll go back here and rework the areas needed and upload a new version for those looking if needed.
Just wanted to let everyone know.
Disregard,
Just wasn't patient enough I guess =) Gathering data now =)
Thanks OP and all who made this mod!
In ZC 1.5 you need to register the page within the Admin.
First, create the adminXXXXXXXXXXXX/includes/languages/english/extra_definitions/googleanalytics.php page with the following:
Code:<?php
define('UN_BOX_GOOGLE_ANALYTICS', 'Simple Google Analytics');
Fire up your mysql client (HeidiSQL, phpMyAdmin, etc)
and run the query:
SELECT `configuration_group_id` FROM `configuration` WHERE `configuration_title` like '%google%' LIMIT 1;
If it returns nothing, you didn't run the SQL included with the installer.
Take the resultant # and use that for your gID in the next step.
Now within your carts admin console, go to:
Admin Access Management => Admin Page Registration
Register the page as per the previous posts:
Page Key: Simple Google Analytics
Page Name: UN_BOX_GOOGLE_ANALYTICS
Page Filename: FILENAME_CONFIGURATION
Page Parameters: gID=XXXX
Menu: configuration
Display on Menu? Y
Sort Order: whatever you want
Save it, and refresh your admin console. You should now see it under 'Configuration'.
http://www.zencartmarketing.com/wp-c...tics-setup.png
Configuration image stolen from this site:
http://www.zencartmarketing.com/goog...-for-zen-cart/
I was able get the configuration ID in the configuration database using phpMyAdmin.
I added the Simple Google Analytics to the Admin Page Registration using this info:
Page Key: Simple Google Analytics
Page Name: UN_BOX_GOOGLE_ANALYTICS
Page Filename: FILENAME_CONFIGURATION
Page Parameters: gID=49
Menu: Tools
Display on Menu? Y
Sort Order: 0
The menu was added in under Tools. However, when clicked it just shows the My Store configuration.
Thank in advance for any help.
I do apologize in advance if this question has been posted before in this thread, but I display 100 posts per page and this thread in 18 pages long so the thought of wading through 1,800 posts if not that palatable.
In any event - when I sign up for Googleanalytics it asked me if I want HTTP for my site or HTTPS for the url before I enter the URL.
How do you get one account that handles both since the UA number is dfferent for my http and https web profile.
thanks in advance.
Jeff
Is there a reason you have a different tracking number (UA) for the secure vs. non-secure site?
Ideally they should be identical if you want the most accurate tracking.
My suggestion would be to choose one tracking number and use that for the website. If you have multiple websites (with different domains) you can use different tracking numbers (UA) to segment then (and even then, you could technically track multiple domains with the same id if desired.)
thanks I got that one figured out. what threw me off was google shows http and https as different choices - then I took at the code they generate and saw the bit about being able to support http and https from the same code.
My other question is this: do I have to define my own sales funnel - I'm guessing yes?
I've done a few transactions earlier today and while basic access stats show up in the analytics code none of my sales have yet.
maybe I need to go back and read all the posts in this thread.
one thing I have noticed -
a lot of the older thred refer to this code in the bottom of the mail page:
I have the following code:PHP Code:
<?php
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
?>
I am getting google stats but no sales number and do have my UA code entered in the config screen.PHP Code:
<?php
if (GOOGLE_ANALYTICS_TRACKING_TYPE == "Asynchronous") {
// Do nothing
} else {
require(DIR_WS_TEMPLATE . 'google_analytics/google_analytics.php');
}
?>
In addition my tpl_main_page.php is in:
/usr/local/websites/mysite/includes/templates/ZCT/common
and my google-analytics directory is located at:
/usr/loca/websites/includes/templates/ZCT/google_analytics
does this look right?
thanks in advance.
Wow! I was really surprised when I went to install this addon on a newly installed ZC 1.5.0 that there was no Google analytics showing under Configuration in Admin. That is a first, as I have installed this addon on previously ZCs with no problems.
I did go back a page in this support thread and noticed the fix. But since me and databases don't get along (I just have to look at myphpAdmin and my database explodes) ... I'll wait for Eric to provide an updated version with the fix.
A great addon, well written, congratulation to Eric.
I would have however a few suggestions on future releases:
1. google_conversion_format, google_conversion_color and google_conversion_label are hardcoded - should be editable from admin
2. Beside checkout_success, to track eventually user signup and/or newsletter subscribers (helpful if you have adwords on)
3. I think that is no need anymore for the old urchin and ga code. I would clean up the file eliminating the code leaving only the async type. This way this addon would be a truly plug & play, no hacking would be necessary to any template file.
I've made some of these modification to my site and the addon is working great.
Where did you find the fix, please? I've been fighting with this all morning.
My GA numbers seemed to be fine after the upgrade, but they've slowly dropped 'till they are showing ZERO visitors...despite the fact I have plenty of people online, and am getting business-as-usual.
So I downloaded this and installed it, but now there's nothing in the configuration menu; so I'm at a dead end.
Nearly ALL add-ons will need to be upgraded in order to work with Zen Cart v1.5.. This is an easier task for some add-ons than others, and Eric is being cautious to make sure that any "quick fixes" posted do not cause and PCI compliance and security issues.. So be prepared to wait through this process prepare to continue to be "surprised".
I'm still using zen cart v1.3.9h, but have latest version of this mod installed.
I wander whether it is installed properly though as I dont get any options for custom variables, as per http://www.zen-cart.com/forum/showth...t=52145&page=4:
An screen grab is attached.Quote:
1) Ecommerce transactions
2) Goals / Funnels
3) Standard Google Analytics informtion
4) Adwords Conversion Tracking
5) any other custom variables you want to include in your tracking code (by using the 'custom tracking' section of my mod.)
Also, although in google analytics it shows products purchased, etc. under Conversions > Ecommerce, i cant see any info about keywords used, etc. as per info that you posted here http://www.zencartoptimization.com/2...sion-tracking/, specificallyDo i find this info on google analytics, or in my adwords account?Quote:
"Conversion Tracking reports things such as How effective your Adwords ads are”, “which actual keywords convert to sales, and which just cost you money”, “overall conversion rate for a campaign, ad, or group of keywords”, and more
I found how to check which keywords are associated with purchases in google analytics, but still not sure if module is installed correctly, as per above...
Okay, so this may already have been covered however I cannot find any other reports of the exact issue that I am experiencing.
I have a fresh zen 1.50 installation with a brand new database to match. I uploaded all 4 of the supplied files and made the edit to the core file as explained in the readme. No isses so far...
The problem occurs when I attempt to run the install.sql. I have tried to upload it in every way other than directly through phpmyadmin but whenever I try to install via admin I get the following message:
error: please refresh the page and try again!
I have never encountered this sort of error message before and am slightly confused.
I am currently running this site on a local server which may be the issue, however I have previously uploaded a lot of other .sql files without an issues....
Any ideas?
Thanks for this, Im trying to follow the above but im having problems finding the gID number.
I have no experiance of PHP but I have downloaded PHPmyadmin and have it up an running. However this is where im having trouble, am i right in saying i have to import the googleanalytics-INSTALL.sql and run the query:
SELECT `configuration_group_id` FROM `configuration` WHERE `configuration_title` like '%google%' LIMIT 1;
When i try and import googleanalytics-INSTALL.sql i get the following error:
Error
SQL query:
SELECT (
@t4:= configuration_group_id
) AS t4
FROM configuration_group
WHERE configuration_group_title ='Google Analytics Configuration';
MySQL said:
#1046 - No database selected
What am i doing wrong?? Please help!! :frusty:
this module still puts the ga code just before the </body> tag
these days, google specifically advises:
i wander whether this will cause problems now or in future?Quote:
Copy the following code, then paste it onto every page you want to track immediately before the closing </head> tag
This won't cause any problems and shouldn't in the future. Google recommends that (as they state) but so long as it is in the header part of the site you're ok (they are looking to load it prior to the rest of the page loading.)
The newest version here removes the code at that point and instead dynamically inserts it above the </head>. There is no need to alter the html_header.php file anymore.
If you still show the code at the point above the </body> tag then you likely upgraded from a previous version and at that time did not remove the lines in the 'html_header.php' file (as per the instructions.)
Let me know if that clears it up for you.
You should be able to run the script by copy and pasting it into the Admin (sqlpatch) portion of zen cart.
If you run it from phpMyAdmin you'll need to take note of any table prefixes you may have for your zen cart installation and then manually include those in the SQL script for it to run properly.
If you want to use Custom Variables you'll need to set those up yourself and include them in an 'custom' tracking at the end of the tracking code. The box in this contribution enables you to set any type of custom variable you wish (per google instructions) and those will show up within your Google Analytics reports (if you have set them up correctly.)
I was trying to install this addon and I have killed my admin! The site still runs, but I cannot access my admin - This happened after I ran the admin configuration - I filled in all the boxes, clicked update and the site died. Any help? I backed up my DB before, and I restored it, but admin area is still dead. Here's my admin address:
http://www.goldenapplels.com/shop/gazadmin/
Okay, I got it back by trashing all the files from this add-on. Maybe I'm missing something but the read me for this add-on has nothing about the 1.5 modifications - is there an up to date readme? Combing through the forum for updates doesn't seem to be the best way to install this mod.
I took another crack at this, and managed to get much further. It would be great if a sticky was created with additional info for installing on 1.5 - the admin configure is an important part! My site works, but I'm now stuck on configuring. Under configure, Google Analytics is the first item ( I should have changed the sort order) but when I select it, it goes to Store. I can't get to the configure. I would change the sort order, but I don't know where that is. Stuck again, but my site isn't down!
Okay - I fooled it by putting the Gid=XX in the menu bar and it took me to the SGA configure screen! Now everything is working so I love this, but it was a rocky start!
see my post directly above - I was able to find the Simple Google Analytics Config page by loading another config page (for example: Images) - note the URL, find where it gives it's id (gID=4) and then paste in your gID=xx that identifies where you placed SGA. It should go right there.
For those of you who are having problems installing this module on zen cart v1.5.0
I Fixed the googleanalytics-INSTALL.sql,
googleanalytics-UNINSTALL.sql and the UPGRADE-toversion-1-2-4.sql.
Added a define to admin/includes/extra_datafile /google_analytics_database_names.php
so it would be compatible with zen cart v1.5.0. It will now show under the admin/configuration menu. I uploaded the update to the downloads area waiting on approval fron the zen team.
econcepts I hope you didn't mind, I see a lot of people were having issues with this. If I jump the gun you can roll it back.
ZC 1.39g
I think I'm doing something wrong.
I've placed the Google snipet into public_html/includes/templates/My TEMPLATE/common/tpl_checkout_success_default.php
I placed it at the bottom of the page, looks like this:
I haven't been seeing any Conversion Data so I followed the instructions from Google to verify the snipet.Quote:
<!-- Google Code for purchase Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = MY ID # IS HERE;
var google_conversion_language = "en";
var google_conversion_format = "2";
var google_conversion_color = "383e44";
var google_conversion_label = "CONV.LABEL IS HERE";
var google_conversion_value = 0;
/* ]]> */
</script>
<script type="text/javascript" src="https://www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="https://www.googleadservices.com/pagead/conversion/MY ID # IS HERE/?label=CONV.LABEL IS HERE&guid=ON&script=0"/>
</div>
</noscript>
I went through the purchase process on my site and when I got to the Success Page I used the View Page Source feature of my browser and did not see the snipet on the page.
So what did I do wrong?
Did I simply put the snipet on the wrong page?
Anyone?
Hi,
Sorry if this was already asked...
I just installed the latest version 1.5. Is there a way to use it just for Google Conversion Tracking and NOT for Google Analytics?
Thanks,
Susie
Ok, first, thanks for the great add-on!
Background: I am using v1.3.9. I installed the mod, and I can see the config menu in my Admin area. I have entered my UA code properly.
I have 2 problems, which I suspect are connected:
1. The Google Analytics code is not showing up on my pages. I checked in the <head> and at the bottom of the page as well.
2. I just noticed that my pages do not have a closing </body> tag.
I'm a little fuzzy on PHP, and I usually don't modify anything unless I have to. So, I'm not sure if the missing tag is causing the problem, or where to add it back in.
Does anyone have thoughts on this?
Any help is much appreciated!
Ok i have installed version 1-2-5b.
Install went without a hitch and everything seems to be working.
However one thing that is baffling me
i entered my ua-xxxxxx thingie in the admin bit, now when i look at the page source of my catalog the ua-xxxxxx is completely different is this normal.?
All good now, found the tpl_main_page.php wasn't updating (ownership or something) and the version on the server contained someone elses failed attempt at manually installing the tracking code with the wrong tracking code, thats the downside to taking over a store that someone else has worked on.
Hello--I must have had an earlier version that I lost the page code on during an upgrade because when I uploaded the folders it overwrote files from 2008. But I don't see any tables for the sql file in myPHPadmin. Should there be if I did in fact install a previous version?
Having problems with this installation. Never installed google analytics before and was going to install this version on my new 1.5. site. Didn´t have a tpl_main_page.jsp file in my template, so I copied one from my template_default. Copied the analytics package files under ver. 1.5. to my site.
I then went on to my admin area, tools - install sql patches.
Choose the googleanalytics-INSTALL.sql file for upload (the instructions in the package say googleanalytics.sql patch, but the package includes no such file.
The I hit upload, but all I got was:
WARNING: An Error occurred, please refresh the page and try again.
Any tips on what can be wrong? I am running my site on mac mini lion server.
Thanx!
Man, I just installed the new 1-2-5-b version, and I am still not seeing the Google Analytics code on the source of any of my pages.
I even tried uninstalling and reinstalling the SQL patch.
Any ideas on what is going on?
I am using v1.3.9h
:frusty:
How do I uninstall Simple Google Analytics? I must have put it in the wrong location as I am getting *failed to open* messages
thanks
its ok, I found the uninstall file.
ok-I took a chance and assumed I had chickened out on running the sql the first time and ran it now...working fine. Now I just need to figure out how to get GA into the subfolder our zencart shopping cart is in.
I am using Sequel Pro for my db admin. I imported the script, but got the following errors:
[ERROR in query 19] 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 'TYPE=MyISAM' at line 8
[ERROR in query 20] Table 'altikost.google_analytics_languages' doesn't exist
[ERROR in query 21] Table 'altikost.google_analytics_languages' doesn't exist
[ERROR in query 22] Table 'altikost.google_analytics_languages' doesn't exist
[ERROR in query 23] Table 'altikost.google_analytics_languages' doesn't exist
[ERROR in query 24] Table 'altikost.google_analytics_languages' doesn't exist
[ERROR in query 25] Table 'altikost.google_analytics_languages' doesn't exist
[ERROR in query 26] Table 'altikost.google_analytics_languages' doesn't exist
[ERROR in query 27] Table 'altikost.google_analytics_languages' doesn't exist
[ERROR in query 28] Table 'altikost.google_analytics_languages' doesn't exist
[ERROR in query 29] Table 'altikost.google_analytics_languages' doesn't exist
[ERROR in query 30] Table 'altikost.google_analytics_languages' doesn't exist
[ERROR in query 31] Table 'altikost.google_analytics_languages' doesn't exist
[ERROR in query 32] Table 'altikost.google_analytics_languages' doesn't exist
[ERROR in query 33] Table 'altikost.google_analytics_languages' doesn't exist
[ERROR in query 34] Table 'altikost.google_analytics_languages' doesn't exist
[ERROR in query 35] Table 'altikost.google_analytics_languages' doesn't exist
[ERROR in query 36] Table 'altikost.google_analytics_languages' doesn't exist
[ERROR in query 37] Table 'altikost.google_analytics_languages' doesn't exist
[ERROR in query 38] Table 'altikost.google_analytics_languages' doesn't exist
[ERROR in query 39] Table 'altikost.google_analytics_languages' doesn't exist
[ERROR in query 40] Table 'altikost.google_analytics_languages' doesn't exist
[ERROR in query 41] Table 'altikost.google_analytics_languages' doesn't exist
Anyone who knows why?
The reason you are having the error is because of the database engine TYPE=MyISAM. Copy and insert this sql statement and the error should not show any more.
PHP Code:
SET @t4=0;
SELECT (@t4:=configuration_group_id) as t4
FROM configuration_group
WHERE configuration_group_title= 'Google Analytics Configuration';
DELETE FROM configuration WHERE configuration_group_id = @t4 AND configuration_group_id != 0;
DELETE FROM configuration_group WHERE configuration_group_id = @t4 AND configuration_group_id != 0;
INSERT INTO configuration_group VALUES (NULL, 'Google Analytics Configuration', 'Set Google Analytics Options', '1', '1');
UPDATE configuration_group SET sort_order = last_insert_id() WHERE configuration_group_id = last_insert_id();
SET @t4=0;
SELECT (@t4:=configuration_group_id) as t4
FROM configuration_group
WHERE configuration_group_title= 'Google Analytics Configuration';
#INSERT INTO configuration VALUES ( NULL, 'Use Older "urchin.js" Tracking Code', 'GOOGLE_URCHINTRACKING_ACTIVE', 'No', 'This enables you to select which type of tracking code to use (either the older "urchin.js" version or the newer "ga.js" version. By default the system now uses the newer "ga.js" code.<br><br><span style="color:#ff0000;font-weight:bold;">Important Note:</span> There are hundreds of reports across the Internet of ecommerce tracking not being exactly correct when using the new "ga.js" tracking code Google released.<br><br>It <strong>has been confirmed</strong> by Google that the problem is on their end. They are working on the issue and a fix is supposed to be out for the new "ga.js" code near the first week in April 2008.<br><br>Until then, if you want to get more accurate ecommerce tracking results, use the older "urchin.js" tracking code. To revert back tothe older urchin.js code, set this opotion to "Yes" temporarily (meaning you will actually be using the older "urchin.js" tracking code). When Google issues the fix you can then easily switch back to the new "ga.js" tracking code by setting this option to "No".<br><br>For more hints and tips on how to use Google Analytics to increase sales from your store, visit <b><a href="http://www.zencartoptimization.com" target="blank">ZenCartOptimization.com</a></b><br><br><b>Do you want to use the older "urchin.js" tracking code?</b><br>', @t4, 5, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''Yes'', ''No''), ');
INSERT INTO configuration VALUES (NULL, 'Analytics Account', 'GOOGLE_ANALYTICS_UACCT', 'UA-XXXXXX-X', 'This number is the unique id you were given by Google when you registered for your Google Analytics account.<br><br>For more hints and tips on how to use Google Analytics to increase sales from your store, visit <b><a href="http://www.zencartoptimization.com" target="blank">ZenCartOptimization.com</a></b><br><br><b>Enter your Google Analytics account number (starting with the "UA-") in the space provided below.</b><br>', @t4, 1, NOW(), NOW(), NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Target Address', 'GOOGLE_ANALYTICS_TARGET', 'customers', 'This element is used in conjunction with Google E-Commerce Tracking. It indicates how you want your "transactions" to be identified in your Analytics reports.<br><br>Addresses consist of City,State, and Country.<br><br>This information can help you determine locality of orders placed, shipped to, or billed to.<br><br>For more hints and tips on how to use Google Analytics to increase sales from your store, visit <b><a href="http://www.zencartoptimization.com" target="blank">ZenCartOptimization.com</a></b><br><br><b>Which address type do you want to use for recording transaction information?</b><br>', @t4, 2, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''customers'', ''delivery'', ''billing''),');
INSERT INTO configuration VALUES (NULL, 'Affiliation', 'GOOGLE_ANALYTICS_AFFILIATION', '', 'This <b>optional</b> tracking element is used in conjunction with Google E-Commerce Tracking.<br><br>The Affiliation tag describes the affiliating store or processing site.<br><br>It can be used if you have multiple stores (or web sites) in various locations and is used to track from which location a particular sale originated.<br><br>For more hints and tips on how to use Google Analytics to increase sales from your store, visit <b><a href="http://www.zencartoptimization.com" target="blank">ZenCartOptimization.com</a></b><br><br><b>If you have one, enter your optional partner or store affiliation in the space provided below.</b><br>', @t4, 3, NOW(), NOW(), NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Use sku/code', 'GOOGLE_ANALYTICS_SKUCODE', 'products_id', 'This tracking element is used in conjunction with Google Analytics E-Commerce tracking.<br><br>It enables you to track which products perform better than others using either the Product ID, or the Product Model Number as a unique identifier.<br><br>For more hints and tips on how to use Google Analytics to increase sales from your store, visit <b><a href="http://www.zencartoptimization.com" target="blank">ZenCartOptimization.com</a></b><br><br><b>Indicate which identifier you want to use to track product performance by selecting one of the options below.</b>', @t4, 4, now(), now(), NULL, 'zen_cfg_select_option(array(''products_id'', ''products_model''),');
INSERT INTO configuration VALUES (NULL, 'Activate Adwords Conversion Tracking', 'GOOGLE_CONVERSION_ACTIVE', 'No', 'This element enables you turn on or off Google Conversion Tracking.<br><br><span style="color:#ff0000;font-weight:bold;">Please Note:</span> Conversion tracking is used to track the effectiveness of Google AdWords paid search campaigns. If you are <b>not</b> running any paid search campaigns, then you should leave this set to "No".<br><br>If you are running Google AdWords (paid search) campaigns, then turning this on will place the proper conversion tracking code on your checkout success page and enable you to start tracking conversions.<br><br>Turning this on <b>requires you</b> to enter your unique Google Conversion Tracking ID in place of the "XXXXXXXXXXX" number shown in the next section.<br><br>For more hints and tips on how to use Google Analytics to increase sales from your store, visit <b><a href="http://www.zencartoptimization.com" target="blank">ZenCartOptimization.com</a></b><br><br><b>Do you want to turn on Google AdWords Conversion Tracking?</b><br>', @t4, 5, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''Yes'', ''No''), ');
INSERT INTO configuration VALUES (NULL, 'Google AdWords Conversion Tracking Number', 'GOOGLE_CONVERSION_IDNUM', 'XXXXXXXXXX', 'If you activated Conversion Tracking in the previous section, then you <b>must</b> enter your unique Google Conversion Tracking ID in place of the "XXXXXXXXXXX" shown in the space provided below.<br><br>If you have activated Conversion Tracking, and do not enter your number below, tracking will not work.<br><br>For more hints and tips on how to use Google Analytics to increase sales from your store, visit <b><a href="http://www.zencartoptimization.com" target="blank">ZenCartOptimization.com</a></b><br><br><b>Enter your AdWords Conversion Tracking ID Number below.</b>', @t4, 6, NOW(), NOW(), NULL, NULL);
INSERT INTO configuration VALUES (NULL, 'Google AdWords Language', 'GOOGLE_CONVERSION_LANG', 'en_US', 'Select the language to be used. The default is "English US".<br><br>For more hints and tips on how to use Google Analytics to increase sales from your store, visit <b><a href="http://www.zencartoptimization.com" target="blank">ZenCartOptimization.com</a></b><br><br><b>Select your language below</b><br>', @t4, 7, NOW(), NOW(), NULL, 'zen_cfg_pull_down_google_languages(');
INSERT INTO configuration VALUES (NULL, 'Google Tracking Code Type To Use', 'GOOGLE_ANALYTICS_TRACKING_TYPE', 'ga.js', 'Select the type of tracking you wish to use. The default is the "ga.js" style. You have the ability to change this to either the older Urchin code or the newest Asycronous tracking code. Visit the <a href="http://code.google.com/apis/analytics/docs/tracking/home.html" target="_blank">Google Analytics Website</a> for more information on each.<br><br>For more hints and tips on how to use Google Analytics to increase sales from your store, visit <b><a href="http://www.zencartoptimization.com" target="blank">ZenCartOptimization.com</a></b><br><br><b>Select your tracking preference below</b><br>', @t4, 8, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''ga.js'', ''Urchin'', ''Asynchronous''), ');
# INSERT INTO configuration VALUES (NULL, 'Add Custom Tracking Before Main Analytics Code?', 'GOOGLE_ANALYTICS_CUSTOM_BEFORE', 'Disable', 'Do you want to include any custom tracking before the main tracking segment?', @t4, 9, now(), now(), NULL, 'zen_cfg_select_option(array(''Enable'', ''Disable''),'), (NULL, 'Google Custom Code - Before', 'GOOGLE_ANALYTICS_BEFORE_CODE', 'Please copy and paste or add your custom tracking here.', 'Insert custom tracking code', @t4, 10, now(), now(), NULL, 'zen_cfg_textarea(');
INSERT INTO configuration VALUES (NULL, 'Add Custom Tracking After Main Analytics Code?', 'GOOGLE_ANALYTICS_CUSTOM_AFTER', 'Disable', 'Do you want to include any custom tracking after the main tracking segment? This can be used to customize the tracking code to your individual needs. Adding tracking objects according to the details on the <a href="http://code.google.com/apis/analytics/docs/tracking/gaTrackingCustomVariables.html" target="_blank">Google Analytics site<a/>. ', @t4, 11, now(), now(), NULL, 'zen_cfg_select_option(array(''Enable'', ''Disable''),'), (NULL, 'Google Custom Code - After', 'GOOGLE_ANALYTICS_AFTER_CODE', 'Please copy and paste or add your custom tracking here.', 'Insert custom tracking code', @t4, 12, now(), now(), NULL, 'zen_cfg_textarea(');
#################################################################
# Add Table for Language support with Google Conversion Tracking.
#################################################################
#
# Table structure for table 'google_analytics_languages'
#
DROP TABLE IF EXISTS google_analytics_languages;
CREATE TABLE google_analytics_languages (
languages_id int(11) NOT NULL auto_increment,
name varchar(50) NOT NULL default '',
code char(10) NOT NULL default '',
sort_order int(3) default NULL,
PRIMARY KEY (languages_id),
KEY idx_languages_name_zen (name)
);
# --------------------------------------------------------
#
# Add data to new google language table
#
INSERT INTO google_analytics_languages VALUES (NULL,'Chinese (simplified) - ???','zh_CN',1);
INSERT INTO google_analytics_languages VALUES (NULL,'Chinese (traditional) - ???','zh_TW',2);
INSERT INTO google_analytics_languages VALUES (NULL,'Danish - Dansk','da',3);
INSERT INTO google_analytics_languages VALUES (NULL,'Dutch - Nederlands','nl',4);
INSERT INTO google_analytics_languages VALUES (NULL,'English (Australia)','en_AU',5);
INSERT INTO google_analytics_languages VALUES (NULL,'English (UK))','en_GB',6);
INSERT INTO google_analytics_languages VALUES (NULL,'English (US)','en_US',7);
INSERT INTO google_analytics_languages VALUES (NULL,'Finnish - suomi','fi',8);
INSERT INTO google_analytics_languages VALUES (NULL,'French - Français','fr',9);
INSERT INTO google_analytics_languages VALUES (NULL,'German - Deutsch','de',10);
INSERT INTO google_analytics_languages VALUES (NULL,'Hebrew - ???','iw',11);
INSERT INTO google_analytics_languages VALUES (NULL,'Italian - Italiano','it',12);
INSERT INTO google_analytics_languages VALUES (NULL,'Japanese - ???','ja',13);
INSERT INTO google_analytics_languages VALUES (NULL,'Korean - ???','ko',14);
INSERT INTO google_analytics_languages VALUES (NULL,'Norwegian - Norsk','no',15);
INSERT INTO google_analytics_languages VALUES (NULL,'Polish - polski','pl',16);
INSERT INTO google_analytics_languages VALUES (NULL,'Portuguese (Brazil) - Português (Brasil)','pt_BR',17);
INSERT INTO google_analytics_languages VALUES (NULL,'Portuguese (Portugal) - Português (Portugal)','pt_PT',18);
INSERT INTO google_analytics_languages VALUES (NULL,'Russian - ???????','ru',19);
INSERT INTO google_analytics_languages VALUES (NULL,'Spanish - Español','es',20);
INSERT INTO google_analytics_languages VALUES (NULL,'Swedish - Svenska','sv',21);
INSERT INTO google_analytics_languages VALUES (NULL,'Turkish - Türkçe','tr',22);
# --------------------------------------------------------
INSERT INTO admin_pages (page_key,language_key,main_page,page_params,menu_key,display_on_menu,sort_order) VALUES ('configGoogle_Analytics','BOX_CONFIGURATION_GOOGLE_ANALYTICS','FILENAME_CONFIGURATION',CONCAT('gID=',@t4), 'configuration', 'Y', @t4);
I have started another thread under the general questions, but perhaps my post would fit better here since my issue seems to be caused by this module ...
I set up the zen cart integration for Jrox as described. When I test with an order the checkout_success page appears blank. No commission is recorded in Jamjrox.
I have checked the debug and it shows the following errors.
So it would appear that google analytics interferes with the transaction. I am not sure why there a double slash between: checkout_success//google_analytics.phpQuote:
[31-Mar-2012 01:16:18] PHP Warning: require(includes/templates/premium8a/checkout_success//google_analytics.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /public_html/includes/templates/premium8a/common/html_header.php on line 141
[31-Mar-2012 01:16:18] PHP Warning: require(includes/templates/premium8a/checkout_success//google_analytics.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /public_html/includes/templates/premium8a/common/html_header.php on line 141
[31-Mar-2012 01:16:18] PHP Fatal error: require() [<a href='function.require'>function.require</a>]: Failed opening required 'includes/templates/premium8a/checkout_success//google_analytics.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /public_html/includes/templates/premium8a/common/html_header.php on line 141
On line 141 of the html_header.php mentioned above, the file shows as follow
Could someone please advise what I should do?Quote:
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
Thank you
If you are seeing the code on the page, it likely means when you copied the lines needed into your tpl_main page / header file (new versions don't require altering the header file) that you either did that incorrectly.
I noticed that when users were copy and pasting (older version) the lines of code to the header etc... (from the readme file) there was a section of code that was being pulled as well which looked like /* bof Simple Google Anlaytics egtc... (or something like that.)
If that is what you are seeing, then go back and remove that portion of the area you copied and pasted and you should be ok.
Let me know if that helps.
To get the two to work together checkout this post:
http://www.zencartoptimization.com/2...-the-workbook/
Scroll down to July 22, 2009 of the comments to see the instructions.
If you have any questions or problems post back here and I'll walk you through it (the instructions at the above link do that so they may be enough.)
It works great!! I've used the new code though, as indicated below:
http://jam.jrox.com/docs/index.php?article=111
Thanks so much econcepts!
Yeah... Eric is one of the most useful guys around for these taxing issues. He's a real gem and I respect him tremendously...
Eric, first off: hats off to a wonderful mod. It installed clean and gives me everything I need...for google.
I've searched this thread and read your post about adding Bing code to the tpl_mainpage, using a "if, then" statement. I've looked all thru this thread and can't find exactly what to add. I have the code from Bing AdCenter, and could just slap in down on the bottom of the page, but with your mod working so wonderfully I don't want to screw it up in any fashion.
Could you provide the code that's needed and I could then paste the AdCenter code where appropriate?
Thanks in advance,
swjake
It seems like we are not recording adwords conversions, so I am looking at the script, trying to figure out what is going on.
In google_analytics.php check out lines 253, 259 and 273. Are those as intended? It looks like each has a loose ' to me.
Hi Eric, thanks for responding! I think you misunderstood what I was saying... I do not see the GA code in the source code of my pages. I should see it there, correct? I've tried reinstalling the module twice. As, I've said before, the admin portion worked, as I can see config panel.
If you, or anyone, has a moment to take a look, I could PM you a link to my beta site.
Hi,
I am currently upgrading from 1.3.9h to 1.5.
I know I need to uninstall SGA but do I do this by running the uninstall sql patch in the admin? Then upgrade to the new version and update my database?
Also - I can't see whether SGA will work with 1.5 infact I can't see it in the addon list :shocking:
Thanks,
Cat
Well this seems pretty clear to me.. :shocking:
http://www.zen-cart.com/index.php?ma...=Simple+Google
Catattack,
The Simple Google Analytics add-on module is most definitely still in the add-on list.
The latest update appears to be by Countrycharm from Post #1766 in this thread, as it is dated 2/28/12, which is approximately when her proposed upgrade for Zen-Cart version 1.5 was approved.
I have had an issue going on for a while now, that my Google Analytics stopped working for one of my websites, while a site which was essentially the same basic programming remained active in the Google Analytics website.
I thought it could have been due to the fact that I had a test site in the www\ directory which I put down for maintenance, so I took it out of the down for maintenance condition.
However, it has been several months now and still Google Analytics does not work.
If I "view source" I cannot see the Simple Google Analytics code on one site, but I can on the other.
However, the includes/templates/mytemplate/common/tpl_main_page.php and ...common/html.header.php templates look exactly the same with respect to the code, for both of my sites.
I tried re-uploading the above pages, as a form of "redoing" the page, but that made no difference.
Does anyone have a suggestion on what I should do? I thought of deleting my test site completely (at www.g o k a r a o k e m a c h i n e.com/w a m p c o p y t e s t and asking Google to index my site, but would rather know what happened, and I feel that would be a "shot in the dark" to destroy the test site without knowing if it is a relevant step to take.
After all, I can't see the code in "view source" on the non-working site.
If anyone has a suggestion, thank you. The site that works is, with spaces so that searches on the web won't find this post, www.m u s i c s t u d i o s t o r e.com and the site that does not show the Simple Google Analytics code is www.g o k a r a o k e m a c h i n e.com.
I plan to upgrade to 1.5, but I would like to get this issue resolved first, if possible.
Thanks.
Notageek
I have now....lol If was probably me also. I just didn't change Eric name.
Nothing has change since 1.2.5b. All I did was create a upgrade file structure and upgrade instructions. I did update the googleanalytics-INSTALL.sql since TYPE=MyISAM is deprecated so it want cause any problems in the future.
Since I updated this I change the version number to 1.2.5c. The zen team asked to do this so they will know something has change.
Ahhhh.. well that's a tad confusing..:huh::blush: Thanks for clearing that up for me..:smile: Though in giving this some thought, I have made two add-on submissions under the author's name, but I did let the author know about this and the changes I was making so that he wouldn't be surprised if he was asked about the update.. :yes:
Personally I wish the add-on submission wouldn't allow this, and I thought they were changing it to prevent that.. (submissions in someone else's name)
They should"t allow it in my opinion but I did say
And I still stand by that. If Eric want s to change it back his welcome to. I didn't want to take no credit or step on his feet here. My name is on the new submission I made. I will change it back though.