Google Analytics Goal/Event/SOMETHING to show only Wordpress "Posts", not pages, etc
-
Hi all,
Our site is build on Wordpress and formerly the post URL's had the typical date format at the beginning. This made it easy for me to look at, for example, all search traffic to the blog. I would just view URL's containing /2014/ and /2015/ and boom.
We have since removed the dates from the URL's with proper redirects etc, which is great, but now I can't figure out a way to look at ONLY the blog in GA. I like to track a KPI of 'search visits to blog posts' and I can't figure out how to now.
Can I set up a GA event that only fires when the post type template for blog posts loads? Some other solution? I'm lost here, and there's gotta be a good way to do it...
-
This is exactly what I was hoping would be possible. Thanks for pointing me in the right direction.
-
There's a couple of approaches, but I think the content grouping feature is your best bet. Here's the official overview page: https://support.google.com/analytics/answer/2853423?hl=en
Essentially, you'll be firing code on that page template that tells GA to add the page to a specific content grouping OR you can tell GA to dynamically assign content grouping based upon a full or partial URL, or page title. In this scenario, I think the first option is more likely. The full instructions are here: https://support.google.com/analytics/answer/2853546?hl=en. Essentially, on blog pages, you'd want to fire your normal GA script, with the bold line below added:
This is going to be easier with Google Tag Manager if you're able to do that, but if not, hard-coding into the site will work as well - you'll probably have to create a header-blog.php file in your theme and use that header in your blog instead of your normal one. To my knowledge, Yoast GA doesn't support this yet, but there is a ticket for it at https://github.com/Yoast/google-analytics-for-wordpress/issues/26.
Content groupings aren't historical, so you'll also want to set up a "Blog" segment that includes any of your old parameters (eg 2015 in the URL), as well as the new parameters (content grouping = blog). This should make historical analysis easier.
I don't want to drone on for 10 more paragraphs, so check out those resources and let me know if you have more questions on implementation.
-
I was thinking about this some more after I posted last night. If your site is organized into sections with subpages, then you don't have to create a filter for every one. For example, if you exclude pages containing http://mysite.com/services/, then you would get rid of not only that page, but http://mysite.com/services/service1, http://mysite.com/services/service2, etc.
(And if your site is not organized in that fashion, you might want to look into adjusting it, as such a structure would likely help your SEO.)
-
Have a ton of pages, but this could be the answer if there's not a better way. Thanks for the response.
-
One idea, which would only work if you don't have an overwhelming number of pages, would be to make a series of Exclude Filters in the pages report. (https://support.google.com/analytics/answer/1034832?hl=en) You could then save the set of filters with the "Add to dashboard" feature (http://www.blastam.com/blog/index.php/2010/09/google-analytics-tips-save-filtered-reports).
Hope that helps,
Ira
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Google Analytics & Google Sheets
Hi guys, I'm looking to use google analytics google sheets extension to pull data into a google sheet with metrics from other tools e.g. semrush, moz, etc. From my understanding with google analytics google sheet extension its designed to run reports and doesn't really allow you to add other metrics. Basically what i'm trying to do is this: https://www.useloom.com/share/c1e42bfa60bd46fca2b1120018969ce8 Any suggestions/advice on how to do this would be great. Cheers.
Reporting & Analytics | | jayoliverwright0 -
Strange Traffic Spike In Google Analytics
Over the last two days I have seen a huge spike in the pageviews to my site www.learnbonds.com. Up to this point my average page views per visit has been less than 2. For the last couple of days it has jumped to 5 but the average time on the site has not increased. Upon further investigation under the browser and OS page of google analytics I found that traffic coming from internet explorer and IE with Chrome Frame is reporting 10+ pageviews per visit. Below is a screenshot. Any insight into what might be causing this and how to fix it that the community can provide would be appreciated. Thanks
Reporting & Analytics | | davidwaring
DaveZUaQWJd.png?1?21800 -
Google analytics question
Ok so in my traffic sources break down I have 3 sections: direct, organic, and referral. My question is under the referral tab I have recently noticed a new traffic source, my own website.... How is this possible? My top referring site is my own website.... Is this considered direct traffic or how is this being traced?
Reporting & Analytics | | jameswalkerson0 -
Funnel Visualization in Google Analytics
Hello. I have a question about funnel visualization in Google Analytics where there is an eCommerce goal (i.e. add to cart, shipping, purchase) with the first step being mandatory. Issue:
Reporting & Analytics | | Unity
The amount of completed purchases reported in GA doesn't match the actual transaction figure via the eCommerce platform. Question:
I was wondering if anyone knows why this occurs? I have a few ideas on why however I haven't been able to locate any supporting evidence. So I was hoping to generate a few ideas from the SEOMoz community to help me investigate further. Any ideas welcome! Much thanks,
Davinia0 -
Advanced Segment on Google Analytics
Hello there, hope everyone is allright and rockin' the SEO world 🙂 Was wondering if anyone could give a tip on how to configure an 'Advanced Segment' on Google Analytics. Basically I need to isolate traffic for 4 specific subfolders. E.g. www.mywebsite.com/solutions/A www.mywebsite.com/solutions/B www.mywebsite.com/solutions/C www.mywebsite.com/solutions/D/part1 Please note that the website has more pages under the specific section. E.g www.mywebsite.com/solutions/Z www.mywebsite.com/solutions/D/part2 but I only need to isolate the 4 directories (and their own sub-folders) mentioned above. Any idea how I could do this? Thanks a lot Joe
Reporting & Analytics | | Joseph.Volcy0 -
Set up Google Analytics by product category
Does anyone know if it's possible to set up Google Analytics data by product category? We sell roughly twenty product categories on our ecommerce site. We can look at our analytics performance for the site overall and drill down to specific pages, but what we really want to see is our performance by product category. Our product categories can include up to 5000 products. Any pointers on how to do this?
Reporting & Analytics | | ironpac0 -
Google analytics tracking
Is their a built-in or easy way to track the amount of times an exit link is clicked on a page and show that with other links of the page. For instance: I had a page with several external ad links on it and I want to track how many each got and rank them in google analytics
Reporting & Analytics | | insitegoogle0 -
Setting up Google Analytic Goals to a 3rd Party Site
I recently received help on a question I asked on SEOmoz but need additional clarification. I am trying to set up goals in Google Analytics for people who click on a “purchase botton” which sends them to PayPal. I created a Thank You page and tried to get PayPal to redirect to it, however, our customers only get to our site’s 404 page. Here is what I’ve done so far: Went into my PayPal account and turned the “Auto Return” to ‘on’ Under website payment preferences, I added the following URL http://www.teecycle.org/thank-youutm_nooverride1. (I formatted the URL this way because the person who provided me with help recommended using the format ?UTM_nooverride=1. However, our CMS system won’t allow “?” or “=”)
Reporting & Analytics | | EricVallee340