Local Search

Local Search Recipe: How to Track Local Analytics With WordPress…And Make Pies

I am a big fan of food. I think about it everyday, and if things go well I even get to have some on a regular basis. So, in order to give my life some variety I like to prepare different dishes on occasion. To do so, I turn to online recipes. You can read reviews, look up anything imaginable, they are free, and the directions are usually easy to follow.

That is why when I was deciding how to cover using WordPress to track Google Local analytics data, I figured a local search recipe would be the best way. Many small businesses are using WordPress as a CMS for their website, and understanding the traffic that comes from the Local business center is uber important. So, sit back and let your mouth start to water and get ready to track local….

Approximate Bake Time

15 minutes (unless you are left handed, then add 3 minutes)

Ingredients

1 Computer (preferably an Mac as PC’s don’t last long under high cooking pressure)

1 URL with WordPress installed

2 Plugins installed and activated (Pages Link To and Exclude Pages From Navigation)

1 All In One SEO Pack activated and installed (optional for seasoning)

½ Claimed Business Listing in Google Local Business Center

1 Google Analytics Tracking Code Implemented Into Your WordPress Site.

Directions

1. Create a new page in WordPress entitled “location + keyword” and exclude the page for your navigation.

Example of new page: “Burley Dentist”

This is going to be a re-directing landing page. I like to use a keyword rich page title because it doesn’t hurt anything, and might even bring you a few extra brownie points. Make sure you uncheck the box to “include this page in user menus” as shown below. This box will show up on the right hand side of a page you are editing with the plugin activated.

local recipe 01 Local Search Recipe: How to Track Local Analytics With Wordpress…And Make Pies

Once you have done the following, click on the “publish button”.

Example of what the url will look like with SEO pack set up for %postname% URL’s…http://yourwebsite.com/burley-dentist (if you are using a different url structure then simply use whatever url you have for the newly created page. )

2. Create a Google Tracking URL.

Visit the Analytics URL Builder Tool and fill out the following information like the picture below. Once you have filled in the fields, click on the generate URL button (make sure you use your url and location).

local recipe 02 Local Search Recipe: How to Track Local Analytics With Wordpress…And Make Pies

What you have done is just create a tracking campaign for your local business center listing. Now, when people visit this URL, it will track them as a separate traffic point like “google organic” or “google ppc”.

There is one little tweak that needs to be done in order to make sure you don’t get duplicate content, and that is to change the “?” to a “#” sign in the created URL. By doing this you are stopping any duplicate issues that might pop up in analytics.

Example: http://yourwebsite.com/#utm_source=….

3. Copy and Paste the URL code into your “Pages link To” WordPress panel.

When the “Pages link to” plugin is enabled, you should see a panel at the bottom of every post and page. Simply copy the tracking url into the box and then click on the “republish” WordPress button.

local recipe 03 Local Search Recipe: How to Track Local Analytics With Wordpress…And Make Pies

Now, if you were to type in the url of the page you created like http://yourwebsite.com/burley-dentist you should be redirected to your homepage.

4. Edit your Google analytics tracking code by adding the following line.

Since we changed the created url to a “#” instead of a “?” we now have to add this line to the Google Analytics tracking code pageTracker._setAllowAnchor(true); when done correctly it will look like the following.

<script type=”text/javascript”>

var pageTracker = _gat._getTracker(“UA-XXXXXXXX-X”);
pageTracker._initData();

pageTracker._setAllowAnchor(true); pageTracker._trackPageview();

</script>

5. Edit the URL in the Local Business Center to point at the page you created.

Log in to your listing for your company and click on edit, then find the website field and enter in the URL to the page you created like the following example and then click submit.

local recipe 04 Local Search Recipe: How to Track Local Analytics With Wordpress…And Make Pies

6. Let it settle for a couple of days and dig in

local recipe 05 Local Search Recipe: How to Track Local Analytics With Wordpress…And Make Pies

Now you are all set up for local search tracking. As you can see in the above break down, the 2nd listing is an example of what your local data will look like. In this case, we have a wonderful slice of some 7 pack green pie that you can feed to the business owner that tastes “ohhh so good”.

There are all types of complimentary dishes that you can add within analytics for detailed reporting. If you are looking for some more information, then Martijn Beijk was one of the first to really lay out the blueprints for local analytics tracking on Mike Blumenthal’s blog. Also, don’t miss Mike Belasco at seOverflow talking about the “nitty gritty” in a 7 part series on local analytics.

I hope you enjoyed this edition of local search recipes. Tune in next time for learning how to bake and upload a KML Sanders Secrete Recipe in your FTP oven.

 Local Search Recipe: How to Track Local Analytics With Wordpress…And Make Pies

Mike Ramsey

Mike Ramsey is the owner of Nifty Marketing, a Local Search Marketing company hailing from Burley, Idaho. His twitter handle is niftymarketing and he is a proud husband and father. Mike has lost 12 pounds on his local search recipe plan because after all, it’s not edible.

Comments are closed.

14 thoughts on “Local Search Recipe: How to Track Local Analytics With WordPress…And Make Pies

  1. @pablo I have done it the way you have shown and it will work, you will see the data come up in analytics. But, you might get visits counting twice unless you have the following code installed in your head area that I think you were eluding to

    <link rel=”canonical” href=”http://yourwebsite.com” />

    If you ARE using “All in one SEO pack” and have this option enabled it should work without switching the ? to #. You just have to check to see if your domain has the code. But, if you don't…then I would stick with the way I recommended. For the second part, “pages link to” and a 301 redirect are a the same thing. Just a bit easier in my opinion to do it from page you created with a plugin.

    The idea was to have this work all inside WordPress without getting into editing pages. Most themes have a spot to add your analytics code and it is generally easy access. Everyone has different ways of keeping it simple… Thanks for your feedback.

    1. From what you said to me, users who visit a site through Google and this counts as a visit to organic, but there is a “double” occurring in the reporting year, right? If so, I prefer to interpret as a segmentation within any organic traffic which the “utm_medium = local-search” is just a segmentation of traffic organic. For example, all Google organic traffic = organic + ppc + local-search! :)

      About the GATC, I think that you don't use the “_setAllowAnchor” because this technique that I mentioned is very common to measure clicks from Twitter Apps and it works well.

      Do you check the documentation of _setAllowAnchor? See this http://bit.ly/a9EurB and this http://bit.ly/8d23si :)

      I confess I've never seen anyone talk about this problem with Local Search.

    2. I prefer to interpret as a segmentation within any organic traffic which the “utm_medium = local-search” is just a segmentation of this traffic. For example, all Google traffic = organic + ppc + local-search. And Google organic traffic is: organic + local-search. :)

      About the GATC, I don't use the “_setAllowAnchor” because this technique that I mentioned (normal campaign tagging) is very common to measure clicks from Twitter Apps and it works well. But your technique works too. I just think that my way more simple! :)

      Do you check the documentation of _setAllowAnchor? See this http://bit.ly/a9EurB and this http://bit.ly/8d23si :)

      I confess I've never seen anyone talk about this problem with Local Search.

  2. I prefer to interpret as a segmentation within any organic traffic which the “utm_medium = local-search” is just a segmentation of traffic organic. For example, all Google organic traffic = organic + ppc + local-search! :)

    About the GATC, I don't use the “_setAllowAnchor” because this technique that I mentioned (normal campaign tagging) is very common to measure clicks from Twitter Apps and it works well.

    Do you check the documentation of _setAllowAnchor? See this http://bit.ly/a9EurB and this http://bit.ly/8d23si :)

    I confess I've never seen anyone talk about this problem with Local Search.

    1. Martijn, Thanks for the work you initially did. I figured a wordpress twist would be a nice touch for some. ;) I will definitely be promoting the use of your awesome tool for the kml post. I have really enjoyed using it for clients and personal mapping projects.

  3. Martijn, Thanks for the work you initially did. I figured a wordpress twist would be a nice touch for some. ;) I will definitely be promoting the use of your awesome tool for the kml post. I have really enjoyed using it for clients and personal mapping projects.