(This post has been updated as of 4/5/14 to reflect refinements to the filters as well as new caveats about Chrome.)
The Internet is becoming increasingly visual but the standard Google Analytics default lumps image search traffic in with organic traffic. The problem with that is these two types of traffic have radically different behaviors.
So here's a quick way for you to track image search in Google Analytics to gain insight into how images are performing for your business.
Image Search Referrers
After the last big image search update I was asked by Annie Cushing if I'd figured out a way to track images in Google Analytics. I'd meant to but hadn't yet. Her reminder led me to find out what was possible. I fired up Firefox and used Live HTTP Headers to look at the referrers for image search traffic.
I found that there were two distinct referrers for Google, one from Google images and one from images that showed up via universal search results.
Here's what the referrer looks like from Google image search.
The parts to note here are the /url? and the source=images parameter. Now lets look at what the referrer looks like from an image via universal search.
The part to note here is that the URL doesn't use /url? but imgres? instead. This means you can track traffic from each source!
But there's another wrinkle I discovered over time. Many of the international versions of Google use the old image search UX which also produces the /imgres? referrer.
In addition, most of these wind up being passed in the Google cookie as a 'referring' medium and not 'organic'. So you might be seeing Google domains cropping up in your referring reports (annoying!). Adding Full Referrer as a secondary dimension shows where the majority of these are coming from: imgres.
This means two things. First, we're going to have to create a special case for universal search on google.com so that it isn't mixed up with image search from international properties. Second, we're going to have to change the medium on the international image search traffic so that it is properly attributed to organic.
Finally lets take a look at Bing.
This is pretty straight forward and doesn't change based on whether it's from image search proper or via a universal result.
Google Analytics Image Search Filters
If you know the referrer patterns you can set up some Google Analytics filters to capture and reclassify this traffic into the appropriate buckets. Here's the step-by-step way to do that.
From Google Analytics click Admin.
That takes you to a list of profiles.
Here you can either create a new profile or select a current one. I'd suggest creating a new profile to test this out before you decide to integrate it into your primary profile. Because you might screw it up or just may not like the detail or may not want to have the change in continuity. That said, I've created these filters so they'll have the least amount of impact on your reporting while still delivering added insight.
Next you'll reach the profile navigation pane where you'll want to click on Filters.
At that point you'll want to go ahead and click the red New Filter button.
That's when the real fun begins and you construct a new advanced filter.
The first step is to name this filter. This won't show up in your reports and is simply a way for you to know what that filter is doing. So make it descriptive and obvious.
Next you'll want to select the Custom filter button (2) which then reveals a list of options. From that list you'll want to select Advanced (3). This is where it gets a bit tricky.
In step 4 you'll select Referral from the menu of options and then apply some RegEx to match the pattern we've identified. In this instance the RegEx I'm using is:
I love RegEx, which stands for Regular Expression, but I don't always get it right the first time and regularly rely on this RegEx cheat sheet to remind and guide me. In this instance I'm looking for all Google domains (and including any international domain using the new image search here) with /url and source=images within the referrer.
In step five you're selecting what you're going to do when a referrer matches your RegEx. I've chosen Campaign Source from the menu and then created a new source called 'google images'. You can name these whatever you like but I keep them lowercase to match the other sources.
You'll note that the 'Override Output Field' is set to Yes which means that I'm going to change the Campaign Source for those that match this referrer pattern from what it is currently to 'google images'. The great part about this is that you retain the fact that the medium is 'organic'. So all those reports remain completely valid.
Finally, you click Save and then you wait for the filter to be applied to traffic coming into the site. Depending on the amount of traffic you get from these sources, it may take a few hours to a few days to see the filter working in your reports.
Next we have to put into place a filter for Google universal images, Google images from international properties not using the current image search UX as well as Bing images.
The RegEx for Google universal search images is:
Note that I'm only looking to match referrers coming from google.com so that I'm not mixing international image search with US universal image search.
The RegEx for Google international search is crazy long and didn't really work pasted here. So instead you can click here to copy and paste the Google 'International' image search filter RegEx.
Now, many of the domains won't match because they're using the new version of image search, which will match the first filter we created. But I figured I'd just be as inclusive as possible instead of validating the current image search UX on each domain. (I mean, it's wicked time consuming too.)
Finally, the RegEx for Bing images is:
But we're not done! Close, but not quite.
Changing Google Analytics Medium Filters
So after having these filters in place for a while I noticed that some of the new sources I created were showing up as a medium of 'referring' instead of 'organic. That means you're still short-changing your organic efforts because Google is passing the wrong medium in their cookie.
So you have to create two new filters that change the medium of Google universal images and Google international images.
This is another Advanced filter but this one is much simpler but must be very precise. In Field A you're looking for the Campaign Source that exactly matches the source you created in the filter. For me, that means 'google international images' and 'google universal images'. For you, it's whatever you named the new sources.
Then you're simply outputting and overriding the Campaign Medium to organic. Remember, you'll create two of these. One for the 'international' images and one for 'universal images'. My guess is that you might only need the one but I want to cover my bases.
To simplify, all your doing here is looking for the sources you created and then making sure that the medium associated with those sources is changed to organic.
Image Search Filter Order
The final step is to make sure that your filters are in the right order. The last two filters that change the medium based on a specific campaign source (that you created) must come at the end.
This makes sense right? You couldn't match a source that you hadn't already created, right? Stick to this order and you'll ensure image search traffic is tracked appropriately.
Image Search Reports
So what do you get to see in the reports?
This is data from a client site where I've had all the filters in place for a few days. The medium for all of these is still organic but I've now got new sources for google images, universal images and bing images. (Update on 4/5/14) I've been using these filters successfully for a year now.
What you should see right away is the very large difference in how this traffic performs. Image search traffic in this instance has a 1.5 Pages/Visit and 3:00 Avg. Visit Duration while the web based organic traffic has a 6 Pages/Visit and 6.00 Avg. Visit Duration.
Most importantly, the conversion rate on these two types of traffic is different as well. Segmenting your image search traffic can bring more clarity to your analysis and help you make the right decisions on what's working, how to allocate resources and what to optimize.
Image Search Filter Validation
So how do I know this is really working? I drill down into one of these new sources and then select keyword as the secondary dimension. Did I forget to mention that the keyword data remains in tact?
Yup, sure does! So the next step here is to see if there really is a universal result for these keywords.
Sure enough, I'm the second result in this universal search result. Now lets see if the filter for normal image search is working.
I'll use 'wifi logo' as my target term and first go to make sure that I'm not showing up in universal search results.
Nope, not showing up there. But am I showing up in Google image search?
Sure enough I'm there just inside the top 100 results from what I can tell. So I'm pretty confident that the filter is catching things and bucketing them appropriately. I've also validated this with very robust client data but can't share that level of detail publicly.
What Is images.google?
You might have noticed the images.google source above. What's that you ask? I don't know. But I don't think it's traditional image search traffic since the user behavior of that source doesn't conform to the other three image based sources. It's also a small source of traffic so while my OCD senses are tingling I'm currently ignoring the urge to figure out exactly what images.google represents.
Tell me if you figure it out.
The big question is why I wouldn't just use the Google Webmaster Tools queries report and filter by image right? Well first off, the integration into Google Analytics still isn't where I'd like it to be making any type of robust reporting near impossible.
In addition, I don't like mixing image search traffic with web search traffic in my normal reports because they're so different. It makes any analysis you do using that mixed data less precise and prone to unintentional error.
More problematic is the fact that the data between Google Webmaster Tools and Google Analytics doesn't match up.
I started looking at specific keywords via my filters versus what was reported in Google Webmaster Tools. There were just too many times when Google Webmaster Tools reported material amounts of traffic that wasn't showing up in my Google Analytics reports.
Here you can see that the top term received 170 clicks in this time frame. Yet during the same time frame here's what the Google Analytics filter based method reports.
170 versus 24! Even if I factor in the (not provided) percentage (which runs about 35% for this client) and add that back in I only get close to 40 visits.
But that's when the lightbulb went off. Maybe Google Analytics is reporting Visits while Google Webmaster Tools is reporting Clicks?
While I can't confirm this I'm guessing that Google Webmaster Tools is counting all clicks on a result. Many of those clicks are going directly to the image and not the page the image resides on. That's important since direct clicks to the image (i.e. - .jpg files and the like) aren't going to be tracked in Google Analytics as a visit. There is no Google Analytics code on these files. The delta between the two could be the number of users who clicked directly to the image.
In addition, this method doesn't catch any of the mobile clicks and visits since no image search visits (and very few universal images) show up using this filter when looking at mobile traffic. I'm pretty sure that the referrers are just getting stripped and these wind up going into direct instead which is part of the iOS and Android 4+ search attribution issue. (If someone else has an explanation here or finds a different referrer for mobile image search please let me know.)
Finally, there's something funky with Chrome. When I look at the distribution of traffic to each bucket Chrome is an outlier for Google images.
That 3.7% is just way out of proportion. And it's not related to the amount of (not provided) traffic since Firefox actually has a higher percentage of (not provided) 72% than Chrome (64%) in this instance. So I can only conclude that there's some amount of data loss going on with Chrome. Maybe that also contributes to the discrepancy I see between Google Analytics and Google Webmaster Tools.
This got even worse as of January when Chrome stopped passing rich referrer information.
I can only guess that this is part of Google's security and privacy efforts. Sadly, it means you're capturing a lot less detail about image search and your data will be less accurate because of it.
Despite all of these caveats I love having the additional detail on image traffic which has wildly different intent and user behavior. Some insight is better than none.
Apply a few simple Google Analytics filters to gain insight into how much traffic you're getting through image search. This is increasingly important as the Internet becomes more visual and the user behavior of these visits differs in material ways from traditional search traffic.