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: