0

Is there an easy way to filter between posts and pages in Google Analytics?

Page is listed as a Primary Dimension when I drill down to Content but I'm not sure if that includes posts as well.

1

It's not tracked by default.

Yoast's WordPress SEO plugin allows you to track post types (and categories and authors...) as a custom variable.

5
  • I guess I'm stuck at what Custom Variable (Key 1) would be
    – AlxVallejo
    Apr 19 '12 at 0:52
  • If I understand your question right, and you're trying to write your own custom variable, you want get_post_type().
    – mrwweb
    Apr 19 '12 at 4:00
  • My question revolves around filtering posts and pages. Sure, the Yoast plugin will track post type as a custom variable, but the arguments for a custom variable are: gaq.push(['_setCustomVar', $slotNumber, $Category, $Value, $ScopeLevel ]); . Therefore, if I'm running a filter in Google Analytics based on the custom variable, what is the $Category I'm looking for? I would imagine it's something like "post_type" but I don't see any documentation on this.
    – AlxVallejo
    Apr 19 '12 at 14:10
  • The category is post_type. In the report, it's found in Audience > Demographics > Custom Variables.
    – mrwweb
    Apr 19 '12 at 15:32
  • Didn't see that, thanks! It's a shame you can't drill down from post_type to see what the actual page was.
    – AlxVallejo
    Apr 19 '12 at 16:40
2

Page in Google Analytics is simply the webpage. You can do a search for your category slug to drill down posts and post categories. That's how I do it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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