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
-
Search and Replace filter on Google Analytics?
Hello! On our GA account for one of our clients, we'd like to add a search and replace filter to the Views section of the account. The URL is www.askergoworks.com (it redirects to askergoworks.com), and Google has flagged us to have redundant hostnames. This is why we'd like to add the filter. Would the regular expression be askergoworks.com|www.askergoworks.com ? Any help would be great - I'm not a regex expert, so I really don't how to go about this. Thanks!
Reporting & Analytics | | AGILITY0 -
Google Analytics View Filters
Using the same GA property, I would like to set up three filtered views: 1. Tracking across one subdomain and one primary domain (example: shop.example.com & example.com) 2. Track only primary domain (example.com) 3. Track only subdomain (shop.example.com) Can this be achieved by using view filters? If so, how do they need to be set? Also, according to this article: https://moz.com/blog/cross-domain-subdomain-tracking-in-google-analytics, with cross domain tracking, I need to ignore self-referrals, which can only be done at the property level. If set up to ignore example.com referrals, will this cause problems with filter 2 and 3?
Reporting & Analytics | | Evan340 -
Google Analytics
Looking at a client's analytics - one page doesn't seem to record 'average time on page' data (it just displays 0.00 despite it receiving traffic) This isn't an issue for the rest of the website's pages. Any idea? http://www.smilestyledental.co.uk/ppc/general-dentistry-at-smile-style.html thanks for any help!
Reporting & Analytics | | dentaldesign0 -
Google Analytics - Not provided info
Morning all, i am using Google analytics for some time now, One of the issues that i don't have a clear answer for is, when i am looking at Traffic Source --> overview In the Keyword column, that is a line (not provided) What we think here is that we cant see the keywords if someone arrived to our website but was logged-in to Google account Is this correct? is there a way to find the keywords behind this (not provided)? - i have many visits for this line (17.3% of all visits) and i don't know which keywords people used. Thank you SeoWise
Reporting & Analytics | | iivgi0 -
Number of clicks / organic traffic - different data in Google Analytics and Webmaster Tools
Hi. I have a little problem. When I open Google Webmaster Tools I see 3000 clicks (in Traffic - Search queries - Clicks). But when I open Google Analytics I see much more visits from search engine (Google) - it´s 4-5 times more! It´s a huge difference, don´t you think? Do you know, where is the problem? What causes this diffence? thanks a lot
Reporting & Analytics | | mysho0 -
How do I find out how well a page converts in Analytics
Hello All, I am looking to find out how well a page converts in Analytics. A simple request you would thing, but no! First off let me list what I don't want to know: I don't want to know the conversion rate of a product I don't want to know the conversion rate based on the landing page What I want to know is how many people click to add the product to their basket on a particular page (which I understand is not strictly the conversion rate, but whatever). So the ways I have tried unsuccessfully are: The Analytics overlay (the in page Analytics thing) - this doesn't work because the "Add to Basket" button is not a link, it is an input. The Navigation Summary - this doesn't work because most of the time the /shopping_cart.php URL doesn't come up in the short list, and if you search for the URL in the search box beneath the percentages get all skewed. The most obvious solution would be Event tracking but I can't get that implemented in the short term. So does anyone have the answer to this most curious of conundrums? Thanking you in advance, Rich
Reporting & Analytics | | tonyatfat0 -
Tracking pages in two separate analytics accounts
Hi All, I'm trying to track some pages on one website in two separate Google Analytics accounts. Has anybody done this before that could help with the tracking code? Thanks in advance, Elias
Reporting & Analytics | | A_Q0 -
Track Google/Bing Shopping as Referrer
Is there a way to track Google & Bing Shopping referrals independent of standard Google/Bing tracking? It would be nice if we could see the difference between Google PPC, Google Organic & Google Shopping. I notice in analytics that we get some traffic from google/ppc, some from google/organic, some from google.com/referral (not sure what this is), and some from googlebase/cse (I know this is Google shopping, but I don't think it's tracking all shopping referral visits as this).
Reporting & Analytics | | JerDoggMckoy0