views:

59

answers:

1

When I first start one of my Wordpress blogs, I had the permanent URL for each post include the date of posting.

The slug format looked like this: /blog/2010/01/25/this-is-my-article/

Later on, I changed it so that the date was not included in the permanent URL, like this: /blog/this-is-my-article/ and setup a redirect plugin to make sure that users would get to the page they wanted until the site was re-indexed.

In Google Analytics, when I review the stats for content I now have multiple records for what is essentially the same page. ie:

Top Content List:

  1. 45 Pageviews- /blog/this-is-my-article/
  2. 24 Pageviews- /blog/2010/01/25/this-is-my-article/
  3. 33 Pageviews- /blog/some-other-article/

Is there any way to combine those records somehow?

A: 

I think the most straightforward way to do this is by using Filters, "Advanced Filters" in particular. In your case, you'll use one Filter for each blog-article pair (one URL w/ title + date, the other URL w/ title only)--this way, you'll merge the two URLs into a single line item in your reports.

(I'm assuming you haven't done this before, so,

  1. from the "Settings" Page in GA, click on "Filter Manager" (probably bottom right)

  2. Click "Add Filter"

  3. Enter a name for this Filter (article name is probably a good choice)

  4. Click the radio-button below that textbox, "Custom Filter"

  5. Then Click the last of a set of six radio buttons below that, "Advanced"

  6. for "Field -> A -> Extract A" select "Request URI" from the dropdown menu

  7. Beside that menu is a textbox, type in the article title (this-is-my-article)--no parens, no quotes

  8. The next line ("Field B -> ....") leave blank

  9. The line after that, which begins with "Output To->" select "Request URI" from the dropdown

  10. Type in the article title (with "/" at the beginning, no space; and ".html" at the end, no space)

  11. Click "Yes" for "Field A Required"

  12. Click "No" for "Field B Required"

  13. Click "Yes" for Override Output Field

  14. Click "No" for "Case Sensitive"

  15. Below that, you'll select which of your Website Profiles you want to apply this Filter to

  16. Click "save changes" and you're done (obviously you'll need to repeat this process for each URL pair).

doug
Doug, thank you this was a great tutorial. However - will this filter retroactively change the URLs in my top content list? For my first attempt, after I made the filter, the pageviews results for the two twin content pieces were still separate, with one having he date slug in it.Is this retroactive, or does it only work on new incoming data?
David Csonka
David, Filters are *not* retroactive--that's the case for nearly all GA functions, so i treat it as a background assumption. Still, i should have made it explicit in my answer. I just double-checked this by the way to confirm (see my diigo annotated page here, http://diigo.com/0a01o).
doug