3 Ways to Deal with Google Preview visits in Google Analytics

So you may have heard that this new Google Preview functionality on the search engine results page is skewing Google Analytics data. Well, as it turns out, the page fetching that Google is doing (and that occurs when the page preview is NOT in cache), actually IS executing Javascript, which includes the Google Analytics tracking code.

This means that Google Preview fetches are showing up as a visits in your Google Analytics account.

Automated (bot) visits like this can inflate your visit counts and artificially reduce all of your per-visit metrics (pageviews per visit, time on site, value per visit, etc…), which, if you didn’t know what was causing this, might leave you wondering if your traffic quality has suddenly dropped.

Now you could always just filter out all the traffic from Google as an ISP, but to really focus in on Google Preview, here are three different ways to deal with this issue until Google addresses this problem, which will hopefully be soon:

We’re working on a solution for this, to prevent Google Instant Preview on-demand fetches from executing Analytics JavaScript. I’m not sure about the timeframe, but I’ll drop a note here when I have more to share. Thanks for your patience. (11-18-2010)

Option 1: Advanced Segment

Once the tainted data has been processed in Google Analytics, there’s nothing we can do to reprocess it or change it.  But we CAN change the way we view the data through Advanced Segments.  All we need to do is take what we know about the traffic we want to single out within our reports and create a segment that matches it.

So, knowing that these sessions originate from a Service Provider called “google inc.” and that these will be short, single page visits, we could do something like this:

 

This segment (here’s the link to this segment) will allow you to see exactly which components in your reports are originating from a Service Provider of “google inc.” that have the conditions on a bot visit that we would expect.  Is it perfectly, 100% accurate?  Nope.  But it WILL give you a baseline to see how this might be affecting you.  We’ve found this to be a relatively small percentage of visits across accounts thus far…here’s an example:

 

Option 2: Server Side with Custom Variable

While approximating this impact with an Advanced Segment may be the only way we can adjust past data, we can label these visits as Google Preview visits with custom variables as the data comes in.  This is much more accurate as it relies on the actual user agent that the Google Preview tool uses when fetching your pages:

Mozilla/5.0 (en-us) AppleWebKit/525.13 (KHTML, like Gecko; Google Web Preview) Version/3.1 Safari/525.13

So all we have to do is apply some simple logic…

if (the user agent is that of Google Preview) {
Set a Custom Variable to identify this visit
}

Easy enough. Here’s an example of what that might look like using PHP, but you can adapt this to any server side technology as needed:


$googlePrev=true;
}
?>

...

There you have it. Now you’ll be able to see these visits in your Custom Variable reports, as well as create a more accurate Advanced Segment (click here for the link to it) based on this custom variable, and you can even access Custom Variables in your Custom Reports.

Option 3: Server Side Exclusion

You may just not care to see any of the visits generated by Google Preview at all and just filter them completely out of your data.  If that’s the case, we can use the same logic as we did in Option 2, but rather than set a custom variable, we’ll just never render the tracking code for the Google Preview user agent.

Again, you can do this with any server side technology, but here’s what that code might look like in PHP:


$googlePrev=false;
}
?>

...




With this option, the tracking code will never fire for the Google Preview user agent, meaning the data will never get sent back to Google and will thus be excluded entirely from your reports.

Hopefully one of these three options will help you adjust for the impact of Google Preview visits showing up in your Google Analytics reports, and please share your ideas, thoughts and other options in the comments!


UPDATE: As of Nov 22, 2010 at about 3:30p PT, this issue has been resolved by Google. Please note that data will NOT be reprocessed, so Option 1 above can help you sort out affected data for past date ranges.

David Booth

David is a founding partner and principal consultant at Cardinal Path, as well as an author, instructor, adjunct professor, and regular speaker. As a consultant, David has advised and worked with companies and organizations across five continents in web analytics and business intelligence, statistical analysis and testing, technology selection and deployment, and online & search marketing. David is the author of Google AdWords Essential Training (Lynda.com, 2011) and Google Website Optimizer Essential Training (Lynda.com, 2010) and served as a technical editor of Performance Marketing with Google Analytics (Wiley, 2010) and Google Analytics Essential Training (Lynda.com, 2011). He is currently working on yet another project to be published in the Spring of 2012, and he teaches a masters level course on web analytics and online marketing at the Monterey Institute of International Studies. As an instructor and speaker, David has keynoted numerous events and has led seminars and sessions focused on digital analytics and search & conversion marketing all around the world for audiences ranging from C-level executives to technical implementation teams. He has been involved in web application development as an engineer and consultant since the late 1990's, beginning his career with Intel Corporation. He was a founder and partner at WebShare, LLC through its merger, and spent two years with the United States Peace Corps developing and deploying websites and web applications to attract grants and international aid for Guatemalan NGOs and local development organizations. David earned his Master of Business Administration in International Management from the Monterey Institute of International Studies and holds a B.S. in Electrical and Computer Engineering from the University of Illinois at Urbana-Champaign.

Share
Published by
David Booth

Recent Posts

Google Delays Third-Party Cookie Deprecation to 2025

Google announced on April 23 that it will again delay third-party cookie deprecation (3PCD) in…

3 days ago

Understanding Funnel Reports in GA4

Funnel reports have long been one of the most actionable reports in a marketing analyst’s…

5 days ago

GA4 Monetization Reports: An Overview

GA4’s Monetization reports provide organizations with simple but actionable views into the revenue-generating aspects of…

1 week ago

This website uses cookies.