Local Analytics v1.2.2
Local Analytics is a Wordpress plugin for integrating Google Analytics, the free web analysis service by Google, into your Word Press powered blog. The plugin is highly configurable and also allows caching of the urchin.js ga.js file locally, inorder to enable faster loading of pages. The plugin is based on my PHP program for speeding up Google Analytics by hosting it locally.
The plugin is highly configurable, yet simple. A normal user only needs to specify his / her Analytics UID, while advanced users can completely configure the behavior of the plugin.
Features
- Highly configurable
- Compatible with latest Google Analytics Code Update [NEW]
- Supports local caching of urchin.js for fast loading of pages.
- Supports compression of the local javascript files using mod_gzip.
- Includes support for tracking Adsense and YPN ad clicks [NEW]
- Includes support for tracking email links, external links and file downloads.
- Includes support for tracking subdomains and main domain in a single profile.
- Includes support for tracking visits to Admin Panels.
- Includes support for tracking logged in users.
- Includes uninstaller for complete removal of the plugin (I’m sure that you won’t be using it
).
Advantages of Caching
- Webpage loads faster, since user’s browser can use the existing connection with your web server to download the file and doesn’t need to create a new connection to Google’s server.
- Sometimes, though very rarely, google servers become overloaded and your page load time will be affected drastically.
- Some ad blockers are now blocking tracking services like Google Analytics. This script will be a work around to that too.
Screenshot
Here is a screenshot of the Options page of the plugin.
Requirements
- WordPress v2.3 – I have tested the only in this version. It may or maynot work with other versions. I recommend updating your blog to the latest version as it has many new features and bug fixes.
- Google Analytics Account – You can sign up for a free account here.
Installation
- Download, unzip & upload the plugin to your ‘/wp-content/plugins/’ directory.
- Activate the plugin through the ‘Plugins’ menu in WordPress.
- On plugin activation, it will automatically try to create a file named local-urchin.js in the plugin directory. If it fails, you will see a notification message in the Admin Panel. In that case you will have to manually create the file and chmod it 666.
- Go to Options > Local Analytics and enter your Google Analytics UID and hit the Save Options button.
Upgrade
I recommend uninstalling the current plugin (using the uninstall button in Options > Local Analytics) and installing the new version.
Download
Current stable version of the plugin is v1.2.2.
You can download the plugin from the WordPress Plugin Repository.
Frequently Asked Questions
- Q. Google Analytics says that the code is not installed correctly. Is something wrong?
A. Check whether you are seeing any error message in your Admin Panel. If so, fix it. Else ensure that Disable Local Analytics tracking option is unchecked in the Options page. - Q. I am getting the following error in my pages. What should I do?
Warning: eregi(): REG_EMPTY in /private/path/replaceforprivacy/wp-content/plugins/local-analytics/local-analytics.php on line 127
A. Using the plugin in non www domains caused the warning in pre 1.12 versions. Please upgrade to the latest version. You have to uninstall the current plugin before upgrading. Alternatively, you may edit the Internal Domains field to fix the error. - Q. I installed the plugin successfully. But I am getting the following error in my Admin Panel
local-urchin.js does not exist. Please create it.
A. The plugin automatically downloads and stores a fresh copy ofurchin.jsga.js in the plugin directory, under the filename local-urchin.js. While activating the Local Analytics, if there are sufficient privilages, the plugin will automatically create the file. If it fails, then you will have to manually create the file and chmod it 0666. The best idea is to chmod the plugin directory 0666, before activating the plugin (so that the file will be created automatically on plugin activation). - Q. I installed the plugin successfully. But I am getting the following error in my Admin Panel
local-urchin.js is not writable. Please chmod it 666.
A. See FAQ entry #4. - Q. How can I chmod a file?
Q. How can I change file permissions?
A. You can chmod / change file permission using your FTP client. But the steps are different for different FTP programs. In most FTP clients, you can chmod a file by choosing the option Properties from the right click context menu. Also checkout this article by Stadtaus.com on changing file permission in 5 popular FTP clients. - Q. Will Local Analytics integrate the Google Analytics reports within the WordPress Administration Panel?
A. It is not possible with Local Analytics. But David Szpuner had pointed out an excellent plugin called Wordpress Reports by TanTan, which allows you to integrate your Google Analytics and FeedBurner stats within your Admin Panel. - Q. How can I check whether the plugin is installed correctly or not?
A. After activating the plugin, visit your blog and check the source of the page for the Local Analytics code. A sample code is given below.
<!– Begin Google Analytics Code by Local Analytics Plugin –>
<script type='text/javascript' src='http://www.domain.com/wp-content/plugins/local-analytics/local-urchin-js.php?ver=1.0′></script>
<script type='text/javascript'>
_uacct = "UA-XXXXXXX-X";
urchinTracker();
</script>
<!– End Google Analytics Code by Local Analytics Plugin –>
<!-- Begin Google Analytics Code by Local Analytics Plugin -->
<script type='text/javascript' src='http://www.domain.com/wp-content/plugins/local-analytics/local-urchin-js.php?ver=1.0'></script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-XXXXXX-X");
pageTracker._initData();
pageTracker._trackPageview();
</script>
<!-- End Google Analytics Code by Local Analytics Plugin -->
- Q. I have activated the plugin. But I can’t find the Local Analytics code in my page source. What is the problem?
A. First of all, ensure that the plugin is installed and configured correctly. If it not configured correctly, then you will see a notifcation message in your WordPress Admin Panel.
If it is configured correctly, then ensure that the option “Disable Local Analytics tracking” is disabled and logout of your WordPress account, refresh your blog’s homepage (use CTRL + F5 to ensure that the page was not loaded from your browser cache) and check for the Local Analytics code in your page source.
Please keep in mind that when you are logged in, your visits will be tracked only if you have enabled the “Track Users” option and have appropriate value set for the option “Max. Tracked User Level “. - Q. I have another question that is related / not related to Local Analytics. What should I do?
Q. My question is not answered above. What should I do?
A. Either post your question as a comment below or contact me. I will try my best to help you solve it.
ChangeLog
- v1.2.2
- Changed relative reference to astrack.js with absolute reference to make the plugin compatible with blogs with different site and wordpress location.
- v1.2.1
- Minor update. Fixed a mistake in gzip compression, as pointed out by Sergey Biryukov
- v1.2
- Updated the plugin to make it compatible with latest Google Analytics code update
- Added Adsense and YPN click tracking
- v1.1.3
- Fixed a minor error which caused a Bad arguments warning when the Internal Domains field was left empty.
- v1.1.2
- Fixed an error which caused a REG_EMPTY warning in non www domains
- v 1.1.1
- Corrected a typo in error message
- v 1.1
- Fixed the error pointed out by Kevin
- Removed the onclick events from RSS feed
- Dropped domain name from tracked downloads
- Edited admin panel to display configuration errors

November 8th, 2007 at 2:56 pm
Nice one, I’ve been looking for something similar and I ended up here. I will definitely install your plugin and try it.
It’s always so hard to check all the external analytics reports for my blog, or I’m just lazy
.
November 8th, 2007 at 3:39 pm
why would your page load slower when you place the google analytics code at the bottom? the call for urchin.js is done after the page has loaded! except for the closing body tag, but that is not a problem for any browser… or am i mistaken?
November 8th, 2007 at 4:01 pm
Hi,
Nice plugin this is. Seems to be working OK but when i access my page from a RSS feed, I get the PHP error at the top.
Warning: eregi() [function.eregi]: REG_EMPTY in /home/macrike/public_html/wp-content/plugins/local-analytics/local-analytics.php on line 110
Any ideas to what could it be?
November 8th, 2007 at 4:12 pm
Thanks Chip. Please let me know if you have any problem using the plugin.
November 8th, 2007 at 4:21 pm
If you call the function urchinTracker() anywhere in your page, then you have to put the tracking code before that. To track the external and download links we have to call the above function, hence the file is loaded in the head section.
Using the code at the end of the page won’t make your page contents load slow, but you will have problems with your page’s onload event in some browsers. Because the onload event will be triggered only after all the embedded elements, including urchin.js, have completely loaded.
November 8th, 2007 at 4:26 pm
Hello Kevin,
Thanks for trying out the plugin. I will look into the warning now itself.
November 8th, 2007 at 8:32 pm
I am installing this as we speak, let’s see how it works!
November 8th, 2007 at 9:42 pm
Ok, this is possibly a really dumb question.
Aside from installing, activating and saving my UID on the Options page, is there anything else I need to do for this to work?
Is there a report page that’s supposed to show up under my Admin panel on WordPress or will I just need to go to the Google Analytics page?
November 8th, 2007 at 11:08 pm
hey looks great..i’ll give it a try
where’s the stat show up?or it hav to be 24 hour to stat being show up?
and yeah i hav same queation with Jared
sory for my english
November 8th, 2007 at 11:11 pm
I got a fatal error activating the plugin using Wordpress 2.3.1
November 8th, 2007 at 11:58 pm
I was unable to replicate the error. But I edited the part of the code which, I believe, is causing the problem. Can you plz try the new version and let me know how it works?
November 9th, 2007 at 12:02 am
Yeah, the error seems to have gone.
Tanks for this great plugin and for the help!
November 9th, 2007 at 12:03 am
Hi Joyce,
After I download the zip file, it gives an error when trying to unzip. The zip file is not complete.
Thanks,
Fermin
http://www.ferminsuero.com
November 9th, 2007 at 12:05 am
Normally that is enough. But if you want to do anything more like tracking a subdomain or e-commerce transactions spanning multiple domains, then you need to add more code in the “Additional Tracking Code” textarea.
No, it is not possible to show your analytics reports in your WordPress Admin panel
. You will have to visit you GA account to see the stats.
November 9th, 2007 at 12:09 am
Hello Fermin,
That is strange, because I am not experiencing any problem with unzipping. Anyway I have created and uploaded the zip file once again (this time at normal compression level).
November 9th, 2007 at 12:11 am
Can you plz try the latest version and let me know the error message?
The new version will inform you if the local file is not writable.
November 9th, 2007 at 12:17 am
Thanks
.
My English is also not very good
No, sorry
You can see stats in your Google Analytics Account page. GA is not a real-time stats program, so you may have to wait a few hours to see the updated reports.
November 9th, 2007 at 12:45 am
I get the same problem. I’ve been trying all morning and even rebooted.
November 9th, 2007 at 12:59 am
I had a similar one working on my site and recently it stopped working. I’ll be giving yours an install later today. Thanks.
November 9th, 2007 at 1:13 am
Hello David,
Did you mean problem with unzipping the file? If so, did you try the latest version?
November 9th, 2007 at 1:15 am
Actually I should thank you for testing the plugin and reporting the problem.
November 9th, 2007 at 1:17 am
Please let me know if you need any help with it.
November 9th, 2007 at 2:36 am
I tried the latest, but whenever I try to open the downloaded zip file (I’m using Windows Vista to both download and open) I get an error saying the compressed folder is invalid. Weird. I see that others have downloaded it successfully, so I don’t know what could be causing it.
November 9th, 2007 at 3:21 am
I am getting the error message:
Warning: eregi() [function.eregi]: REG_EMPTY in /home/freegeog/public_html/wp-content/plugins/local-analytics/local-analytics.php on line 127
Repeats 4 times.
And this is with the latest version of the plugin. Had to de-activate it.
November 9th, 2007 at 3:35 am
I too am finding that the downloaded zip file is invalid. Must be a recent change that will hopefully be fixed tomorrow.
November 9th, 2007 at 3:49 am
me too…download not working
November 9th, 2007 at 7:17 am
Hi joyce, i see you are very actively supporting your plugin here. Very much appreciated
But i am a bit confused
by your reply. Google Analytics actually TELLS me to put the code at the end:
“Copy the following code block into every webpage you want to track immediately before the tag.” (notice, that is the closing body tag)
and then it shows me the code like:
_uacct = "UA-xxxxxx-n";
urchinTracker();
so on WP it should go straight into footer.php or done via a plugin using get_footer(), or am i mistaken?
November 9th, 2007 at 7:24 am
oh, even wrapping code in -code- tags like described below the form, doesn’t allow me to post code as text here… sorry, that makes my previous post very unclear
So the instructions by GA read (body tag translated here) “Copy the following code block into every webpage you want to track immediately before the closing body tag. and I suppose that I do not have to explain how the show the code (including the urchin.js call directly above the urchinTracker() script… (hope this is clear enough)
November 9th, 2007 at 4:59 pm
@David, Steve, Loden
I have added added the files as a rar archive and as plain text files. Can you plz try that?
November 9th, 2007 at 9:08 pm
I too had problems unzipping the file on Win XP Pro, SP2. I was able to download the files directly from the download section, and manually create the main folder. However, when I upload and activate the plugin – it tells me that local-analytics.php does not exist and asks me to create it. Something has to be getting corrupted here or something. The options page will load, but I get that error and am afraid its not working.
November 9th, 2007 at 9:14 pm
Ravan,
Thanks for the compliment. But I think you still did not understand my point
First of all, let me tell you why Google recommends putting the code just before the closing body tag.
When Urchin was bought by Google and they released it for free as Google Analytics, they asked webmasters to put the code within the head section of the page. This ensures that urchin.js loads before the page starts loading. But soon the load on Google’s servers became too much and it started taking a very long time for urchin.js to load. Since the code was placed in head section, the page content too stopped loading. After this, Google started recommending users to put the code at the end of the closing body tag. So that atleast the content will load, even if their server is overloaded.
Now why are we putting the code in the head section?
For tracking external links and download links, we have to call the function urchinTracker on the onclick event of the links. If we call urchinTracker anywhere in the page, then we have to put the Analytics code before that. Suppose we inserted the code before the closing body tag and someone clicks on an external link before urchin.js loads. Then we won’t be able to track the click. In Local Analytics, the file is included in the head section. Hence we can track clicks even if the page has not loaded completely.
I think I have explained it clearly. If you still have any doubt, feel free to question me again.
November 9th, 2007 at 9:17 pm
This looks like an excellent plugin! I am currently using Google Analyticator but it appears your plugin adds many options. I will try it out now.
Also, if anyone is looking for a way to view their Google Analytics reports within the WordPress admin panel, I’ve been using a plugin for a while called WordPress Reports that does this (and has FeedBurner stats as well). It doesn’t show all the possible reports, just some basic graphs (including trending), but it’s useful and keeps me from visiting the Analytics site daily!
It will also add the Google Analytics tracking code for you; but obviously make sure you turn this off if you use this Local Analytics plugin for that! Local Analytics appears to have many more configuration options. Thanks for the plugin!
November 9th, 2007 at 9:39 pm
Joe,
Can you plz send me the corrupted zip file at contact (AT) joycebabu.com?
The error message had a typo in it. The message is actually
The plugin will automatically try to create an empty file named local-urchin.js in the plugin directory. If it was not created, then you should manually create it and chmod it 666. Urchin.js will be periodically downloaded and stored in this file.
The best option will be to chmod the entire directory and its contents 666, before activating the plugin.
I have fixed the type and reuploaded the plugin v1.11. This time I have used 7-Zip to create the archive. And I have also checked the archive for compression errors.
November 9th, 2007 at 9:44 pm
David,
That is cool. I will try your plugin now itself.
I was also using Google Analyticator. Before creating this plugin, I tried almost every other Google Analytics plugins for Wordpress. I have added most of the common and useful options in Local Analytics. Now that many people found the plugin interesting, I will be adding more configurable options into the plugin shortly.
November 9th, 2007 at 9:47 pm
Hey Joyce,
would it be also possible to have the google script at the footer of the source code, which would make it even faster?
Thanks
Alex
November 9th, 2007 at 9:48 pm
I still get an error saying the zip file is corrupted. I can extract it with winrar, but it only contains the local-analytics.php file, all other files are missing.
November 9th, 2007 at 9:51 pm
I just tried to e-mail you back the file, and I get this error from my SMTP relay…
552 5.7.0 Illegal Attachment g39si4347891rvb>
Something is definately wrong with the file.
November 9th, 2007 at 10:02 pm
David. I installed your plugin. It is very very good. I will update this page to include a link to your plugin. Very good work.
November 9th, 2007 at 10:11 pm
Thanks a lot for your continued help. I have created a tar.gz archive too. Can you plz try it?
http://www.joycebabu.com/wp-content/uploads/2007/11/local-analytics.tar.gz
BTW, I have updated the plain text files and the rar files too, so that you can install the plugin.
November 9th, 2007 at 10:11 pm
i got this when i try to activated your plugins…can u give me a clue?wht i’m doing wrong?
Fatal error: Cannot redeclare locan_activate() (previously declared in /home/ekowzinf/public_html/wp-content/plugins/local-analytics/local-analytics.php:47) in /home/ekowzinf/public_html/wp-content/plugins/local-analytics/local-analytics.php on line 83
and i got this too
local-analytics.php does not exist. Please create it.
i hav change the chmod for your plugins, and it’s still not working
November 9th, 2007 at 10:14 pm
Hello Alex,
If you have enabled the gzip compression option included within the plugin or if you have tried the mod_deflate compression technique, then the file size will be just 6 KB and it won’t slow up your page loading. But now that you have asked for such an option, I will surely include it in the next version of the plugin.
November 9th, 2007 at 10:34 pm
Please uninstall and remove the current plugin and install v1.11. The errors will be gone
BTW, checkout the comment by David if you want to integrate GA stats within your WordPress Admin Panel.
November 9th, 2007 at 10:38 pm
Thanks Joyce. But the WordPress Reports plugin is not “mine,” it is just one I’ve been using for a while. Glad you like it though; I certainly do! The TanTan Noodles site it came from has a nice variety of useful plugins.
Also, I am experiencing a problem similar to one mentioned above. I installed your plugin, and then the first post on my blog had several repetitions of this error in front of it:
Warning: eregi(): REG_EMPTY in /private/path/replaceforprivacy/wp-content/plugins/local-analytics/local-analytics.php on line 127. I have since reverted to Google Analyticator for now but would like to figure out the error. I am running too many other plugins to name…but WP-Cache is the one that I would guess is the most likely to cause problems.November 9th, 2007 at 10:44 pm
One more thing. You claim that the urchin code must be called before the outgoing links are listed to make sure they are tracked. This makes sense. However, it appears that Google Analyticator gets around this while keeping the urchin code in the footer. It uses another JavaScript file (mine is here) called after the urchin script that goes through and adds the outbound link tracking code to all links on the page after the Google code has been loaded. It seems to accomplish both goals at the same time, and cuts down on page size by not adding the onclick event to each link as it comes from the server. I thought it was ingenious!
November 9th, 2007 at 11:15 pm
Changing the permissions on the local-urchin.js file fixed the problem – thanks! BTW, I can open the zip file, but got an error message on the tar.gz file.
November 9th, 2007 at 11:16 pm
Whoops – spoke too soon. Got three of the following at the top of every blogpost:
Warning: eregi() [function.eregi]: REG_EMPTY in /home/freegeog/public_html/wp-content/plugins/local-analytics/local-analytics.php on line 127
November 9th, 2007 at 11:19 pm
Hey there – love this plugin, but I get the following error message on my admin screens:
local-urchin.js does not exist. Please create it.
Did I miss a step somehow?
Thanks!!!!
November 9th, 2007 at 11:20 pm
Well at least we seem to have gotten to a common error Leszek, since that’s where I’m at! I downloaded the .zip file again but the files all say version “1.1″ and not “1.11″ so I’m not sure why I’m not getting the latest version downloaded…and I am using WordPress 2.3.1, not just 2.3.
November 9th, 2007 at 11:50 pm
I still get the corruption error on the files when I download them.
November 10th, 2007 at 3:35 am
Great plugin – thanx for your work. Just got one problem: I use the plugin “cforms contact form by delicious:days” and together with Local Analytics on WP2.3 I get the following error: Warning: eregi() [function.eregi]: REG_EMPTY in /[...]/wp-content/plugins/local-analytics/local-analytics.php on line 127
Do you have any idea how to fix this?
November 10th, 2007 at 3:54 am
Thank you Joyce,
would be great if you can include such an option to include it in the footer and not only in the header. Also the workaround what David Szpunar mentioned would be really great, so you would get the best performance out of it.
Alex
November 10th, 2007 at 6:03 am
David,
.
Oops! Sorry. I read your comment too fast
Nice idea. I will try to add that option into the next version.
November 10th, 2007 at 6:04 am
Alex, I will try to add that option into v1.2. But before that I want to make the current release stable.
November 10th, 2007 at 6:06 am
Tom,
.
Thanks
I have added it as an FAQ entry. Please check it.
November 10th, 2007 at 6:10 am
Leszek,
I have fixed the error. Please see the FAQ entry above.
November 10th, 2007 at 6:12 am
I tried to automatically populate the Internal Domains field. But I had checked it only with www domains. Hence it created problems when run accessed from a non www page.
November 10th, 2007 at 6:13 am
Robert,
See the FAQ entry above.
November 10th, 2007 at 6:15 am
I don’t get any idea why it is happening like this. For some people, including me, it is working fine. While some are finding the file corrupted.
Let me look into it again.
November 10th, 2007 at 8:21 pm
Thanks Joyce, I understand
November 11th, 2007 at 12:48 am
Hi—Joyce: This plug seems really cool. I have a question,i hope its not to much of a dumb one. But how do i tell which version of Wordpress i have?
My blog is:
http://www.groovyvegetarian.com
Is it located in my wp admin panel, webhost cpanel, or where?
Missy.
November 11th, 2007 at 12:57 am
Hello Missy,
Thanks for the compliment.
Login to your wordpress control panel. And you can see your wordpress version at the bottom of the page.
You are running WordPress v2.2.1 (I created an account at your blog). Though I haven’t checked the plugin in WordPress v2.2.1, it should work fine in that version too.
Please feel free to contact me, if you need any help.
November 11th, 2007 at 1:29 am
Thanxs alot Joyce. I appreciate it. I will download the plug-in and try it. Thanxs! Will report back any wacky stuff.
Missy.
November 11th, 2007 at 1:58 am
Hi—I downloaded the plug-in and activated it in my wp panel, but google analytics kept showing the code was not showing on their end. I manually added the GA code to the header.php file in my theme, and now it works. So don’t know if i did something wrong, or if the plug-in doesn’t work on my blog.??? But i think GA is working on my blog. lol.
November 11th, 2007 at 2:46 am
Read the FAQ entry, and sure enough it fixed the problem. Seems to be working fine now, though I won’t know for sure until tomorrow. Thanks!
November 11th, 2007 at 3:22 am
After activating the plugin you have to ensure two things for the analytics code to show.
1. You have to enter your Analytics Account id in the Plugins options page (Options >> Local Analytics).
2. The file local-urchin.js in the plugin directory exists and is writable.
If both the conditions are not true, then you will see a notification in the Admin Panel that says, either “Google Analytics is not active. You have to enter your Analytics Account ID” or “local-urchin.js doesnot exist or is not writable.”
You have to fix that error first.
November 11th, 2007 at 4:40 am
well, after such a clear explanation (it should go in your FAQ’s), i wouldn’t dare to question you again
i only wonder why you go through so much trouble, just to catch those clicks before urchin.js loads. for me, stats are to see trends in visitor behaviour, not to wring every last click out of it just for high-scores (that is not a fair analogy, i know)… but i am sure you have a different point of view on this. please do not feel obliged to respond to this. but if you do, i would read it with much interest
(quite open to changing my point of view and not being cynical in any way)
cheers, ravan
November 11th, 2007 at 5:44 am
Hi—I did add my GA ID in the options page.
I don’t know anything about the local-urchin.js file, i don’t even know where it’s located. What do i have to do to this file?
Also does it take some time for all to show? Because i notice Leszek (commenter below) said she wont know if she did it right, till tomm. Or is her issue totally unrelated to mine.
November 11th, 2007 at 12:09 pm
Hello Ravan,
I am only happy to reply to your questions. I also make mistakes and like it when others correct me. So feel free to question me. I will surely answer, if I can.
For a proper analysis of visitor trends, we need to know the exact stats. In GA we have a section named Length of Visit. That stat will be greatly affected by quick exits, if we don’t log them. It informs us what kind of articles our users like. Because if you don’t like a post/article, you will leave the page after reading the first few lines, right?
But David and Alex had requested the ability to include the code before the closing end tag. This has the advantage of slightly lesser pagesize and faster server side processing. But it will not log quick exits.
November 11th, 2007 at 12:40 pm
Missy,
If you don’t have the urchin.js file or if it is not writable, you will see an error message in the admin section. Can you see anything like that?
Google Analytics takes a few hours to report the stats. It is not a real-time stats software.
The best method to check whether everything is fine is to re-activate the plugin and view the source of the page (from your right click context menu or from View >> Source) and check for something like
If you are still unsure, please reactivate the plugin and post a comment here. I will check it for you
November 11th, 2007 at 12:41 pm
I checked your site and local-urchin.js exists.Which means your configuration is fine. Activate the plugin and wait for a few hours to see the stats.
November 12th, 2007 at 10:41 pm
Since no more errors were reported, I am making declaring this release (v1.12) stable. Thanks a lot to everyone for trying and supporting the plugin.
November 13th, 2007 at 1:50 pm
Hey there. I activated the plugin, changed my options (added the ID there), and local-urchin.js is created, and the PHP function wp_head exists in my header.php, but still the code does not show up in the source. I disabled the plugin and re-enabled, Ctrl+F5′d the homepage etc. but I couldn’t fix it. What do I do?
November 13th, 2007 at 2:07 pm
hey…thx for the response..
i’ll try it soon
November 13th, 2007 at 8:15 pm
Baris,
I have added the question to the frequently asked questions section. Plz check FAQ #8 and reply if the problem persists.
November 13th, 2007 at 8:23 pm
Holy crap, you’re right!
I couldn’t see the code because I was logged in as an admin
Thanks a lot.
November 13th, 2007 at 8:51 pm
Andrew,
You are getting the warning, since you left the “Internal Domains” field empty. I have fixed the error and uploaded v1.13. Please download and install the latest version.
If you have enabled the option “Track Outgoing Clicks”, then I recommend you not to leave the field empty. You should put your current blog location(without the protocol) in that field so that clicks on internal links having the domain name (eg: http://www.joycebabu.com/downloads/local-analytics/) are not tracked as outgoing clicks.
November 13th, 2007 at 8:55 pm
Thanks for using the plugin.
BTW, you can track admin visits too by setting “Max. Tracked User Level” to ‘Administrator’.
November 15th, 2007 at 1:51 am
Hi, what about users aborting a page load to go somewhere else? In your scenario these aborted loads would still be registered. I think thats not good data. Maybe its even worse than missing some clicks before onLoad. What do you think?
chek,
Morriz
November 15th, 2007 at 7:47 am
You are right, Morriz. Those visits will be logged.
In the next version of the plugin, I will add option to include the code in both header and footer. So that you can decide where to put the code.
November 17th, 2007 at 11:56 am
Will you implement TanTan plugin to eneble local view of stat? I think this will be usefull to blogger, when we can see stat in admin page.
November 17th, 2007 at 12:02 pm
My exams university exams start next month and I have lot to do before that. So I am running short of time. I will try to do what I can.
November 17th, 2007 at 11:45 pm
So, please focus on your exam.It’s real important thing. Forgot about plugin for a moment and success with examination.
December 11th, 2007 at 12:55 am
Hi, Just to be sure I understand, I do not need to copy and paste the analytics code on my site or any php files right? all I need to do is enter my Google Analytics UA after installing and enabling plug in right? so, after that where do I get the stats?
December 11th, 2007 at 9:17 am
@Raj
Yes, you are correct. The plugin will automatically insert the GA code in the required pages. You can see the stats from your Google Analytics accounts as usual.
December 14th, 2007 at 6:32 pm
Hello Joyce,
When you’re planning to update your Analytics plugin for new Google Analytics script code?
You can read about the new script here..
Also, will it be possible for you to add AdSense click tracking functionality?
DG…
December 18th, 2007 at 8:08 am
Thanks for notifying me, DG. And sorry for the late reply.
I will try to update the plugin by tomorrow or the next day. I will also give Adsense Click Tracking a try. Nice suggestion.
December 23rd, 2007 at 6:00 am
Hi Joyce,
Look at local-urchin-js.php, line 48.
I guess instead of locan_cache_time option we should read locan_use_gzip to set $useGzip. Or am I missing something?
December 23rd, 2007 at 11:31 am
@Sergey – You are correct. Thanks for pointing it out. I have updated the plugin.
December 28th, 2007 at 3:22 am
hello
GA isn’t recognizing the script on the GA page although i’ve made sure the code is there in the page source, right before the end of the head tag and again something i don’t really understand after the closing html tag.
i’m using one of those free mySQL/PHP web hosts. could that be it?
thank you very much for this usefull plugin.
December 30th, 2007 at 10:49 am
@Kordump
Can you plz tell me where you have installed the plugin? Local Analytic inserts the GA code only in the head section. I think you are using two GA scripts on your page. Is the plugin tracking your traffic?
January 2nd, 2008 at 12:27 pm
Hi Joyce,
I have my wordpress installed on a subdirectory on my website but my blog is configured to show on the root.
Because of that, the calls to local-astrack.php are referencing the wrong location. Will you be able to patch that up?
Thanks!
January 2nd, 2008 at 4:24 pm
Dear Joyce
Your plugin is brilliant, thanks! But I have a small bug with ‘keywords’ (they are in Russian) in my Google Analytics panel. They are totally unreadable, – appear as ‘%d1%80%d0%b0%d0′, not as normal words.
What is your advise?
January 3rd, 2008 at 11:33 pm
Hello Joyce,
I am currently trying to get your plugin to work on my Wordpress blog. I have gone through all the FAQs and read the comments and cant seem to get it working. The plugin installed the needed local-urchin.js file on the server and the code is visible if I view my source. When I log into GA it still says “Tracking not yet added to your website”. I have tried re-clicking the check status several times and it comes back with the same message. Any ideas?
Gage
January 10th, 2008 at 10:10 pm
hello
sorry for not answering your questions. i now believe the problem is something with my free host and/or my config of wordpress itself and i’ve found out there is a lot more to be learned before messing with analytics.
thank you very much for writing and supporting this plugin and i would like to excuse myself again for not answering before.
cheers and best of luck with all your projects!
January 11th, 2008 at 10:38 am
Its ok. Hope you have fixed the problem.
January 11th, 2008 at 10:52 am
Hi Gage,
I am sorry for the late reply. Does the problem persist? Can you plz try the latest version?
January 11th, 2008 at 11:13 am
Dmytro,
I don’t think it has anything to do with the plugin. Because what the plugin do is only insert the required code into your blog.
January 11th, 2008 at 11:15 am
Martin,
I am sorry for the late reply. I had actually updated the plugin the same day. But I forgot to upload it to the svn repository. Can you plz download and try the latest version?
January 11th, 2008 at 1:03 pm
Thanks Joyce!
Will try that out.
January 11th, 2008 at 11:46 pm
I followed the instructions and even created local-urchin.js in the plugins directory from the unzipped folder, but I am still getting the error that it doesn’t exist?
January 12th, 2008 at 3:29 am
Can you tell me the address of the blog where you installed the plugin? Did you try visiting the file directly ie, http://www.youdomain.com/wp-content/plugins/local-analytics/local-urchin.js.
January 13th, 2008 at 8:18 am
Hey Joyce,
Your plugin it seems very useful, I followed the instructions that was provided. I created the local-urchin.js file(I was supposed to put my code that was provided by Google Analytics in here, right?) then I got this error on my pages:
Warning: parse_url(http://) [function.parse-url]: Unable to parse URL in /home/getbleac/public_html/wp-content/plugins/local-analytics/local-analytics.php on line 123
January 14th, 2008 at 10:07 pm
Nice sounding plugin. I have a small problem. Install went ok, the code is in the header of my pages, I have the local-urchin.js CHMODed to 666, and have no errors in the console.
The problem I have, is that I had to manually crate local-urchin.js. I just made a blank file and uploaded it. After saving all my preferences, local-urchin.js is still at 0kb.
At what point is ga.js downloaded and renamed to local-urchin.js? Should it have happend right away? or do I have to wait for a cron?
Thanks!!
January 14th, 2008 at 10:41 pm
On another note, while the code is visible in the head of each page, GA is giving me the following error:
The Google Analytics tracking code has not been detected on your website’s home page.
Weird!
January 20th, 2008 at 3:09 pm
Hi Joyce, very good plugin!
But I have a problem when using “Additional Tracking Code”. My WP-blog is on a subdomain. I the tracking of the blog to show the prefix of my subdomain. So I added the code pageTracker._setDomainName(“subdomain.domain.com”);
I get no stats with the prefix “subdomain.domain.com”. Then I noticed that backslashes are added to the code: pageTracker._setDomainName(\”carl.awake.nu\”);
Is this the problem? Or is it in order?
Otherwise I’m pretty sure I have set up google filter options correctly to show the subdomain stats different from the main domain.
January 23rd, 2008 at 1:42 pm
Hi Joyce — I have a similar problem to another user above, who seemed to have fixed it without your help but he didn’t post what solved the problem.
I’m running Wordpress 2.3.2 (latest version) and Local Analytics 1.2.2. It installed ok, I created my own local-urchin.js file, and the analytics script is imbedded (when I view the source).
My problem: I can’t get google analytics to recognize the code… weird… any ideas?
Thanks!
Jonn
January 23rd, 2008 at 9:37 pm
When I activated this plugin, it created a “local-urchin.js” file that is 0KB in size. There is no analytics code when I view source.
I have gone through all FAQs, verified that there are no error messages in the admin panel, etc. I can’t figure out what the problem is. Please help.
February 8th, 2008 at 12:33 am
I have the exact same problem. Not sure what to do about it. Anyone else?
February 9th, 2008 at 1:15 am
Hi Joyce
i like the look of your plugin but unfirtunately it doesn’t accept my google analytics ID – every time i attempt to save it it doesn’t do anything and then when i refresh the browser it says i still need to enter my analytics ID – is there a way I can hard code it in your code to skip the buggy plugin config page – been looking just haven’t found the right spot as yet?
thanks in advance
Nick
ps latest wordpress and also plugin
February 9th, 2008 at 1:18 am
hi joyce
on latest wordpress and your plugin version and i like the potential your plugin has but the config page is buggy and will not accept my google analytics ID. Can u hard code it somewhere and if so where so i can skip the buggy plugin config screen thanks nick
February 19th, 2008 at 3:33 am
Hello Joyce,
I have downloaded the latest version of your plugin and am running the latest version of wordpress.
I uploaded the plugin, activated it and added my tracker ID from google analytics.
The plugin created a 0kb file named local-urchin.js and google analytics wont pick up on the site.
Regards,
Kevin.
February 24th, 2008 at 9:54 pm
Joyce, thank you for this great plugin! I’ve been using it for a month, and just today I see this error (using WP 2.3.3 and K2 theme):
Warning: parse_url(http://) [function.parse-url]: Unable to parse URL in /home/[my directory]/public_html/blog/wp-content/plugins/local-analytics/local-analytics.php on line 123.Line 123:
$url = parse_url($url);The URL for the page on which it appears is http://www.coreknowledge.org/blog/
but http://www.coreknowledge.org/blog/index.php is OK.
I’ve never seen this problem before today, and there have been no changes to the website, other than a Wordpress update from 2.3.2 to 2.3.3.
Ideas? For now I’ve disabled the stats.
—Diana
February 25th, 2008 at 7:39 pm
I found that you have to disregard Google’s instructions, and do *not* include http:// in your URL. That solved the problem for me. This goes for all Google Analytics configuration.
February 25th, 2008 at 8:10 pm
Maybe we need some code in function locan_parse_link to cope with the missing index.php? I’d rather not add a rewrite mod to .htaccess to force index.php, that might cause other problems. It’s odd that this worked fine for so long, and then failed. Something about the server configuration perhaps? I’m on shared hosting, so who knows! Just need a little patch perhaps?
February 25th, 2008 at 8:43 pm
more information: PHP 5.2.5.
this code:
$url = 'http://www.coreknowledge.org/blog/';print_r(parse_url($url));
echo parse_url($url);
renders
Array ( [scheme] => http [host] => http://www.coreknowledge.org [path] => /blog/ ) Array
February 26th, 2008 at 12:06 am
OK, I hope this helps someone else!
Check if your wp-config.php has extra linefeeds after the closing bracket, and remove them.
It messes up the loading order of scripts for the page. It was affecting my tinyMCE visual editor once, and now I find it was affecting this parse_url as well.
Fantastico will insert extra linefeeds in wp-config.php if you use it to update.
—Diana
April 1st, 2008 at 12:59 pm
Hi Joyce,
Local Analytics does not support Wordpress 2.5, it crashes on activation. When can the community expect an updated version of this great plugin.
We <3 Local Analytics
April 8th, 2008 at 1:17 pm
Yes, indeed, it does not work with Wordpress 2.5
April 9th, 2008 at 7:14 pm
Oddly, the problem has returned, with no changes to the blog code, and does not seem to have any relationship to whether the URL contains index.php or not. I deactivated and reactivated the plugin, and the problem disappeared. Weird.
April 24th, 2008 at 10:49 pm
Love the plugin.
June 12th, 2009 at 5:46 am
Hi Joyce – I have uninstalled your plugin, but it has left some code in my template, which is generating javascript errors. I am new to wordpress.
Would you mind emailing me about how to remove this bit of script from my site?
<!–
google_ad_client = “pub-0909510381367095″;
/* 336×280, created 4/13/08 */
google_ad_slot = “7189509193″;
google_ad_width = 336;
google_ad_height = 280;
//–>
June 12th, 2009 at 10:32 am
Hello Derek
Hello Derek,
The Javascript code quoted above is Google Adsense ad code. It was not added by Local Analytics. If you have any plugin related with Google Adsense, remove it and check your page source again. If that doesn’t help, feel free to contact me again
Joyce
January 23rd, 2010 at 4:24 am
Joyce,
The Google Analytics Code is showing up in the Source view but it appears I have an open script:
<script type=\\\\\\\”text/javascript\\\\\\\”>
try {
var pageTracker = _gat._getTracker(\\\\\\\”UA-6204359-10\\\\\\\”);
pageTracker._trackPageview();
} catch(err) {}</script>
pageTracker._initData();
pageTracker._trackPageview();
</script>
The result is this line at the top of the blog page:
pageTracker._initData();pageTracker._trackPageview();
I checked the coding of the plug-in but couldn’t find the problem. (The real problem
is I’m old and I don’t want to learn new coding like JS and PHP… ‘Cause it gives
me a headache.)
Thanks for your help.
~ Steve