< Browse > Home / Downloads / Local Analytics v1.2.2

| Mobile | RSS

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.

[Screenshot] Local-Analytics

Requirements

Installation

  1. Download, unzip & upload the plugin to your ‘/wp-content/plugins/’ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. 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.
  4. 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

  1. 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.
  2. 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.
  3. 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 of urchin.js ga.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).
  4. 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.
  5. 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.
  6. 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.
  7. 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 -->
  8. 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 “.
  9. 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
Leave a Reply 68379 views, 31 so far today
Follow Discussion

138 Responses to “Local Analytics v1.2.2”

  1. Chip Says:

    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 :).

  2. Ravan Says:

    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?

  3. Kevin S. Says:

    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?

  4. Joyce Says:

    Thanks Chip. Please let me know if you have any problem using the plugin.

  5. Joyce Says:

    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.

  6. Joyce Says:

    Hello Kevin,
    Thanks for trying out the plugin. I will look into the warning now itself.

  7. Jared Says:

    I am installing this as we speak, let’s see how it works!

  8. Jared Says:

    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?

  9. ekowanz Says:

    hey looks great..i’ll give it a try :)
    and yeah i hav same queation with Jared :) where’s the stat show up?or it hav to be 24 hour to stat being show up?
    sory for my english

  10. kljs Says:

    I got a fatal error activating the plugin using WordPress 2.3.1

  11. Joyce Says:

    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?

  12. Kevin S. Says:

    Yeah, the error seems to have gone.

    Tanks for this great plugin and for the help! :grin:

  13. Fermin Says:

    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

  14. Joyce Says:

    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.

  15. Joyce Says:

    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).

  16. Joyce Says:

    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.

  17. Joyce Says:

    Thanks :)
    My English is also not very good :sad: .

    and yeah i hav same queation with Jared where’s the stat show up?or it hav to be 24 hour to stat being show up?

    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.

  18. David Potter Says:

    I get the same problem. I’ve been trying all morning and even rebooted.

  19. critical critic Says:

    I had a similar one working on my site and recently it stopped working. I’ll be giving yours an install later today. Thanks. :smile:

  20. Joyce Says:

    Hello David,
    Did you mean problem with unzipping the file? If so, did you try the latest version?

  21. Joyce Says:

    Actually I should thank you for testing the plugin and reporting the problem. :)

  22. Joyce Says:

    Please let me know if you need any help with it. :)

  23. David Potter Says:

    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.

  24. Leszek Pawlowicz Says:

    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.

  25. Steve Belt Says:

    I too am finding that the downloaded zip file is invalid. Must be a recent change that will hopefully be fixed tomorrow.

  26. Loden Says:

    me too…download not working :???:

  27. Ravan Says:

    Hi joyce, i see you are very actively supporting your plugin here. Very much appreciated :)

    But i am a bit confused :roll: 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?

  28. Ravan Says:

    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)

  29. Joyce Says:

    @David, Steve, Loden
    I have added added the files as a rar archive and as plain text files. Can you plz try that?

  30. Joe Church Says:

    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.

  31. Joyce Says:

    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.

  32. David Szpunar Says:

    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!

  33. Joyce Says:

    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

    local-urchin.js does not exist. Please create it.

    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.

  34. Joyce Says:

    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.

  35. Not a Niche Says:

    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

  36. Joe Church Says:

    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.

  37. Joe Church Says:

    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.

  38. Joyce Says:

    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.

  39. Joyce Says:

    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.

  40. ekowanz Says:

    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 :(

  41. Joyce Says:

    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.

  42. Joyce Says:

    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.

  43. David Szpunar Says:

    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.

  44. David Szpunar Says:

    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!

  45. Leszek Pawlowicz Says:

    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.

  46. Leszek Pawlowicz Says:

    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

  47. Tom W. Says:

    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!!!!

  48. David Szpunar Says:

    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.

  49. Joe Church Says:

    I still get the corruption error on the files when I download them.

  50. Robert Says:

    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?

  51. Not a Niche Says:

    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

  52. Joyce Says:

    David,
    Oops! Sorry. I read your comment too fast :oops: .

    Nice idea. I will try to add that option into the next version. :)

  53. Joyce Says:

    Alex, I will try to add that option into v1.2. But before that I want to make the current release stable.

  54. Joyce Says:

    Tom,
    Thanks :).

    I have added it as an FAQ entry. Please check it.

  55. Joyce Says:

    Leszek,
    I have fixed the error. Please see the FAQ entry above.

  56. Joyce Says:

    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.

  57. Joyce Says:

    Robert,
    See the FAQ entry above.

  58. Joyce Says:

    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.

  59. Not a Niche Says:

    Thanks Joyce, I understand :)

  60. Missy Says:

    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.

  61. Joyce Says:

    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.

  62. Missy Says:

    Thanxs alot Joyce. I appreciate it. I will download the plug-in and try it. Thanxs! Will report back any wacky stuff. :smile:

    Missy.

  63. Missy Says:

    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.

  64. Leszek Pawlowicz Says:

    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!

  65. Joyce Says:

    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.

  66. Ravan Says:

    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

  67. Missy Says:

    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.

  68. Joyce Says:

    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.

  69. Joyce Says:

    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

    <!– Begin Google Analytics Code by Local Analytics Plugin –>
    <script type=’text/javascript’ src=’http://www.groovyvegetarian.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 –>

    If you are still unsure, please reactivate the plugin and post a comment here. I will check it for you :)

  70. Joyce Says:

    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.

  71. Joyce Says:

    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.

  72. Baris Unver Says:

    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?

  73. ekowanz Says:

    hey…thx for the response..
    i’ll try it soon

  74. Joyce Says:

    Baris,
    I have added the question to the frequently asked questions section. Plz check FAQ #8 and reply if the problem persists.

  75. Baris Unver Says:

    Holy crap, you’re right! :) I couldn’t see the code because I was logged in as an admin :) Thanks a lot.

  76. Joyce Says:

    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.

  77. Joyce Says:

    Thanks for using the plugin.

    BTW, you can track admin visits too by setting “Max. Tracked User Level” to ‘Administrator’.

  78. Morriz Says:

    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

  79. Joyce Says:

    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.

  80. n-blue Says:

    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.

  81. Joyce Says:

    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.

  82. n-blue Says:

    So, please focus on your exam.It’s real important thing. Forgot about plugin for a moment and success with examination. :wink:

  83. raj Says:

    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?

  84. Joyce Says:

    @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.

  85. DG Says:

    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…

  86. Joyce Says:

    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.

  87. Sergey Biryukov Says:

    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?

  88. Joyce Says:

    @Sergey – You are correct. Thanks for pointing it out. I have updated the plugin.

  89. Kordump Says:

    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.

  90. Joyce Says:

    @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?

  91. Martin Lee Says:

    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!

  92. Dmytro Says:

    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?

  93. Gage Says:

    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

  94. Kordump Says:

    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!

  95. Joyce Says:

    Its ok. Hope you have fixed the problem.

  96. Joyce Says:

    Hi Gage,
    I am sorry for the late reply. Does the problem persist? Can you plz try the latest version?

  97. Joyce Says:

    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.

  98. Joyce Says:

    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?

  99. Martin Lee Says:

    Thanks Joyce!
    Will try that out.

  100. bluepig83 Says:

    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?

  101. Joyce Says:

    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.

  102. Ramanand Shiamsundar Says:

    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

  103. Joe Says:

    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!!

  104. Joe Says:

    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!

  105. Alex Says:

    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.

  106. Jonn Says:

    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

  107. Paul Says:

    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.

  108. Lars Says:

    I have the exact same problem. Not sure what to do about it. Anyone else?

  109. Nick Says:

    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

  110. Nick Says:

    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

  111. Kevin Says:

    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.

  112. Diana Says:

    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

  113. Diana Says:

    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.

  114. Diana Says:

    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?

  115. Diana Says:

    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

  116. Diana Says:

    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

  117. Michael Visser Says:

    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 :)

  118. Chris Says:

    Yes, indeed, it does not work with WordPress 2.5 :-(

  119. Diana Says:

    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.

  120. manele Says:

    Love the plugin.

  121. Derek Martin Says:

    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;
    //–>

  122. Joyce Says:

    Hello Derek

    Derek Martin :

    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;
    //–>

    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

  123. Steve Colby Says:

    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

  124. Hugo Says:

    OK… So, where is the “Save/Download” button within this page?

  125. logan Says:

    [...] Joyce Babu » Local Analytics v1.2.2 [...]

Trackbacks

  1. Andrew B  
  2. http://openid.aol.com/scifidriving  
  3. Eric  
  4. WordPress Plugins - WordPress 插件列表 11月13日 - WordPress中文站  
  5. WordPress Plugins - WordPress 插件列表 11月8日 - WordPress中文站  
  6. WordPress Plugins Database » Plugin Details » Local Analytics  
  7. 6 Wordpress Plugins that Enhances Google Analytics in your blog » ROCKFUSE  
  8. Local Analytics Plugin | WordPress Plugins Database - WordPressPluginsDatabase.com  
  9. Wordpress plugin-o-rama — jardenberg unedited  
  10. Top 1000 WordPress Plugin Authors « Metode de promovare  
  11. WordPress Plugin Releases for 11/13 « Weblog Tools Collection  
  12. Your page is now on StumbleUpon!  
  13. The Nexus » Google Analytics Wordpress Plugins