Google Analytics For Local Search Part 1 of 7: Tracking Traffic From The 10 Pack
1-877-660-3735

Blog email subscribe

  • This field is for validation purposes and should be left unchanged.

Google Analytics For Local Search Part 1 of 7: Tracking Traffic From The 10 Pack

Posted by Mike Belasco on June 30th, 2009

Filed Under:

Share This Post:

2010 SEMMY WinnerWelcome to the first post in a series of seven on how to optimize Google Analytics (GA) to track your local search engine optimization project. Working with as many ‘local search’ clients as we do it is important for us to get the most information about our local search campaigns as quickly and efficiently as possible from Google Analytics. This series describes a sequence of steps we take to customize and optimize Google Analytics to best serve our needs.

It wasn’t easy to pick the simple name for this series just to let you know. Other options included ‘How to Pimp Out Google Analytics for Local Search’ and ‘The First in a Septagonal Literary Novella Regarding Silicon Valley-Based Google’s Analytical Programming and How Said Programming May Equate to a Dire Need to Reconsider Your Stone Age Point of View on Such Exigent Commodities as Local Search.’

In this post we are going to describe how to track traffic from Google Universal’s local results which get embedded into to the organic results pages. These results are commonly called the one-pack, three-pack, or ten-pack depending on how many local results are included (typically with a map) on the organic search results pages. Martijn Beijk has on excellent article on exactly this topic on Mike Blumenthal’s blog. This article expands on Martijn’s first of two options for tracking local traffic from Google’s Universal Search (GUS) results . Of course if you are not yet ranking in the local Google Universal results, you may want to check out this article on Local Search Ranking Factors first. The steps to properly track and analyze your local traffic from Google’s Universal Search results are:

1. Use a ‘local vanity’ URL as your URL in your Google Local Business Center listing

2. Create a ‘tracking’ URL

3. Set up a redirect to 301 redirect your vanity URL to a real ‘tracking’ URL

4. Update your GA Snippet to allow # instead of ? to denote URL parameters (or use the canonical element)

5. Configure Advanced Segmentation in GA to view results

1. Use a ‘local vanity’ URL as your URL in your Google Local Business Center listing
You need to use a different URL in your Local Business Center (LBC) listing so that you can track the traffic that comes from your listings. This is also another opportunity to ‘optimize’ your listing further as I typically recommend using the city name you are targeting as the ‘vanity’ sub-directory. For example seOverflow uses http://www.goinflow.com/denver as the URL in our LBC listing.  In step 3 we’ll cover the fact that at this point the URL you just made up returns a 404 error since the page doesn’t exist.

2. Create a ‘tracking’ URL
We are going to be treating local traffic from GUS as a ‘campaign’ in order to track users properly in Google Analytics. GA provides a URL builder tool where you can integrate the necessary campaign tracking variables into your URL with ease. Head on over to the tool and fill in the variables as shown here (substitute your main url for seoverflow.wpengine.com):

url-builder2

Campaign Source: google

Campaign Medium: localpack

Campaign Name: google-universal-local

Now copy the URL that was generated and change the ? to a #. Your URL should look like this.

http://www.yourdomain.com/#utm_source=google&utm_medium=localpack&utm_campaign=google-universal-local

3. Set up a redirect in htaccess to redirect your vanity URL to a real ‘tracking’ URL

At this point you’ve got a local ‘vanity’ URL that doesn’t go anywhere and a tracking URL not in use yet. You’ve got to tie the two pieces together and here is how. We need to 301 redirect the vanity URL to the tracking URL. In order to do this (assuming you are using an Apache web server) you should add this line of code to your .htaccess file:

redirect 301 /vanityurl http://www.yourdomain.com/#utm_source=google&utm_medium=localpack&utm_campaign=google-universal-local

That’s it! If you are not using a web server where you can edit an htaccess file to place this redirect, check other resources for help on creating 301 redirects.

4.  Update your GA Snippet to allow # instead of ? to denote URL parameters

Traditionally URL parameters such as those found in your tracking URL come after a ? in the URL.  However we replaced the ? with a # remember?  The reason we did this is search engines such as Google don’t consider URLs with # in them as ‘duplicate content’, saving us from any future problems. Now we need to tell Google Analytics about our change so that it can still track our campaign properly as by default it is expecting a ?. To do this, add the line in bold to your current Google Analytics tracking code snippet.

<script type=”text/javascript”>
var pageTracker = _gat._getTracker(“UA-XXXXXXXX-X”);
pageTracker._initData();
pageTracker._setAllowAnchor(true);
pageTracker._trackPageview();
</script>

Alternatively you could not change the ? to a #, and not add the line to your GA code. In this case to prevent a duplicate content problem you can make use of the newer canonical URL element by placing this code in the head section of your landing page:

<link rel="canonical" href="http://www.yourdomain.com"/>

5. Configure Advanced Segmentation in GA to view results

Now finally comes the fun part. You get to use GA’s new Advanced Segmentation feature to view stats about your visitors who clicked on a local Google Universal Search result to get to your site. First you need to create an Advanced Segment to identify the visitors. To do this, first click on the box next to ‘Beta Advanced Segments’ at the top right of your Dashboard page then click ‘Create a new advanced segment’.

beta-advanced-segments

Now you are on the Create Advanced Segment screen. Click the traffic sources drop down under the ‘Dimensions’ menu on the left. Drag the ‘Campaign’ box to where it says ‘dimension or metric’ on the left. Leave Condition as ‘Matches Exactly’ and then enter ‘google-universal-local’ as the value. Name the segment towards the bottom ‘Local Universal Search Traffic’ and click ‘Create Segment’.

advanced-segment

Now that you have an advanced segment established, you can view data for your visitors who belong to this segment right along side the numbers for ‘all visitors’ or any other segment. To do this click on the ‘Beta Advanced Segments’ box again then place a check mark next to your new Custom Segment and click apply.

select-advanced-segment

You’ll notice the keywords people used to find your local Google Universal Search listings don’t show up in the Traffic Sources -> Keywords report. You can find the keywords that were used by going to Traffic Sources -> Campaigns -> google-universal-local and then choosing the ‘Keyword’ dimension from the drop-down.

Thanks for sticking with this somewhat detailed and technical post. In the next installment we’ll discuss how to take a deeper look at what visitors from your ‘region’ or at least the regions you are most interested in are doing on your site.

*Disclaimer – by following the steps above you will not only be collecting data on visitors from Google’s Local Universal Search results, but you will also be tracking visitors directly from Google maps as well. In our experience most of the traffic comes from the GUS results and not Google Maps, but proceed at your own risk.

seOverview: Local Edition
If your local business is not ranking well in Google’s local ‘ten-pack’ when someone is searching for the products or services you offer in your area, you may be missing out on hundreds of customers or more each month. Yahoo Local and other local directories are also very important sites on which to have presence.  Now you can get custom recommendations about your local search optimization with  seOverview: Local Edition help YOUR local businesses achieve maximum presence in the local search results.

About 

Mike has been honing his internet skills since the early 90s, in both corporate and start up environments. Today, Mike’s companies, Inflow and its sister company, ConversionIQ, make Search Engine and Conversion Optimization available and affordable to companies of all sizes.

Share This Post:

17 Comments on “Google Analytics For Local Search Part 1 of 7: Tracking Traffic From The 10 Pack


    This sounds fantastic and I plan on testing it, but I had a question. If you update your URL in the LBC to a landing page that redirects to a tracking URL, will this negatively impact your local listing since your URL will be different across local directories, IYPs, etc?

    For example, in your Google listing the URL would be example.com/xyz, but in the local directories and IYPs the URL listed would be just example.com (without the landing page).

    I’m wondering if this will negatively impact local rankings or cause Google to lower their “trust” in your listing since it differs from other sources….or is Google mainly concerned with just company name, address & phone number (NAP)?

    Thanks!


      John,
      We have not seen any negative effect from having a slightly different URL in the listing. Since some listings don’t even have URLs I would tend to think this is a very minimal factor if at all. Good luck!


    This is a great and informative tutorial but I have to ask, isnt there an easier way to do this?

    If you own your listing you can now get results from there as well, and I do believe GA shows results from maps as referrer site under Google… ?


      not that i know of, Sure you can get some information from the reports in the LBC, but they only show click-throughs to your website and not what happens after they get there.


    I’m a little new at this, but it looks like it’s all working. Thanks for the post, it’s extremely important to prove to the client that what we do is measurable!


    Thanks for the tutorial. With blended search and universal search, that becomes really relevant to track incoming from segments.
    I’m just wonderring why do not use directly the Analytics in the Google local business URL ?


      Hi Patrice, I am not quite sure what you are suggesting. Perhaps the data made available in the Google Place Pages Dashboard? That is very good data, but doesn’t show you what happened after a visitor comes to your website.


    I have been researching this and came across instructions that were much simpler.
    I hope they work. I got an “under review” when I made the change.

    http://www.yourbusiness.com/?utm_source=google&utm_medium=organic&utm_campaign=local


      interesting, will you please share the link where you found the simpler instructions? Never seen the under review before after doing this dozens of times….


        You’re likely seeing the ‘Under Review’ as part of the campaign URL features the word ‘Google’.


    Mike,

    Great post. Followed steps 1, 2 & 3, which were pretty straight forward. There is a question though regarding the Traditional vs the Asynchronous codes.

    We are currently using the Traditional GA tracking code which is similar to your snippet minus the following deprecated line: pageTracker._initData();.

    I am considering replacing the Traditional with the new Asynchronous code and splitting it between the Head and bottom of the page to help with page rendering.

    Does the pageTracker._setAllowAnchor(true); line need to be added to the Asynchronous version and if so should it follow the _gaq.push([‘_setAccount’, ‘UA-XXXXXXX-X’]); line or should it be located elsewhere?

    Arthur


    Congrats…for 2010 SEMMY Winner in Analytics …Exllent Article for web Master…Thanks for sharing to us…


    Wait a sec. Back up. Mike – you’ve added the GA utm code to urls on GLL “dozens of times” & never had a problem? Or do you mean you’ve done the extremely-complex-and-no-way-I-am-gonna-spend-the-time-to-get-the-client’s-webdev-dude-into-this-anyway method? If the former then that’s very interesting! I tried it & got the “under review” for a week, whereupon I killed it. Not to mention it sure looked ugly for that week.

    Is there anything special you did?

    And hey, Orlando Logo Dude, howzabout that link?


      Hi Carl,
      Nope I really have done it dozens of times with no issue. Are you sure your under review status wasn’t for something else?


        also why did it look ugly? seems like you didn’t use the vanity URL in your listing maybe?


    Hey,

    I tried it and it works, but only partially because Google doesn’t use the “vanity url” when the listing appears in universal search 10 pack. Only on the google maps pages wil google send the visitor to yourbusinues.com/xyz.

    Or did I do something wrong?

    Grts,
    Bart


      Bart,
      Google has changed in the last few weeks and now in many cases they are using the URL from their organic index not the one supplied in Google Places. We are working on a work around, but nothing for now.

Leave Your Comment, or Contact Mike Belasco Directly