Segment Visitors by Google Search Engine Position in Google Analytics

submitted by on Oct 26, 2012 at 11:18:07 am

Here is a neat trick you can do in Google Analytics using filters and advanced segments that will allow you to track your site's organic Google visitors by ranking position.

Step 1 - Create a Google Position Filter

The first step in creating these user segments is to create a custom filter in order to track ranking position for visitors coming from Google. Go to the admin tab in Google Analytics and click on the profile that you wish to segment. Click on the filters tab and then select "+ New Filter".

Name the filter anything you want. I'm using "Google Position". Next, select "Custom filter" as the filter type. Click the "Advanced" radio option and enter the following values:

Field A -> Extract A - Referral - (\?|&)(cd)=([^&]*)
Field B -> Extract B - leave blank
Output To -> Constructor - User Defined - $A3
Field A Required - Yes
Field B Required - No
Override Output Field - Yes
Case Sensitive - No

What this does is extract the cd parameter from the referring URL and stores it in the "User Defined" variable. Next we will create some advanced segments in order to track site activity by ranking position. Make sure you are not currently using the User Defined variable for anything else as this will override it. Once your filter settings looks correct, click "Save".

Please note that the Google Position filter will only apply to analytics data going forward and not to historical data. It can take a few hours after adding the position filter before you will see any data.

Step 2 - Create Advanced Segments

Note: I didn't realize you can share segment configurations so skip to the regular expression links below and click on each one to import its configuration into Google Analytics.

Now we will take the ranking position value we are storing in the "User Defined" variable and turn that into advanced visitor segments. Click on the "Assets" tab at the top and then on "Advanced Segments". We will be using regular expressions to break down our visitors into logical groups. Click on "+ New Segment" to get started.

We will name the first segment "Position 1". You should see one line that says "Include - [green box] - Containing". Click on the green box and enter "User Defined Value". Change the "Containing" drop down box to "Matching RegExp". In the text box to the right of the drop down, enter ^1$.

Next, click on "Add 'AND' statement". Click on "dimension" and enter "Source". Change the "Containing" drop down box to "Exactly matching" and enter google in the text box to the right. Now your segment should look like this:

If everything looks correct, click on "Save Segment".

Step 3 - Create More Segments

The next step is to create more segments. I've included a list of regular expressions that I use to segment visitors. Follow the steps above to create additional advanced segments, but replace the Matching RegExp value with the expressions listed below.

Position 1: ^1$
Position 2-5: ^[2-5]$
Position 6-10: ^(([6-9])|(10))$
Position 11-20: ^((1[1-9])|(20))$
Position 21-50: ^((2[1-9])|([3-4][0-9])|(50))$
Position 51-100: ^((5[1-9])|([6-9][0-9])|(100))$
Position 101+: ^(([1-9]0[1-9])|([1-9]{2}[0-9])|([2-9][0-9]{2})|([1-9][0-9]{3,}))$

Step 4 - Using Your Advanced Segments

Now that you've created the filter, segmented your visitors and waited a few days to get some traffic to analyze, it's time to start viewing the data. You can apply advanced segments to just about any report in Google Analytics by clicking the "Advanced Segments" link at the top and selecting the segments you would like to view. Additionally, here's a custom report that I made that shows keywords driving traffic by ranking position. Click the link below to add it to your own Google Analytics profile.

Share this

Request a Quote or call 888.991.9690

Receive a free site analysis when you complete the form below. One of our SEO specialists will contact you shortly to review your information and discuss your site goals and objectives.

If there are specific keywords you would like to have included in your reporting please add them to the message section above.

Search Toppers is an Adwords qualified company.