James.Cridland.net

James Cridland's blog

Where radio and new platforms collide. With beer.

« Previous Entries | Next Entries »

Google Charts API - using PHP

Thursday, December 6th, 2007

Google have just released the Google Chart API which enables you to produce swizzy graphs like the above, which is the total ‘hours-listened’ to BBC Radio 1 from March 1999 to September 2007.

In their API documentation, they publish some JavaScript code to help with encoding the URL.

I’ve quickly whipped up a near-equivalent in PHP, which you’ll find here.

I’ll not be using it in its current form, at least not replacing my ugly home-grown graphs: the API doesn’t add labels above the data, which I currently use - but it’s a really handy bit of code from Google, and I might use it elsewhere. Thanks, chaps.

When Content Restriction and Protection goes bad

Saturday, August 11th, 2007

Universal Music Group, Milan

If you follow the world of Content Restriction and Protection, aka DRM, it’s been an interesting week.

First came the news that Universal Music are trialling DRM-free music sales. This is big news; they’re the largest music company in the world, and they’re joining EMI in removing restrictions on music sales. And, while they’re still having an icky fit with Steve Jobs and refusing to do this in iTunes, it’s still very interesting; and comes hot on the heels of some research showing that people don’t like DRM.

The slightly more hidden story is probably rather more interesting. Boing Boing reports that one company is closing its video store - with the result that “after August 15, 2007, you will no longer be able to view your purchased or rented videos.” Yes, you thought you’d bought that copy of Star Trek - but you hadn’t. And now, this company is taking it away from you.

If your local Virgin Megastores went bust, you’d still be able to play the CDs or DVDs you bought from it. Indeed, if the record label went bust, that still wouldn’t render the CD unplayable. But in the heady world of DRM purchases, this is exactly what can happen. And, as this story shows, is happening.

So, as consumers buying products with crap in them - content restriction and protection in the form of DRM - we need to be more careful than ever before. Because if the deal we’ve got is too good to be true, and the company goes pop: so does your music. This is a massive step-change. We’ve never before had to be aware of the financial health of the companies we buy entertainment products from.

Being fair on the video store company involved, they are apparently giving you your money back - at least, in vouchers for their online payment system. It’s highly unlikely that a bankrupt online video store could do that; instead, you’d just be left with useless files, and no refunds. At least, the people behind the ‘uncrackable’ DRM would tell you they’re useless files. A quick Google search would tell you otherwise.

Mind you, a quick Google search would help pay for your refund. Because the company that has closed its video store and rendered its videos unplayable… is Google.

I’m on a Google website

Tuesday, August 7th, 2007

The nice people at Google AdSense recently asked me to go and speak at a roadshow of theirs at BAFTA. Well, it was a few months ago now, I think, but still, as of today, a video of the event, including me in a suit, has appeared on the Google AdSense blog.

I ought to point out that no, I wasn’t paid to appear; no, I didn’t just say nice things; and no, I even had to ask nicely for the bags that the delegates got. I was only wearing a suit because… I think I was meeting up with future colleagues that morning, and thought I’d fool them that I normally wore a suit. Ah, ha ha ha. Suckers.

I did meet the famous Ivan, who irritatingly still wasn’t wearing a check shirt, but had bothered to shave a bit since his appearance on the blog. That’s him in the video, looking concerningly at me as I said something of not much importance. Seemingly Very Slowly.

Anyway, it’s nice seeing my ‘weekend job‘ getting a little limelight now and again. The chaps at Google were quite nice. There was free internet, and sandwiches, and it was so close to work, I was able to tiptoe off to work and tiptoe back whenever I chose, which was good. However, no free, um, whatever Google might give away for free. Here’s hoping they do rucksacks this year for Christmas presents. I’d like that.

Gmail - is the spam filtering getting better, or is it just me?

Sunday, June 10th, 2007


Photo by Robert Llefi, used under licence

I might as well be honest. I am a Gmail fanboy. I think it’s fabulous.

Whether I’m using it from abroad, or removing out of office replies, or using the mobile application, I appear to have blogged about it quite a lot in the past.

So, why stop now…

A recent addition to my Gmail-chomping armoury is better Gmail plugin for Firefox. Among other things, it automatically makes your session secure (using https://), and has a number of useful “should have been in Gmail all the time” type hacks - like a ‘filter assistant’ which makes it easier to filter emails, or a simple ‘mark as read’ button. Finally, there are some skins, too - tweaking the look of Gmail to make it easier on the eye. If you use Firefox, this is highly recommended.

I don’t use Google Apps, but just a regular Gmail account. As a byproduct of this, I run my own mailserver (to forward my emails over to Gmail and do some rudimentary rewriting), and pipe all my mail through SpamAssassin. As a result, mails with suspected spam are marked [5pam], and automatically filtered away within Gmail. Until recently, this has been a massive improvement to my spam filtering - it’s caught a ton of pieces of spam that the standard Gmail filters were incapable of. (I should mention here that I get 18,000 pieces of spam a month, so any reduction is a good plan).

However, I think about a month ago, I noticed that this was getting less useful: because Gmail has, all of a sudden, got much better at spotting spam. Much better. Instead of my setup catching around 100 additional pieces of spam a day, it’s a lucky day now if it manages to catch three pieces of email that Gmail has unaccountably ‘missed’.

Are you seeing this Gmail improvement?

I’m also, this month, using Google Calendar exclusively to schedule my working week. This is already being a great success; but that’ll be a proper review, I guess, later.

(As a small hello to the lawyers - yes, it’s called Google Mail here, yes, I know. I’m using the name Gmail here since that’s what the rest of the world knows it as, mm’kay?)

Buy Google keywords to get over Google’s freshness

Saturday, June 2nd, 2007

An interesting post from Steve Safran’s Lost Remote, where he recommends buying Google keywords for, say, your station’s weather forecasts.

As an example, a quick search for Sheffield weather doesn’t return anything from Hallam FM, the local radio station for the area; and the BBC’s the top result. Well - nearly the top result. The top result is actually… the weather forecast. Rather negating the point.

However, I would also recommend you buy Google keywords, for one reason: Google’s never fresh enough.

One example - do a search for Derby result, to discover who won today. The best match is the top result, but that’s a page that (at the time of writing) Google had last looked at on May 22nd. (Epsom racecourse cleverly published a page ahead of time; clicking on that result reveals the winner).

Later this month, Muse are playing in the new Wembley stadium. People will search for Muse Wembley pictures after the event - and, I’ll bet, not find much. You see, Google’s main search results are produced, for many sites, monthly or fortnightly.

This is where Google keywords come in. If you were to buy ‘Muse Wembley pictures’ for just a day or so, you’ll catch that traffic: doing Google’s job before its crawlers come along and take a snapshot of that page. And a secret: certainly in the tests I’ve done, Google’s search engine appears to be influenced to look at your AdWords target page fairly quickly after you start advertising; so you can stop the ads fairly quickly, once you appear in the organic search results.

So - if something important happens, whack it into Google Adwords, and watch the traffic come in (even after you’ve stopped paying for it). That’s my tip of the day.

.

Disclosure: a site I run earns revenue from Google AdWords.

My Mac is homesick

Tuesday, May 29th, 2007

But with the new ‘Google Maps Street View’ it can see home. Aw.

Actually, I’m really rather impressed: you can ‘walk’ the streets of San Francisco, turn around, and do virtually anything.

This Mac came from the San Francisco store you see here - an impulse purchase (easily the most expensive impulse I’ve ever made!). On the right-hand side is the Virgin Megastore, the thing that brought me to that part of town (ostensibly for some copyright-free images).

It’s like memory lane, except without the long plane ride.

We need better web statistics

Sunday, May 13th, 2007

Robert Scoble posts an interesting post (which I found via John Naughton, though I subscribe to Scoble too) about his perceived inaccuracy of comScore, Alexa, Compete, etc. I’ve long learned, through subscribing to Scoble’s link blog, that if you mention him he’ll generally find and share your post. So, hello Scoble, and here’s a little bit of info you might enjoy.

Media UK does over 2m pageviews a month, so it’s a pretty good website to check that website reports do the right thing. Since they’re my figures, I can share them with impunity. So, just so you can see how comparable these services are, here are the output of three graphs (showing the last 12 months), which I’ve cropped and resized to enable at-a-glance comparison…

ga_visits.gif
Google Analytics, showing total visits per day.

ax_visits.gif
Alexa, showing daily unique visits per day (not quite the same)

compete_visits.gif
Compete, showing total visits per month, ending in March.

[If you have full Hitwise access, you should hopefully see a similar graph for the last 12 months to GA. If you do, contact me, since I'd be interested to see the graph for 'visits', and publish it here.]

Well.

Given that Google Analytics (”GA”) gets a near-100% coverage of all visits to mediauk.com - the code’s on my site - it should be telling “the truth”.

The first thing you’ll spot from the above is that Alexa and GA both show two major ‘traffic hits’. One is over Christmas, as you’d expect. The other is interesting: I can’t adequately explain why Alexa showed a major reduction in August. According to GA, I had precisely no visits for three days: I removed the GA code by mistake from the pages. So why does Alexa show a reduction too? Do they have some kind of link with GA? Removal of the code didn’t cause any errors causing pages to not complete loading, so that’s out of the frame. Curious. How else would you explain it? Curious.

The second thing you’ll spot from the above is that GA shows a modest increase, whereas Alexa shows a modest decrease. However these figures are derived, it’s my contention that all services should show a similar trend: if total visits increases, it will do on all services. This clearly isn’t happening. Now, Alexa only shows a ’share’, and it’s possible that total web traffic has increased faster than my own: do we buy that as an argument?

The next thing you’ll spot from the above is that Compete shows absolutely no correlation with the figures you see. The disaster around Christmas (according to GA) seems to result in tremendous figures in Compete.

Compete and GA both return a “monthly total visits” figure. I’ve always believed this is the most useful figure for a website, since it shows how often people are consuming your content, as well as how many people also come to your site (the radio equivalent would, I guess, be ’share’). It also ignores any page-view issues caused by Ajax and other technologies, and the fact that you’ve hundreds of pages doesn’t skew the figures too: it’s a great metric to use to show website popularity. A ‘visit’, just to be clear, can be one person visiting many times, as well as one person visiting occasionally. Compete and GA both publish visit figures for my website. And the figures are, for last month:
- Compete: 5,000 visits a month
- GA: 439,000 visits a month
That is a not unsubstantial difference. But Compete is, apparently, only measuring US traffic; so perhaps I should only look at mediauk.com’s US traffic, to be fair. So…
- Compete: 5,000 visits from US in March 2007
- GA: 17,568 visits from US in March 2007
So, on this evidence, Compete is under-representing my traffic by over two-thirds - as well as demonstrably not following any trends in mediauk.com’s site traffic. The figures are almost entirely unrelated to my website’s traffic. This is bad. Are websites basing purchase decisions on Compete’s data? In which case, do I have a legal case against them?

We’ve not, yet, mentioned comScore. That’s a blog post for another day, I suspect: because there’s so much more there than meets the eye, it’s not funny.