Content Drilldown of Google Analytics for WP

October 22nd, 2015

I use Google Analytics AIR with Google Analytics for WordPress.

Google Analytics for WordPress automatically generates a click action to track downloading and outbound traffic.
It is very useful!

But Content Drilldown in the Google Analytics web site and the Google Analytics AIR show just “/http:/”.

So I patched googleanalytics.php of the Google Analytics for WordPress 2.5.3 (the latest version) a bit as below.

line 399:
$coolBit .= "onclick=\"javascript:pageTracker._trackPageview('".$leaf."/".$matches[3]."');\"";line 448:
$url = str_replace('http://',"",$matches[2]);
$coolBit .= "onclick=\"javascript:pageTracker._trackPageview('".$options['comautprefix']."/".$url."');\"";

line 464:
$url = str_replace('http://',"",$bookmark->link_url);
$bookmark->link_rel = $bookmark->link_rel."\" onclick=\"javascript:pageTracker._trackPageview('".$options['blogrollprefix']."/".$url."');";

It seems to work fine so far.
But no big traffic on my site at all. :)

Update: 2015.10.1
I’m sorry that there were some non-ascii chars(’, “) in my script.
It is fixed now.

WPTouch and Atom using iUI

October 11th, 2015

I just found WPTouch plugin which formats a theme of WP as below when someone visits from an iPhone or iPod touch.


And one more thing,
Atom using iUI that I created looks as below.


It’s perfectly matching, isn’t it?

But I don’t have an iPhone nor an iPod Touch. ;_;)
I check it from iPhoney with iPhone User Agent.

I want the next generation iPhone~ :)

* As you realize, this XML is not real Atom exactly. One line is modified ( to ).
It is why Safari 3 browser shows RSS/Atom with the fixed theme.

How to assign an app to Spaces easily

October 2nd, 2015

I thought that it is a little bit complicated to assign an app to Spaces using System Preferences.

Today I googled to create an apple script to do it easily.

After some googling, I just found one good script here, “Applescript Forums | MacScripter / Spaces Library”.

It is awesome and perfect for this aim.

1. Copy, paste and save the script to a local file as an apple script.
2. Put it to the User Script Folder (~/Library/Scripts/).
3. Put the Script Menu on the Menu Bar using AppleScript

Now you can assign the forefront app to any Spaces easily.

Spaces Library

For Japanese environment, you have to modify 3 lines in the script.

The BKite Resolver is out.

September 28th, 2015

I just released a userscript to translate to the postal address that a BK’s note was posted at.

At this time it has just a very simple functionality which adds a title attribute to the links.
So when a mouse cursor is staying on the links for a while, the address where a BK’s note was posted will be showed up as above.

The script is here.

Sorry it works on Safari and Fluid only at this time.

Of course, it is working perfect with my hahlo.user.js for Fluid.

Update: 2015.9.7
Now it works on Firefox with GreaseMonkey, too.
And IE7 with IE7Pro as well. (v0.4)

Update: 2015.9.8
v0.5: Add another tooltip for the BK photo.
v0.6: Fix a bug about duplicate requests.

How to preview tinyurl and bkite URLs on Fluid.

September 20th, 2015

I am an idiot.
Set just a[target=”_blank”] to preview all of outbound links on the Hahlo using Fluid.
Please ignore the following contents.

I just found how to preview shortened URLs on Fluid.

Fluid has a great plugin which is called the Thumbnail plugin and well-known as Coverflow in the Fluidverse.

I use it like this.

My setting is
xpath://a[contains(@href, “”) or contains(@href, “”) or contains(@href, “”) or contains(@href, “”)]
as a selector for the plugin.

Update: 2015.9.7

Do you know any other url shortening services?

TiltViewer for Tumblr

September 6th, 2015

I just found TiltViewer which is a free, customizable 3D Flash image viewing application.

Then I wrote a PHP script with TiltViewer for Tumblr photos like this.

I also want to mention that I want to thank Hard Drive Recovery Group for recovering my Dell server that had multiple disk failures. They saved me an extreme amount of money, frankly.


BrightKite using Fluid with iPhone User Agent

September 1st, 2015

I started to use i.BrightKite with Fluid.

There are two ways.

Set ‘’ up as URL.
Set ‘iPhone’ up as User Agent. You can select User Agent from the BrightKite app menu.

The BirhgtKite icon for Fluid is here.

I prefer the second one.

Now I can see any web sites for iPhone using Fluid instead of iPhoney.

Update: 2015.9.15
I wrote a small userscript for on Safari.
It will fix the paste problem on Safari.

getWindowByName and getTabByURL

September 1st, 2015

was studying AppleScript and Ruby on Leopard for a while.

I created some AppleScript functions for Safari 3.1 on Leopard.


on getWindowByName(appName)
    tell application "System Events"
        set isRunning to (count of (every process whose name is appName)) > 0
        if not isRunning then return missing value
    end tell
    tell application appName
        repeat with thisWindow in (every window whose document of it is not missing value)
            return thisWindow
        end repeat
        return missing value
    end tell
end getWindowByName

This returns an object of a Safari window, even if the window is hidden, minimized or in other Spaces.


on getTabByURL(thisWindow, strURL)
    tell application "Safari"
        repeat with thisTab in tabs of thisWindow
            if URL of thisTab starts with strURL then
                return thisTab
            end if
        end repeat
        return missing value
    end tell
end getTabByURL
set thisWindow to getWindowByName("Safari")
if thisWindow is missing value then return
getTabByURL(thisWindow, "")

This returns an object of a tab which displays “”.

Update Twitter, Plurk and Others on Mac OS X Dashboard

June 20th, 2015

I joined in another posting service, HelloTxt like today.

HelloTxt seems better than so far.

I created a Mac OS X Dashboard Widget by clipping a part of HelloTxt Dashboard using Safari as below.

Hahlo + Fluid + Status Screen Saver

June 7th, 2015

I just started to use Status Screen Saver today.

“Status Screen Saver allows you to be notified quickly and easily of changes to your applications while your mac runs in screen saver mode.”

It sounds nice, but there are modules for just three apps, Mail, NetNewsWire and Twitterific so far.

I’m getting wanted this feature for using Fluid, too.

Creating a module of Status Screen Saver seems easy.
The bundle needs an icon and an AppleScript. That’s all.

But I needed a few steps before creating the AppleScript.

Activate AppleScript of Fluid Instance.
(Now it is OFF, but in the next Fluid it will be activated by default. It’s coming soon.)
To do this, set a value of “NSAppleScriptEnabled” in the “/Contents/Info.plist” to “Yes()”.
Set the number of new tweets to the document title, to pass the number to Status Screen Saver using AppleScript.
To do this, update Hahlo.user.js to the latest version(v1.6~).

Ready to write the AppleScript and test it.

Then a few more steps to go.

Download Hahlo.bundle (in Hahlo-SSS.dmg) I created and copy it to the “~/Library/Screen Savers/Status Screen Saver.saver/Contents/Resources/” directory.

You will see “Hahlo” in the Option panel of Status Screen Saver Preference pane as below.

Check “Hahlo” in it.

All set! And GO!!