Eternalistic Designs

Network Redux - Open source hosting

Google

Wait a minute... those aren't my stats!

Using Google Analytics Include Filters to Remove the Other Guy's Data

Traffic here at Nerdliness is generally pretty level.  Sure, there's the occasional spike on days we post new content, and the overall trend is in the upward direction, but viewed over a monthly timeline the graphs are roughly flat.

A couple of weeks ago, I was doing my daily OCD-ish perusal of the Nerdliness.com Google Analytics reports and started seeing something odd:  a substantial bump in visitors.  My first thought was, of course, that Someone Important had recently discovered our sheer awesomeness and was preaching our gospel, but reality soon set in.

After investigating a little further, I noticed that the Content reports showed that all this traffic was directed at a page that doesn't exist.  I looked through our Apache access and error logs, trying to find any references to those URLs and came up with nothing.  

On the off chance that I might have actually made some sort of mistake, I also compared the Google Analytics report to our Google AdSense data.  Our 404 page has a couple of AdSense blocks on it, so I figured that, if it was the result of a bad link and visitors getting a 404 error, we'd see a proportional increase in AdSense impressions.

Nothing.

Looked around at every report, log, and portent I could think of and found nothing.  Double-checked our AdSense code snippet, looked good.  At that point, I was reasonably sure that it wasn't on our end and started to suspect that, perhaps, someone else was using our GA code.

So I emailed Google Analytics support. 

References:

Google Maps/Amazon/Banned Books Mashup - Part 2

Geocoding with Google Maps API

When we last heard from Our Hero, we’d begun the joyous process of creating a simple Google Maps/Amazon mashup.  We took a peek at what the finished product should look like, we obtained our Google Maps API key, and we created our database tables and populated them with some data.  All good things.

We also talked about geocoding, that process of converting a street address into the coordinates (longitude and latitude) that Google Maps digs.  Our LOCATIONS table has some street addresses and empty columns just hankerin’ for some longitude and latitude info.  Let’s do us some geocodin’.
This zip file contains the source for all the codin' we're doing today:

http://www.nerdliness.com/files/updatelnglat.zip

You'll need those files to follow along at home.  While I'll break 'em down pretty much completely in the paragraphs to follow, I won't be reposting them in their entirety.  If you try to just copy-and-paste from the text below, you'll be sadly disappointed when your efforts blow up because of a missing variable declaration, etc.

 

References:

Creating a Google Maps/Amazon.com/Banned Books Mashup

Part One of God Only Knows How Many Steps...

And now for something completely different…

Sorry to disappoint all the little nerdlings who come around here only for the Drupal goods, but today’s post won’t be at all related to our favorite CMS.  We’ve talked about different Drupaly topics for weeks, now it’s time to shake things up a little.  Today, kids, we’re going to make a basic Google Maps mashup.

Yeah, I know.  The world needs another Google Maps mashup like I need a hole in my head, right?  Who cares.  They’re fun, and we’ll try to make our sample a little more interesting by throwing in a little Amazon.com action and some AJAX-y goodness.

So here’s what we’re shooting for:

http://www.nerdliness.com/ajaxdemo/

First of all, don’t laugh.  Jeremy’s the form guy, I only do function.  Sure, it ain’t much to look at, but it works and it’s kinda cool.  And if we wanted it to look nice, we’d pay Jeremy his surprisingly reasonable freelance rate to pretty it up for us.

Ok, so what’s the big deal?  What are we doing on that page?   In a nutshell, we’re plotting, on the fly, the locations of every public school in Texas that, according to the ACLU of Texas, banned a book during 2006.  I took the data from a PDF they release annually (http://www.aclutx.org/projects/bannedbookspg.php?pid=45) and used it to populate a MySQL table with the various data you see by clicking on the assorted links. 

References: