Tag Archives: code

How to remove MyBlogLog tracking code from WordPress

Have you used MyBlogLog in the past to track readers of your WordPress blog? You probably either used a plugin to do the tracking, or perhaps a short snippet of code added to your theme. Although it’s preferable to use the plugin approach, sometimes adding the code was necessary in the past to avoid incompatibilities with other plugins.

Now that Yahoo’s MyBlogLog is no more, you should disable the tracking, no matter which approach you used. If you don’t, your WordPress site is likely to slow down alarmingly, driving away readers. Note that since the tracking code is not normally included in admin pages, the poor performance may only be apparent when viewing the blog, not when using the dashboard.

If you used a plugin, uninstalling the MyBlogLog tracking plugin in the normal way through the dashboard should be straightforward.

If your WordPress site used the code approach to MyBlogLog tracking, you will need to manually edit the theme files to remove the code. Here’s what I did to remove the tracking code:

  1. Take a backup of your site :-)
  2. In the dashboard, click on Appearance > Editor in the left sidebar
  3. Choose the Header file (header.php) in the list of files in the right sidebar
  4. Scroll down until you find the tag. Just below that you will probably see the tracking code as highlighted in the sample below:
  5. Delete the highlighted text – ie all the text between and including the script tags. (Note that the id code will be different from that shown. Also, the code may have been inserted in a different file – if you can’t find it in header.php, you will need to browse the theme files to find it.)
  6. When you are confident you have made an accurate edit without deleting any other code, save your changes.

Disclaimer: since every site is different, I make no guarantee that this will work for your site. This is what worked for me. Remember that manually editing theme files is risky, so make sure you have a back up first and be very careful if you are not familiar with this process!

Language codes for Twitter

Brueghel's Tower of BabelHow to find tweets in a specific language?

That’s an issue for many Twitter users, including language learners and native speakers of other languages. Because of the dominance of English on the web, it’s easy to find English tweets. But finding tweets in other languages is not so straightforward.

One solution could be to tag each tweet with a language code. Using IANA’s existing language codes seems an ideal solution for compatibility and ease of recognition. This coding system is used widely on the web and in its basic form uses a two-letter code for each language. For example, the code for English is en, the code for Maori is mi.

It would be possible to use a tag prefix symbol in front of each code so that we could search for tweets in that language. But we need to use a different tag prefix than is currently used for tweet topics. Ideally, we could use just a single non-alpha character: where # is used for topic tags, we could use something like the percent sign. So, a tweet in modern Greek might be tagged with %el.

It might also be useful to flag tweets written in a non-standard language character set. For example, because of the limitations of some Twitter clients, we might want an additional symbol to tag a tweet that it is in Greek but which is transliterated into an English character set. Eg %el!

Since there is a lack of documentation on which specific characters are distinguished by Twitter’s search function, any use of a new tag prefix to denote language will require some trial-and-error testing to ensure it works effectively. If the polyglot community of Twitter users could agree on such a coding system, it would make it much easier to find relevant posts in languages other than English.

Image: Brueghel’s Tower of Babel