Adjusting Cross-Domain Analytics Data

Anyone that’s used Google Analytics to track cross-domain requests has probably run up against the fact that Analytics adds some really ugly GET variables to the end of your URLs when you click on links. Not only are they ugly, but they also can stop things like WP Super Cache from caching your pages. We also found that the query string appended by Google Analytics was causing server errors when appended to the URLs of some of our hosted apps.

There is a little-publicized feature in Analytics, though, that lets you change the query string into a hash string. Therefore, instead of having some long, ugly string that can mess things up (and, to be honest, long, confusing query strings can sometimes scare users); you get a long, ugly hash appended to the URL, instead (which has no effect on the way the page is rendered, and, therefore, doesn’t mess up nearly as many things).

Read More
WordPress: A Tip About WP Super Cache

First of all, let me apologize for having been so absent over the last few weeks. As you may or may not have heard already, we just launched the new website at University of Mary Washington, and things have been hectic trying to put the final pieces into place.

One of those final pieces was to get WP Super Cache up and running on the site, in order to keep our server from overloading. When we first launched, I didn’t realize that we didn’t have the plugin configured properly, and our various plugins and theme functions really started to drag things to a crawl.

After doing a lot of digging and debugging, I found that WP Super Cache was ignoring cached files throughout our server because they all included GET variables.

Read More
Handling One Radio Button With JavaScript

Today, I discovered an issue that I have probably encountered in the past; but it’s been so long I forgot about it. I had some JavaScript set up to select a radio button based on text input, and then update the text based on the selected radio button (it’s a TinyMCE plugin that inserts a shortcode into the WordPress visual editor). Throughout all of the testing I performed, everything worked just fine. Today, though, someone else was testing the interface and could not get the text or the radio button to update properly.

After a bit of testing and messing around with the interface, I finally discovered that my JavaScript wasn’t recognizing the existence of the radio button on the form. After a bit more testing, I realized that’s because only one radio button existed; and JavaScript doesn’t treat radio buttons as arrays when there’s only one instance. When I had been testing before, I had multiple radio buttons, so everything worked; but now there was only one button, so it fell over.

Read More
Setting up WordPress MU Domain Mapping on GoDaddy

I recently worked with a client to help move a GoDaddy “WebsiteTonight” website into WordPress. In the process, I recommended that she turn her existing WordPress website into a multisite installation, set up her second site as another site in that install, and then set up domain mapping to give each of the websites a separate domain name.

This setup allows her to login a single time, and be able to switch back and forth between the sites to perform edits. It also makes it simpler to manage plugins, update WordPress and keep the theme consistent between the two sites.

Read More
Some WordPress Gallery Features You Might Not Know About

The other day, I was playing around with the WordPress [

] shortcode, and came across the need to exclude an image that was attached to the page. The image I needed to exclude was kind of like a featured image, and I didn’t want it to appear again in the gallery itself. So, I searched for information about excluding images from the WordPress [

] shortcode, and came across the related WordPress Codex article.

While reading that article, I noticed a handful of features I’d never known about in that particular shortcode. After all, I always basically assumed that the options WordPress gives you when inserting a gallery were probably the only options that were available.

Read More
Google Launches Initial Google+ API

googleGoogle’s latest attempt at social networking, Google+, now has a new first-cut at a developer API. The Google+ Platform blog has info on the release of the new API.

Startup blogger Robert Scoble put together a list of some of the feedback on the new API – it seems the reaction is mixed. RSS creator Dave Winer says Google “doesn’t get it”. Why am I surprised that a company who has a VP, Bradley Horowitz, post on Twitter that he only cares about Twitter users with over 100,000 followers might not fully understand how to promote a new API to developers?

The Google Plus team notes that they are using the follow existing standards and best practices where they can:

  • Our API methods are RESTful HTTP requests which return JSON responses.
  • Our payload formats use standard syntax (e.g. PoCo for people info, ActivityStrea.ms for activities).
  • We use OAuth 2 for secure trusted access to user data.

The Google Plus API is located here if you want to start to play with it.

Read More
Please Stop Using cURL in WordPress Plugins

WordPress HTTP class usage

Unfortunately, I keep finding WordPress plugins that try to call cURL functions directly. Unfortunately, not only do these plugins fail to work if cURL isn’t installed, it throws a fatal PHP error in the process.

The problem with using cURL in WordPress plugins is that WordPress solved that problem more than 2 years ago by implementing the WP_Http class. WP_Http is a class included in the WordPress core that has multiple options. One of those options is cURL, but it gracefully reverts to other PHP functions if cURL isn’t available.

Basically, anything you can do with cURL can be done with the WP_Http class, and it will allow your plugin to be much more versatile and compatible with more server setups.

Read More
Adding an ICS Event File to Google Calendar

If you register for webinars, conferences, meetings, etc. on a somewhat regular basis, you are probably familiar with ICS files. An ICS file is an iCalendar file; and can contain a single event or an entire calendar feed. Online registrations and event notices tend to make use of these files quite a bit, because they offer a one-click method for people to add the events to their calendars.

If you’re using Outlook, Thunderbird, iCal or just about any other desktop calendar program, you simply download the file, open it and save the event to your calendar.

However, if you’re using Google Calendar, things get a little bit trickier. There’s no simple way to open the file and have Google Calendar take over from there. Instead, you basically have to understand how Google Calendar expects ICS files to be used (why the system uses this logic is kind of beyond me; but that’s the way things are). Google Calendar, for some reason, does not seem to expect people to use ICS files to add individual events regularly. Instead, it uses the logic that an ICS file should include a calendar “feed”, similar to a website’s RSS feed, that would contain a complete list of events.

Read More
Gmail’s “Add to Calendar”

A while back, Google unveiled a new feature in Gmail that automatically scans the message currently being viewed, checks for a date and time in the message body, and, if found, adds a link allowing you to add the item directly to your Google Calendar (as shown in the image on the right). Lately, I’ve noticed that that algorithm has improved greatly. I used to see the “Add to calendar” feature only appear in very rare cases, but I am now seeing it almost every time I am viewing a message that I want to add to my calendar.

Read More
Firefox and HTML5

Earlier this evening, I was reminded of just how primitive the HTML5 support was in Firefox 3.5/3.6. While we have seen three major version releases since 3.5, it was actually still the latest version of Firefox less than 6 months ago (and was that way for almost 2 years). Therefore, Firefox 3.5.x still holds a decent amount of market share (probably as much as, if not more than IE6 did a year or two ago). Looking at a handful of websites for which I have analytics data, versions of Firefox prior to 4 still accounted for anywhere between 2% and 15% of the total visits to those sites last month.¬†With all of that information, it’s probably still important to make sure your sites work in versions of Firefox as far back as 3.5.

There are two somewhat major gotchas in the way Firefox 3.x handled HTML5. The first is easily fixed with a few lines of CSS. The second can only really be fixed if you rewrite some of your HTML.

Read More

Join our team

Do you enjoy technical writing? Care about cross platform mobile apps, HTML5, Javascript and Ninja's? Write for us! We would like to hear from you, get in touch!