GA: Create sales territories or MSAs


Last week, someone calcities in paled me and asked how he could use Google Analytics to segment our state into four sales territories. Unfortunately, the GA interface only allows for segmentation by city – region – country etc. But we can use either Advanced Segments or the filter in Custom Reports (in the newest version of GA) to aggregate cities and thereby create a sales territory (or if you like, a Metropolitan Statistical Area, depending on your needs.) In face, the very first step, no surprise, is to figure out your needs.

Figuring out your needs. Let’s say that you’ve decided to segment by corner of the state.  I live in W. Pennsylvania, and would like to create a W. PA segment. I could go into GA and look at all the cities in PA, like the long list on the side here.

But, despite living here for a long time, I still don’t know which ones are in my corner of the state. So a better way might be to decide which geographic area I am interested in using the geographic Map Overlay.  When you do this, be sure to set your GA calendar for the entire length of time that GA has been installed on your site, so that you get a lot of data, and then decide upon your area(s) of interest.  Notice how I highlighted the area of Pennsylvania that I am interested in (so that I could point it out to you.)


PA and SW PA

Then mouse over the names of the cities, like this:

citynames in PA

See how Irwin shows up with its one little visit, and now I know to include it in the SW sales territory for PA?

Then create the Advanced Segment. Now, I thought a lot about the advanced segment. I really wanted it to use the words “contains” or “begins with” or some other easy way to do this. But the more times I reviewed the post, the more I realized that it had to be a regular expression unless you wanted to really work hard at this (more on this at the end of the post):

Then go through and repeat for other sales regions. A little tedious, but you only have to do it once.

Problem: what about other cities that “appear?” Despite all my work above, other cities in my W. PA sales area will crop up over time, because they were too small to have any visits when the work was first done, even if I did  use all the data that I had. So how do we know that visits came from a “new” city?

Of course, we could start by using an atlas, but that might be mind numbing, and we’ll never know if the atlas spells things exactly the way that GA does. Alternatively, we could just keep everything in a spreadsheet, export and compare spreadsheets (“hmm, where did that city come from?”)

And that’s when I realized that if we created the Advanced Segment using Regular Expressions, the way I did above, everything would be easier. We could visit our sales territories segments every quarter, and for each one, change the first field from “Include” to “Exclude.”  Apply those segments.  After all, if we create a segment for North, East, West and South, then exclude them all from a state, then look at that state — there should be no cities in that state. If there are, we have found the few stragglers we were looking for.

Any other ideas on how to do this kind of sales territory or MSA work?

Our founder, Robbin Steif, started LunaMetrics in 2004. She is a graduate of Harvard College and the Harvard Business School, and has served on the Board of Directors for the Digital Analytics Association. Robbin is a winner of a BusinessWomen First award, as well as a Diamond Award for business leadership. In 2017, Robbin sold her company to HS2 Solutions and has since retired from LunaMetrics.

  • Stephanos

    well, did you consider using the longitude & latitude? – I think you could easily create a rectangular area by using 4 conditions…

    • Robbin Steif

      Right, we did have this conversation last week. But, we decided that it would be a hassle. Not to mention, difficult if not impossible for non-API people and those without admin access.

      Stephanos, if you have a great example, please send it our way.

  • Great Post. But can you please help me in finding where to do the geographic Map Overlay? I am on the map overlay report but how to I get to be able to highlight a section?

    • Robbin Steif

      Oh, my bad. I called it the geographic map overlay, because everytime I look at that title (“map overlay”) , I keep thinking that it is the old site overlay, even after all these years with GA. And the screenshot is something I did in snagit, just to show everyone who read it how to focus on the relevant area….

  • Try the National Association of Counties page. Find Pennsylvania counties, and then you can get cities and places in those counties. It appears to be up to date with the 2010 census data.

Contact Us.

Follow Us



We'll get back to you
in ONE business day.
Our Locations
THE FOUNDRY [map] LunaMetrics

24 S. 18th Street
Suite 100

Pittsburgh, PA 15203


4115 N. Ravenswood
Suite 101
Chicago, IL 60613


2100 Manchester Rd.
Building C, Suite 1750
Wheaton, IL 60187