I've installed this and even pasted in an extra javascript into the main page header. I can see the script when I look at the source. But why doesn't google pick this up? http://www.fine-wine-shop.com
Thx - any help much appreciated.
Printable View
I've installed this and even pasted in an extra javascript into the main page header. I can see the script when I look at the source. But why doesn't google pick this up? http://www.fine-wine-shop.com
Thx - any help much appreciated.
You've got the code actually showing two times in your footer (it should only show one time). I do not see it in the header anywhere. There should be no need to paste any extra javascript into the header to use this module. It does that for you using overrides. Just install and go.
When you say Google does not pick it up, what exactly are you referring to? Is it still saying "not verified" as in it can't verify the code exists? There are many things that can cause that all relating to how and where you tell Google (form within your Google account) to search for the code. Google can be very picky at times with trailing slashes for example in urls.
I found this post because I was having the same problem with the quick order page and I know what is happening. Look below for my solution.
The file is not placed in the wrong area. It is in template_default/google_analytics/ folder, and with the override system of ZC it doesn't need to be copied to any other template unless you want to make changes to the code in the file.
The problem is with the installation instructions where it states to put in this line in the tpl_main_page.php page
the problem is in the use of just ".php" it needs to be changed to 'google_analytics.php' to work properly on the quick order form. I figured this out by searching for the get_template_dir function and found other places where it was used and did use (always used) the full name of the file needed.Code:require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
the way that the get_template_dir works is that it looks to see if the file exists in this order
1)current_template/currentpage/ folder
2)template_default/currentpage/ folder
3)current_template/$template_dir(google_analytics)/ folder
4)if nothing else matches then return template_default/$template_dir(google_analytics)
with the instructions the way they currently are in the analytics contributions, the get_template_dir will return true at number 2 and returns template_default/quick_order/ because file_exists says that the folder is valid since an improper filename was given and just checks the directory, which then falls back to the tpl_main_page and gets concat'd with "google_analytics.php" which isn't found.
So change ".php" to 'google_analytics.php' for it to work properly all the time.
Hope this helps.
ALL
Thanks, that's what it was for me too. Great mod. All the best.
N
Wow Im pulling my hair out....
Installed the latest Simple Google analytics mod from the downloads page..
Im running 1.3.7. All installed ok, works fine in admin... code shows on pages if i view source.
The code shows up on my hompage with the correct user number thing... not xxx
its just before the </body> tag.
I have the url in my google to http://www.domain.co.uk/ (with the final trailing slash)
When i try to check the code is installed from google i get :
The Google Analytics tracking code has not been detected on your website's home page.
Was there ever an answer to this??? Can anyone help?
Bump... anyone?
Phil,
Check your PM. I just sent you a private message in response to yours that may help. In most of these cases the inability of Google to verify or not verify code usually (but not always) falls on the url you are asking Google to verify it at (if the tracking code is in place ... which yours looks to be.)
Hi there, just to help anyone else that has this...
Its been 23 hours now since i set this up, and I have set it up correctly... everything is done correctly... url is correct with trailing /, code is correct etc etc.
My analytics reports are showing results now... even though google say they cant detect the code so I am assuming its just a problem with google.
Thanks for your help guys... Im gonna try to install the yahoo search ppc tracking now!
I have the same problem...did you change anything?
Steve
Hi there no... even now after 48 hours google say they cant detect the code... but the analytics is working nicely....
:blink:
Ok here is a question...
I want to set up a funnel to track buyers through my checkout flow all the way to the thankyou page (my goal)
I use 3 3rd party payment processors....
Paypal express checkout module, google checkout module, and nochex....
Paypal and google leave my site straight from the shopping cart and miss out most of the zen account fuss.
I see you can add code to track 3rd party payment processors, changing the links etc... but this is starting to look like a LOAD of hassle!??
It is possible... have you done it??
I use not only Google AdWords but also Yahoo Search Marketing and Microsoft AdCenter PPC.
I want to make sure I am able to track conversions for both those advertising channels as well and I'm not sure how to go about that.
I've searched this thread but I'm still confused. I don't think I want to use Google's cross-channel tracking as is mentioned in this thread because I use a different URLs for my keywords and I *think* that means it would be very difficult for me to setup inside AdWords.
Basically I'd be happy knowing where to stuff the Yahoo and Microsoft javascript code ... I would like to track order value as well.
Any help?
Guys here is a link to an article I wrote addressing this issue. I researched it on the internet a while back and found that there is no rhyme or reason for it. The link to the article is here:
http://www.zencartoptimization.com/2...ting-for-data/
Hope it helps.
I use Goals and Funnels on ALL sites I run. Zen Cart included. The data that reporting provides plays an important role in determining where problem spots may be.
Hhaving said that, there is no easy way around setting up funnels and goals.
You have to have use the proper url of each page you want to track during the process with the end result being the "goal". You also have to make sure you set the proper "Match Type" from within your Funnel or the recorded data will be inaccurate.
The Google Analytics Workbook in my signature shows an exact "copy and paste" example of exactly how you would do this for Zen Cart sites (and it works for others as well).
Keep in mind that if you are using third party processors, there will be no way to track them once they leave your site to pay (as in the case of Google Checkout or PayPal IPN). There will also be no guarantee that the action will track properly as in each of these cases, the users must "complete" the transaction by usually clicking a link on the "thank you" page of the third party processor (PayPal or Google).
Upon clicking that link, they are taken back to your site (the checkout success page) and providing you have the correct url setup as your goal, the action is actually recorded.
So what does this all mean? Well, it means that more than likely you'll have to get creative in reading what your funnel is telling you because right around the point at which the user is taken away from your site and to the third party processor, it will look like they abandoned the checkout process in your funnel.
In fact, they may not have. They may have paid and completed the transaction.
So, be careful not only in how you setup goals and funnels, but how you read them as well.
I track all three on most of my sites (Google, Yahoo, and MSN). You can install the Google Tracking Module (Simple Google Analytics) and still install the Yahoo, and MSN tracking codes.
The key is, you will have to manually insert the Yahoo and MSN codes into the proper pages for them to work. And furthermore, if you want to dynamically include order totals etc.. into the mix, then you'll have to custom code that using PHP.
Finally, you'll want to make sure you account for both Secure and Non-secure connections, and dynamically utilize the proper tracking code based on that (https:// vs. http://). I like to use the standard PHP function to detect secure vs. non-secure connections to do that.
The file you'll want to add the information to are the tpl_main_page.php page (within your custom directory). I don't even include it on the checkout success page because I try to keep the code in the fewest locations.
What I do is create an if then statement that I include on the tpl_main_page.php page. It dynamically checks the page name (to determine if it was a successful sale or not and therefore add the proper "conversion tracking code" if so) and also checks the https vs/ http connection to include that proper code. If you don't account for that, then users will get the old message "some things on this page are not secure ... do you want to continue?" and you don't want that as it can decrease conversion beyond all belief.
Hope that helps.
Thanks for the reply.... thats what I was worried about!...
I have paypal express and google checkout on the shopping cart page..... this would be the start of my funnel and like you say people who want to express checkout abandon my cart immediately!!!
I guess to be fair i cannot change the pages after this point if people chose to use these express checkouts anyway... and they are very good funnels anyway so not to worry.
However i can still change and track my checkout funnel, so that once people are in that i can see if they stay or go. Like you say it will seem as if alot of people abandon the cart when they chose express checkout...but dont worry....
I guess you could subtract from 'cart abandonments' your total express checkout payments to get an idea of who really abandoned at the cart page.
Shame it cant be done better...
It does help a lot Eric - thanks. I have one question regarding what you wrote though - you mention not including the code on the checkout success page and instead including it on tpl_main_page.php - that confuses me.
I think maybe you're saying you check the page's title to see if they're on the checkout success page? I don't understand though what the advantage of doing that vs. putting the code in the checkout success template itself.
Maybe since you mentioned you use the code for more than conversion tracking - goals, etc. you need the code in every page?
The tracking code must be on every page for it to work (in the case of Google Analytics). In the case of "conversion" tracking type codes (usually only appear on the "thank you" page), I check to find out what page is being called by the script (checkout_success) and if it is an order confirmation, I include that line of code onto the page.
I only use the tpl_main_page template so as to keep everything under "one roof". It's much easier to manage that way (I run numerous tracking scripts and affiliate programs that need to track sales). The other option is to include the code in the "footer" template. I use to do that, but found it works better for me (management wise) leaving it in only one file.
Here is a link to an older post on the way I do it.
http://www.zen-cart.com/forum/showpo...&postcount=255
So far I have to say google analytics has not been much use.
After the code detection errors... (they have emailed me to say they have problems at the moment) my ecommerce results do not display all my sales.
I think this is because I use a third party payment processor, if people dont click to come back to my site the code wont pick them up as a sale... As it is I have 7 sales yesterday, and google picks up 2...I guess somehow you need to add the tracking code to yur 3rd party payment processors...(this is becoming alot of work!)
It is still useful for track your adwords, and I guess with your sales report you can manually work out your sites conversion rate, but I am glad I am not paying for this.
Its important to track and measure you site yes... but to trust and act on inaccurate stats is not... make sure and be carefull that you have thought about and are happy with your stats before you act.
Phil,
Keep in mind that because Google Analytics is JavaScript based, even if you used an "on sight" processor, you could still see slight data inconsistencies in reporting. Why? Because being JavaScript based, any user blocking JavaScript, behind a firewall that does, etc... will not be tracked in your stats.
Google mentions this deep inside their help files.
What you were seeing though was quite different obviously.
Hey all thanks for this mod first of all it's great!
I installed it everything went fine didn't get any error. I did install the sql through phpadmin but i reinstalled it again through the sql tool. But when I logged into my GA account the data doesn't seem to be updating. It' said Receiving Data with a Check. Did I install it wrong? I loaded my store up and thought it would count as a visit but it didn't show up on the GA report.
Thanks in Advance.
o wait i read a few pages back apparently it's not real time counter. guess ill have to wait and see if it's working.
Correct, GA is not a "real time" counter so you'll have to wait for it to update before any results will show.
Hi Guys,
I finally got this mod going, but now my product pages have a huge font size. Any idea why?
You must have done something else to another file during installation (or in changing something else on the site). This mod has no impact what so ever on any design styles.
I would look at what you may have changed elsewhere. It won't be the module unless you altered something else during install.
Thanks Eric. I've checked the stylesheet and it looks good. Any idea what other files might effect only the product page?
Sue
It definitely has to do with the stylesheet as it relates to that page.
here is that section of code on one of your pages (that displays the product description).
The part I highlighted in red bold above is what is causing your text to look larger. You need to either alter that class in your style sheet, or remove that portion of text from your product page template.Quote:
<!--bof Product description -->
<div id="productDescription" class="productGeneral biggerText"><p class="MsoNormal" style="MARGIN: 0in 0in 10pt"><font face="arial,helvetica,sans-serif">Two shades of pink cover this versatile lightweight reversible comforter.<span style="mso-spacerun: yes"> </span>Outline stitching.<span style="mso-spacerun: yes"> </span>Toddler girl bedding that is softer, warmer, and has a lighter weight fill; far more comfortable for your little one! <span style="mso-spacerun: yes"> </span>The pillowcase is a combination of dark and light pink.<span style="mso-spacerun: yes"> </span>The flat and fitted sheets and the pillowcase are a coordinating solid light pink with a light pink ribbon trim.<span style="mso-spacerun: yes"> </span><span style="mso-spacerun: yes"> </span>The fitted sheet is made to fit a toddler bed mattress (the same size as a crib mattress). <span style="mso-spacerun: yes"> </span>Perfect for any girls room! Check out the many accessories we carry that coordinate with the blue bedding.</font></p><p class="MsoNormal" style="MARGIN: 0in 0in 10pt"><font face="arial,helvetica,sans-serif">Toddler comforter set includes: Toddler comforter sized 42” x 58”.<span style="mso-spacerun: yes"> </span>Toddler percale sheet set includes: Flat sheet: 48” x 70”, finished.<span style="mso-spacerun: yes"> </span>Fitted sheet: 28” x 52” (fits crib sized mattress)<span style="mso-spacerun: yes"> </span>Pillowcase: 30” x 20”.</font></p><p class="MsoNormal" style="MARGIN: 0in 0in 10pt"><font face="arial,helvetica,sans-serif">Machine wash cold, gentle cycle. Tumble dry, low.</font></p></div>
<!--eof Product description -->
That should do it.
Well, in theory that should have worked. The bigger text is right....for the body text and heading. But I still have an issue the Nav bar, breadcrumbs and manufacturer labels. If I change them to look fine on the product page, they are tiny on the other pages. Thoughts?
The only thoughts I have are to check those pages and the stylesheet. The Google Analytics module doesn't impact any of those pieces. It might be a good idea to open up a new thread in a section on Zen that deals with layouts etc... (rather than in the Google thread here).
You might get a bit more info that way.
From my perspective I would say look at the stylesheet and files affected then work them accordingly to correct. Unfortunately since the Google module here plays no part in those, I can't give you any more info than what I already have.
Hi
I've downloaded the Simple Google files.
the installation readme says:
----------------------------
Installation Instructions
----------------------------
1. Upload the included files and directories to your zen cart install.
Can anyone tell me where in the massive zencart directory structure to put the files?
thanks
Drop them as is into the root directory of your zen cart install. There are no files to overwrite so you are safe to do that. It is a very quick install. Just take the entire admin folder and upload it to your server. It will place the files in the proper locations.
After that, all you have to do is add a few lines of code to one of your files (described in the readme) and you're all set.
Hmmm im am becoming increasingly sceptical of google analytics.....
Yesterday my site made 6 sales....
It is only promoted at the moment using adwords.... Under my adwords campaigns is says I made 2 conversions......
However under my ecommerce graph it says 0 conversions for yesterday (it has updated as it was yesterday)
I understand the the ecommerce part of the analytics is just for adwords? so how come the conversions show under the adwords, but dont under ecommerce...
Seems to me if you are going to make decisions from this to change your site be very very careful
I am trying to put Google Analytics mod on my site.
My site is www.raptorman.ca but I have that url forwarded to www.raptorman.ca/shop/
Is that why it wont work? I've done what the directions asked and it still wont track.
I'm not sure but that's a pretty ugly "forward":
I'm thinking you could mod_rewrite your root traffic to /shop for a cleaner way of doing it.Code:<HTML>
<HEAD></HEAD>
<FRAMESET ROWS='5000,*' FRAMEBORDER='no' BORDER='0'>
<FRAME SRC='http://www.raptorman.ca/shop/'>
<FRAME>
</FRAMESET>
</HTML>
Actually, Google Analytics can provide superior results and plenty of data to base decisions on. We have used it time after time to increase sales. The latest ... A site that we took from $0 in sales online and no web presence to over $350,000 in sales in just one year (11 months). It currently averages $50,000 in sales a month now and that continues to grow each month.
All decisions were based solely on data provided by Google Analytic reporting.
Installing analytics is one thing. Understanding and interpreting it is another. Many things are not clear cut in the analytic realm and some reports depend on data from others in order to show progress.
The e-commerce portion of Google Analytics is totally independent from Adwords tracking. You can operate it without ever running an Adwords campaign. You must have the e-commerce code in place (included in the module) and tracking codes in place as well for it to work.
To get Adwords data to work with Analytics, you must link the two together from within the Adwords interface or you will not get proper Adwords tracking when viewing Analytics.
No tracking system is perfect. I have used many (some that cost hundreds of dollars a month) and to be honest, all have some sort of data inconsistencies. It's unfortunate, but it's the nature of tracking on the internet.
Google Analytics is a free system that we have used with at least equal success to other "paying" tracking systems. And they continue to update it. Just recently (Oct. '07) they added even more reporting capabilities to help decision making.
In your case, I would check and compare what your analytics goal is set at vs. what you are calling a "conversion" in your Adwords campaign. I don't have access to that data, so I can't tell you one way or the other, but a comparison of those items that play into the conversion reporting may uncover what is causing the difference.
Just some thoughts. Hope they help!
I'm having this wierd issue where the google analytics SQL bit isn't being added to the site for configuration. I tried adding is usingthe ZC Admin SQL patcher, and things didn't show up right. I'm attaching two screenshots to help explain my problem. Notice there is no place for account number.
When I try to put in the SQL I get this message:
Quote:
1062 Duplicate entry 'GOOGLE_ANALYTICS_UACCT' for key 2
in:
[INSERT INTO tmlp_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 ('', '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.
For more hints and tips on how to use Google Analytics to increase sales from your store, visit ZenCartOptimization.com
Enter your Google Analytics account number (starting with the "UA-") in the space provided below.
', @t4, 1, NOW(), NOW(), NULL, NULL);]
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.
There was some kind of error with the SQL, and it didn't put the options in the configuration table correctly. Some kind of issue with the configuration_group_id. I got it working.
Just to wrap up...mine started working on its own.
Thanks for everyones help.
Glad you got it working.
Just for the record, I had a similar message when trying to install the Recover Carts mod on a site of mine recently. Identical message (different module).
I talked with DrByte on it and came to find out that it was due to the caching of Zen Cart. I ran the cache fix that can be downloaded from the Zen Cart downloads section, and all worked fine after that (able to install with no conflict).
I can't seem to locate that thread but if I find it, I'll post it here.
In case anyone else wants to know. :)
I have been reading this thread and gave up and decided to just ask my question since no one seems to have this problem. I am simply having problems uploading the sql altogether. I do a BROWSE, choose the file and upload. Nothing happens. And nothing shows up under Configuration. What am I doing wrong?
Is it safe to copy and paste it from an opened Word Doc?
Absolutely! That's what I had to do!
Thanks! Going to try that!
OKay, got everything up, but maybe the file is in the wrong place? I put it right in the zen cart folder. At the bottom of the page it says:
Warning: main(includes/templates/template_default/google_analytics/google_analytics.php): failed to open stream: No such file or directory in /home/diginirv/public_html/zen_cart/store/includes/templates/magic/common/tpl_main_page.php on line 181
Warning: main(includes/templates/template_default/google_analytics/google_analytics.php): failed to open stream: No such file or directory in /home/diginirv/public_html/zen_cart/store/includes/templates/magic/common/tpl_main_page.php on line 181
Fatal error: main(): Failed opening required 'includes/templates/template_default/google_analytics/google_analytics.php' (include_path='.:/usr/local/lib/php') in /home/diginirv/public_html/zen_cart/store/includes/templates/magic/common/tpl_main_page.php on line 181
See it at http://diginirvana.com/zen_cart/store
What have I done wrong? I can't tell what is going on in google analytics since I have been tracking the rest of the website for a while (I added the extra line in zen cart to show that zen cart is a subdirectory of my store).
I'm no expert but it looks like you've uploaded some files to the wrong directorys from the error you've got there.
Instead of uploading them to 'template_default' try changing the directory name to 'magic' which seems to be your template override and uplaod them again.
Craig
What files are you talking about? The main folder called Simple_Google_Analytics- I have dropped in a number of locations, but can't seem to figure out where it goes. It is currently sitting in public_html/zen_cart/store/includes/templates/magic.
Where am I suppose to put these files?
I would be very careful copying and pasting from any Word doc. Oftentimes too many "extra characters" are included that can cause things to go awry.
The better way is to copy and paste directly from the text file opened in a text editor like Notepad (not a word processing program like MS Word).
This error results from uploading the files to the incorrect locations.
Be sure to follow the instructions very closely. It should be a 30 second "drag and drop" to get it installed.
In your case, make sure that you uploaded the "google_analytics" directory (and associated files within it) to the proper location. That should solve your issue.
It is currently looking for that directory (which contains the files that are "included" on the page to make Analytics work) under your "template_default" location.
If that is your template (and you are not using a custom template) then it means you did not upload the "google_analytics" directory to the location specified (include/templates/template_default).
To correct, simply upload that entire directory to "include/templates/template_default" and you should see the error go away.
So, what it would look like when you are done is
"includes/templates/template_default/google_analytics"
If you are using a custom directory template (called "magic") then you should upload the directory to the following location
/includes/templates/magic/
So it would look like this when complete.
/includes/templates/magic/google_analytics
Viola :)
Thanks for the help everyone! The message is gone at the bottom, but only because I went back to check on line 181 and that was the lines I copied and pasted from the instructions for Step 2:
<?php
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
?>
I just deleted it. However, now I have the problem of not having google analytics recognized. My directory has been in the right place, so this is not the problem. Hmmmm. Any other suggestions? Thank you for your help on this!
Any chance this is going to be modified for the new Google Analytics code that was released this week? Google claims that using the new (non-urchin) code will allow some kind of better viewing of ecommerce transactions; I have it installed for all my clients except for two that use Zen Cart, and wasn't sure if it would be possible/easy to update the code there. We are using this module currently.
Google can't verify the code because by deleting those lines, you just removed the include statement that inserts the tracking code on your pages.
That line absolutely has to be in there for it to work.
I guarantee, the original problem you were seeing is due to not uploading all files to the proper locations.
My suggestion would be to go back and first remove everything you put in place for this mod. Then, reinstall carefully according to the instructions. Your problem was more than likely due to the "google-analytics" directory not being uploaded to the correct location (which contains the file that is "inserted" using the lines you removed).
Ok, I have read through this entire thread here and my issue seems to be a new topic. I have installed this mod on a fresh install of zen 1.3.8. I see that the tracking code is being generated in the catalog, however I do not find the admin config settings in the control panel to set my tracking ID. I have uploaded all the files to the correct directory. Not sure why I cannot see this option in the Admin panel.
It should be under Admin>Config>Google yes?
Am I missing something?
Can I add my tracking id manually?
Thanks
Rooster
Nevermind - I had have the admin profile module setup and I simply needed to turn that feature on.
Thanks Eric {BTW} I love your website and the eBooks, so much useful info.
I just set up a new site today and went to google and noticed the new script. for those who are wondering if it works in 1.3.8 YES it does,
If you are developing a mailing list for notification of this new mod, would you please include me?
JOhn ><>
Just jumped in here. Can I assume the new G code and the Simple Google Analytics mod like each other? BTW, Eric, your site won't resolve at this writing. I'll check back. Thanks.
I am having problems setting this up on my site. I am running the newest version of Zen Cart. I have done the following.
Created a Google Analytics account.
I download the google analytic mod. I checked the code in the file, /public_html/includes/templates/silverfish/common/tpl_main_page.php
Made sure that the body ID showed
<body id="<?php echo $body_id . 'Body'; ?>"<?php if($zv_onload !='') echo ' onload="'.$zv_onload.'"'; ?>>
Then added :
<?php
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
?>
Just before the </body>
Updated the .sql file for non-upgrate.
Changed the account # in the admin config
Uploaded the files included with the mod into my file structure.
Now, when I access Google Analytics, I get tracking code not detected.
I have my Analytics set for http://www.pinwest.net and the default page, index.php.
Any ideas ???
Thanks,
David...
The new G code and Simple Google Analytics WILL like each other (once I get this new version out).
The upgrade from this version to the next should be pretty simple.
Until then, you can use this version of Simple Google Analytics (which uses the previous "Urchin" tracking method and will be supported by Google for at least another year -- don't worry, my module will be out long before that with the updated code :).
Did you forget the trailing slash when telling Google where to verify code at?
You have to be careful at times with letting Google know the exact location.
Try reading through this post. It has some things to consider if the code shows as not detected. (One being the trailing slash).
http://www.zencartoptimization.com/2...gle-analytics/
Thank you very much. Figured out. My problem was that I copied the reg. code from the goggle site. Forget where I got it but the one I copied did not have the "-1" at the end therefore the activation code was incorrect. I found that when I check the code that goggle wanted me to enter into my site, the code had the -1 while the code I was using did not.
Thanks for the link, it did help me greatly.
David...
Hi,
Who knows what I did wrong, when I do get the normal analytics data, but the ecomerce keeps saying 0.00% conversion. Somehow the ecommerce things are not tracked, as I have had sales since I installed this.
(I had analytics running before I installed the module. And I have selected 'ecommerce site' in my analytics account. Also I can see the urchin code when I view source.)
I'm trying to install GA. I am at step 4 (updating database with sql file) This is what I received below. I have zen 1.3.7.1 and MySQL 4.1.22-standard-log. Anyone know what I did wrong. Keep in mind that I am clueless about all this stuff:blush:
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 'Yes', 'No'), ')' at line 1
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 ('', 'Activate Conversion Tracking', 'GOOGLE_CONVERSION_ACTIVE', 'No', 'This element enables you turn on or off Google Conversion Tracking.
Please Note: Conversion tracking is used to track the effectiveness of Google AdWords paid search campaigns. If you are not running any paid search campaigns, then you should leave this set to "No".
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.
Turning this on requires you to enter your unique Google Conversion Tracking ID in place of the "XXXXXXXXXXX" number shown in the next section.
For more hints and tips on how to use Google Analytics to increase sales from your store, visit ZenCartOptimization.com
Do you want to turn on Google AdWords Conversion Tracking?
', @t4, 5, NOW(), NOW(), NULL, 'zen_cfg_select_option(array('Yes', 'No'), ');]
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.
Thanks econcepts!
I'm still having problems. First I get this warning below on the bottom of my site and when I check my GA account it states that GA tracking hasn't been installed on my website. But I have done everything up to step step 5
This is fustrating:frusty:
Warning: main(includes/templates/template_default/google_analytics/google_analytics.php) [function.main]: failed to open stream: No such file or directory in /home/shamista/public_html/contagioushair/includes/templates/SexyPink/common/tpl_main_page.php on line 176
Warning: main(includes/templates/template_default/google_analytics/google_analytics.php) [function.main]: failed to open stream: No such file or directory in /home/shamista/public_html/contagioushair/includes/templates/SexyPink/common/tpl_main_page.php on line 176
Fatal error: main() [function.require]: Failed opening required 'includes/templates/template_default/google_analytics/google_analytics.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/shamista/public_html/contagioushair/includes/templates/SexyPink/common/tpl_main_page.php on line 176
It's telling you that it's looking for a specific file ... but can't find it.
Note the path and filename it's mentioning.
Use your FTP program and check to see if the file exists exactly as mentioned in the error message, as I've highlighted above for convenience.
... perhaps you missed uploading it somehow.
Thank you so much Dr. Byte!:clap: It is now finally working and Google says it's receiving data. I hope in the future that the installation instructions in mod contributions are a more "newb friendly" because when we follow instructions to a T and still run into problems, it get's a little discouraging.
I had Google Analytics working before (but e-Commerce never worked). I installed Simple Google Analytics and still have the same problem.
In my Zen Cart Admin, in the Google Analytics settings, target address is set to "Customers" (maybe it should be "billing"??) and I do have e-Commerce enabled in my Google Analytics settings.
I receive regular analytics data, but convesions always show as 0% even though I have made sales.
I also set up two goals, one for the shopping cart and one for checkout, and the shopping cart goal works and shows data but the checkout one does not.
I have "http://wyreworks.com/index.php?main_page=checkout_process" set as the page for the checkout goal, which i am pretty sure is correct. I am currently using PayPal IPN as my only method of payment (although if I can ever figure out how to get the shared secure server working with checkout I can add regular credit card processing as well, since I can take cards offline).
If anyone has any ideas how I can get e-Commerce working, I would be very grateful!! :)
This happened to me after installing Simple Google Analytics Mod
What is the proper SQL syntax to re-insert these 3 keys with their default values?
I have my backedup databased and can see the line they appear on, but the line is huge (when viewing with text wrap it's over 1000 lines of code)
I would prefer not to roll back to my previous database backup in it's entirety since multiple orders have been placed since then while I was figuring out what was causing the issues I was experiencing on the site (tracking back the problems to those 3 keys, searched and found this thread)
Any help is much appreciated
The portions of that line of code that seem pertinent to those keys are:
Code:(364,'Product option type Select','PRODUCTS_OPTIONS_TYPE_SELECT','0','The number representing the Select type of product option.',0,NULL,'2007-10-08 10:56:19','2007-10-08 10:56:19',NULL,NULL)
(370,'Upload prefix','UPLOAD_PREFIX','upload_','Prefix used to differentiate between upload options and other options',0,NULL,'2007-10-08 10:56:19','2007-10-08 10:56:19',NULL,NULL)
(371,'Text prefix','TEXT_PREFIX','txt_','Prefix used to differentiate between text option values and other option values',0,NULL,'2007-10-08 10:56:19','2007-10-08 10:56:19',NULL,NULL)
Did you activate "e-commerce tracking" within your Google Analytics account? Just installing tracking code is not enough. You need to inform Google that you wish to track e-commerce transactions from within your Analytics profile. Set the radio button to "yes" (I want to track e-commerce data).
A few questions.
1) What version of Zen are you running?
2) What other mods do you have installed (and were any others installed around the time you installed Simple GA?)
3) Are you certain the installation of the GA mod caused it?
Out of all the other users in this forum with the mod, there are only two that reported this (1 being you, and the other being surfnet7).
I have been unable to duplicate this on any install of Zen to date.
Let me know the above and we'll see if we can't get to the bottom of what may have caused it.
Hi... ok, here's what I have...
1) Zen Cart 1.3.7
2) yes, I have lots of other mods installed, and I've been working on the site a LOT in the last couple of weeks, so honestly I would have no idea if any of them are affecting Google Analytics. However, I only recently installed the Google Analytics mod, and I don't think I've done much since then.
3) I used to have the Google Analytics code in my header (or footer, can't remember now as I did it over a year ago), and I have always been able to get regular analytics data in my analytics account, but e-commerce tracking has never worked. I have always had e-commerce set to "yes" in my analytics settings, but it does not make a difference
4) I installed Simple Google Analytics, hoping that would automatically make the e-commerce tracking work correctly, but everything still seems to be the same as before I installed it, and it still shows as 0% even though I have made sales.
5) My current checkout method is PayPal IPN... I wonder if that has anything to do with it, since it goes to a 3rd party payment page?
thanks so much!
Sorry should have included that info in the original post
1. ZenCart version 1.3.7.1
Database Patch Level: 1.3.7.1
2. The only other mod installed is FedEx which was installed at site launch (simple google analytics was installed post launch by about 2 months)
No other changes happened to the site at the time of the google analytics add-on.
3. I won't say 100% certain, as there is always room for error, but everything I have reviewed and scrutinized over points to SGA as the culprit. I even asked the host to check error logs and see if there were any updates that might have been responsible for the server behaving differently or modifying the database, they took the time to help but were unable to find anything on their end.
Thanks!
Hello - trying to get done with Step one here. I haven't read this entire thread (that doesn't seem like it should be necessary), but I'm in need of some help.
From the first page of this thread, referencing the ReadMe Step 1:
>>
By default this is in includes/templates/[your_template]/common/tpl_main_page.php
but could be located in includes/templates/[your_template]/common/tpl_header.php
as well, depends on how your site has been templated.
>>
I don't have an includes/templates/[your_template]/common/tpl_main_page.php, but I do have the header and footer.php.
The problem is when I open the header and do a ctrl+f for "body", I don't even have that text.
What is my first step here? v 1.3.7
Thanks!
All right well I found..
includes/templates/template_default/common/tpl_main_page.php
... should I modify this file and put it in my template directory with the header and footer.php?
All right, now I've got a real problem..
Obviously it says it can't find a file but I need to know how to correct this. I ran the sql file from the admin, set up the configuration in the admin area with the proper google identification numbers for what, analytics and conversion tracking.Code:Warning: main(includes/templates/template_default/google_analytics/google_analytics.php): failed to open stream: No such file or directory in xxx/catalog/includes/templates/custom/common/tpl_main_page.php on line 182
Warning: main(includes/templates/template_default/google_analytics/google_analytics.php): failed to open stream: No such file or directory in xxx/catalog/includes/templates/custom/common/tpl_main_page.php on line 182
Fatal error: main(): Failed opening required 'includes/templates/template_default/google_analytics/google_analytics.php' (include_path='.:/usr/local/lib/php') in xxx/catalog/includes/templates/custom/common/tpl_main_page.php on line 182
I go to test the conversion, click an Add from google, go to login to my site to make a "purchase" and I get this problem. Help? Thanks!
Apparently this happens frequently, perhaps the ReadMe should discuss this more clearly? Working on implementing this fix.. :smile:
>>>
Are you using a custom template or not? In one error, it references the "template_default" directory, and in the other, it references a "CUSTOM" directory.
If you are using a custom directory, then make sure you put ALL overrides in folders associated with that custom template. So, for example, if you are using a custom template and that directory is called "CUSTOM" (as stated in your error message) then the Google Code needs to be installed in the /includes/templates/CUSTOM/common/tpl_main_page.php file. (Not in the one located within the "template_default" directory.)
Likewise, the directory "google_analytics" should be uploaded to /includes/templates/CUSTOM/google_analytics (NOT /includes/templates/template_default/google_analytics).
Google is unable to verify the code because there is no tracking code present due to the incorrect placement of the files on your end. Once you get them in the correct locations as indicated here, it should all be fine.
You'll need to have Google go back out and check the location of the tracking code to verify it once you have everything in place.
>>>
Hi
It looks like you have found the answer you need.
Basically, for future reference, I browse through all the files when I am working on a new module and whenever I see a folder with:
'custom'
'your_template'
'template_default' etc,
I change the folder name to my template name and use the override.
I also move any files I change in the 'template_default' folder to my override folder, creating one if it does not exist.
Craig
Did you upgrade to the 1.3.7 version from an older version, or was it a fresh install? There are a few lines of SQL code that are included in one of the updates that initiates the infor you are looking for.
Also, this may be a crazy question, but were those elements that seem to be missing there are one time (the fields)? I ask this only because I have seen other carts (Zen versions) even 1.3.7 that even before adding the SGA mod do not include the fields in question here.
In those cases, it would appear as SGA might be the culprit but the fields were not there anyhow.
Let me know the above and we can go from there.
This error is a direct result of not installing the "google_analytics" directory to the proper location (it contains the file that in included on the page with teh bit of code you put into your "tpl_main_page.php" file.
The location of the directory should be in the following area:
/includes/templates/[YOUR CUSTOM TEMPLATE HERE]/
So, once you upload, your directory structure will look like this:
/includes/templates/[YOUR CUSTOM TEMPLATE HERE]/google_analytics
If you are using the default template, then obviously the path would look like this:
/includes/templates/template_default/google_analytics
Once you get that in the correct location, you'll be fine.
There is no "fix" as such needed from a module / coding perspective. The "fix" is to install the files to the proper location and determine if you are using a custom template or not so you know where to install them to. :)
The reason it references two different locations is because of how the Zen overrides work. Zen first looks to find out if a custom directory exists. If it does, then it uses the files from that directory to "generate" those pages referenced.
If a custom directory does not exist, then it goes back and uses the "default" directory files.
In this case, it is not the module's fault that is causing different locations to print. Those references are not part of the module itself, but rather, part of zen cart and php. It is normal with all sites.
The reason you get the two different locations being referenced is because the files were not installed to the correct locations in the first place. So, due to that problem, the error report you get on the screen will reference both the conflict of the custom directory you are trying to use (referenced in the "tpl_main_page.php" file) and the included file that SHOULD be present in the same custom location (but is not due to incorrect installation). So, it then looks for the include files under the "default" template directory, can't find them there, and reports that back as well.
Again, this is not module error message. It is a PHP message that you are getting which has its foundation on the Zen overrides system.
Exactly. This is what is explained in the documentation (replace any occurrence of "custom etc..." with your own custom directory IF you are using one. Otherwise, use the default directory.
It helps to understand how the overrides work in Zen to get a feel for whaht is going on here.
You should only modify this file IF you are using a custom template (in which case, you should take the file and copy it to your "custom templates" directory name. This will automatically enable Zen overrides and is the preferred method to keep the integrity of your site if any upgrades to zen are released.
If you are using the default template, you can alter the file and leave where it is.
Here is a link to a help file that explains how to create a custom template using the Zen overrides.
https://www.zen-cart.com/tutorials/i...hp?article=142
econcepts - thanks for the help. Most of what you posted I figured out one way or another, and I guess I had just forgotten the "your_template" text was symbolic. Also note that the info I put in >> >> was a copy paste from another post I found, not actually me typing specific questions.
I suppose all I meant by the Readme was that it perhaps could be more clearly written - but then, I'm not coder and it takes me a while to get back into all the ZC lingo.
Anyway since you're helping out, can I use the other pages that Google Analytics supports within ZC? (Info page, etc)
I also actually have a simple html home page, can I paste the code Google provides into that html and have it "sync" properly with this ZC module?
As of December Google has new tracking code for Analytics. After unsuccessfully trying to find the needed modification for this plugin, I figured out the change myself. It's really not that big of a change and not a big deal at all, but to save some time, here's are the code modifications:
includes\templates\your_template\google_analytics\google_analytics.php
at the very beginning of the code
------------------------------------------
if ($request_type == 'NONSSL') {
// $google_analytics_url = "http://www.google-analytics.com/urchin.js";
$google_analytics_url = "http://www.google-analytics.com/ga.js";
$google_conversion_url = "http://www.googleadservices.com/pagead/conversion.js";
$google_conversion_image_url = "http://www.googleadservices.com/pagead/conversion/";
} else {
// $google_analytics_url = "https://ssl.google-analytics.com/urchin.js";
$google_analytics_url = "https://ssl.google-analytics.com/urchin.js";
$google_conversion_url = "https://www.googleadservices.com/pagead/conversion.js";
$google_conversion_image_url = "https://www.googleadservices.com/pagead/conversion/";
}
echo '<script src="' . $google_analytics_url . '" type="text/javascript">
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("' . GOOGLE_ANALYTICS_UACCT . '");
pageTracker._initData();
pageTracker._trackPageview();
</script>';
// echo '<script src="' . $google_analytics_url . '" type="text/javascript">
// </script>
// <script type="text/javascript">
// _uacct = "' . GOOGLE_ANALYTICS_UACCT . '";
// urchinTracker();
// </script>';
----------------------------------------------
As long as you installed the module as per the instructions (in the template_main_page.php file) then it should appear on any other page that uses that file (including info pages etc..).
As for the HTML page, you would need to copy and paste the tracking code found at the bottom of one of your pages to the HTML page in order for it to be included in the tracking results. The easiest way to do this is to do a "view source" on one of the pages on your site that has the GA code installed. (this is dome from within your browser).
Then, simply copy and paste the GA code found near the bottom of the page into the HTML page you wish. As long as long as you copy it all correctly, it should work fine. :)
Hello,
I am trying to install he google mod too. I've upgraded all my files in the zip file and I have run the query on the database (new installation not upgrade). Well now that I have done all of that, I don't see the goodle mod in the Admin->Configuration section.
Can someone please nudge in the right direction.
thanks a lot
Update: I now have the database working and I see the Google settings under Admin->configuration->google.
Here is the code that I have at the bottom of my "tpl_main_page.php" file:Quote:
Problem I have now is that when I try to test the mod on Google it says:
Profile Name: tranquillas.com/biz
Website URL: http://www.tranquillas.com/biz
Tracking Unknown (Last checked: 2008-01-06 7:50 PM PST.)
The Google Analytics tracking code has not been detected on your website's home page. For Analytics to function, you or your web administrator must add the code to each page of your website.
Can anyone shed some light on why the google check status does not work? I appreciate any help!Quote:
<?php
if (file_exists($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php')) {
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
}
?>
<?php
require($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'google_analytics') . '/google_analytics.php');
?>
<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-3347195-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
forgot.... I also have the script code at the end of my /home/index.php file.
hope that helps some.
I'm having the same problem mentioned earlier when I try to apply the SQL Patch. I get the dreaded 1064 error:
Do you want to turn on Google AdWords Conversion Tracking?
', @t4, 5, NOW(), NOW(), NULL, 'zen_cfg_select_option(array('Yes', 'No'), ');
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 'Yes', 'No'), ')' at line 1
in:
I'm using the "future_zen" template and I've tried installing the google_analytics subdir under both the future_zen directory and the template_default directory.
No joy. Analytics is at least partially installed, as it is an option under configuration and google confirms that its working. This LOOKS like its a syntax error in the sql patch... not a problem with a file location...
HELP!
-Rob Shearer
Oddly enough, when I opened up the .sql file in notepad and copied and pasted the text into the "query to be executed" box, it ran fine... and installed all the new stuff.
Weird.
uploading the file from my local hard drive failed with the 1064 msg. Copying the SAME text from the .sql file into the box ran without error.
[scratching head...]
Whatever, now its working.
- rob shearer
Hi Rob,
Sorry to hear that you are having issues too! At least you have things to the point where google says it's working. I can't even make it to that point yet. I'm going to go back over the many posts and see if I can find something that will make my code work. Wish me luck. :cool:
p.s. glad that you got it working!
Hi there! Just wanted to say thank you for the code that finally got the google stuff to work. Now when you go to the google site it says "Receiving Data". I don't see any information in any reports but from what I can gather from the posts here is that it takes a little time for things to start showing up.
I've been going crazy! Thanks a bunch!
After looking at your pages, you have both the "urchin" and the new "ga" version of Google analytics code present. You can only have one (both may not be present).
Try removing one of them and then make sure you give Google the proper url (with the trailing slash) to find and verify the code at.