Working Around Sampled Search Data in Google Analytics

By on in with 2 Comments

I got into a discussion of sampling in Google Analytics  with SEO expert and Web PieRat Jill Kocher earlier this year, which led to some profile/filter noodling that seemed worth sharing. Specifically, Jill and I were discussing how, in the world of search engine optimization — where the long tail can be a handy thing to analyze — sampling in Google Analytics can be a real nuisance.

That got me thinking that a partial solution would be to have a Google Analytics profile that only includes organic search traffic. This isn’t a profile that you would use for cross-session analytics, but it’s one that would allow simplified segmentation, reduced cases of sampling, and, perhaps, a more complete data set.

As it turns out, it was pretty simple to set up, and it seems to do the trick.

Step 1: Make a New Profile

Create a new profile under the same web property that you’re using for your site and name it Organic Search Traffic Only:

There’s nothing magic about this. The key is that this is a profile that uses the same web property ID as the profile where you’re running into sampling issues with your SEO analysis. We’re just going to take that same feed of data coming in as visitors visit your site and carve out the subset of that data that is traffic from organic search referrals.

Step 2: Apply an Organic Search Filter

The next (and final) step is to create a filter and apply it to the profile such that only organic search traffic is included.

In the new profile you just created, select the Filters tab and then click New Filter:

From there:

  1. Give the filter a name like “Organic Search Referrals”
  2. Select Custom Filter as the Filter Type
  3. Set the filter as an Include filter
  4. Set the Filter Field to Campaign Medium
  5. Set the Filter Pattern to “organic”
  6. Save the filter

The screen below shows the filter settings:

Step 3: Sit Back and Let the Data Roll In

The profile is only going to include data from the point you set it up going forward. But, it will accurately reflect (to the extent that any web analytics package can accurately reflect this) new versus returning visitors for all time (well, since you initially implemented Google Analytics), because it’s getting that data from the cookie that already exists on users’ machines.

Initially, I saw some odd data on the unique visitors front, which I can semi-intuitively understand…but not quite explain.

Suffice it to say that, once you have the profile up and running for a week or so, you can select the Non-paid Search Traffic segment in your main profile and compare it to the All Visits segment in your new profile, and the numbers will be virtually identical. But, you can now do SEO analysis with a base set of data that only includes search traffic.

Is that handy?

Similar Posts:

2 Comments


  1. I hadn’t thought about tisteng up a second or third profile for all the filtered results. That’s an excellent idea.I noticed when I set up the second profile it had the exact same UA string. I thought it would add a -2 or -3 at the end. Is it OK if it’s the same string? I guess technically it is the same tracking code I’m simply filtering on Google’s end when I view reports. Is that correct?

  2. That’s right — it’s the same web property ID. You don’t make any changes to the site, but, rather, make a new profile on the backend that only includes a subset of the traffic.

Leave your Comment


Notify me of followup comments via e-mail. You can also subscribe without commenting.

« »