Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

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.

share|improve this answer
    
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
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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