I have a site where I am trying to gather analytics on the category of a URL. For example, we have stories for both dogs and cats but the URLs for both stories are under "/animals/"

I'm trying to figure out how to pull the number of page views for each category. I was thinking I would go about doing this by pulling out the filtered URLs of each category and applying meta data in a data import to Google Analytics. I was able to import the data, but am unable to filter the data based on the import. I have no way of knowing if the import matched any items, if it was successful or failed.

Curious if anyone else has attempted a similar and what your process has been.

  • Could you show us a sample of URLs? Could we built some regexp to identify which is about dogs and which about cats? Dec 3, 2014 at 23:18

1 Answer 1


You need to have only pageviews per each category. Do it in spreadsheet.

1) download a report with pageviews for /animals/ category

2) import data to spreadsheet

3) import URLs for cats and dogs in separate columns in the same spreadsheet

4) using a VLOOKUP function identify is "dog URL" is contained in all pages columns (/animal/ category column), if it is attribute a nomber of pageviews to that URL

5) copy formula for all URLs

About VLOOKUP, INDEX MATCH and oher: http://www.randomwok.com/excel/how-to-use-index-match/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.