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
-
Phantom search results showing up in analytics
Hi, I'm getting these weird phantom search results showing up in my analytics account which is skewing my results. I have a wordpress site, and I do have some custom search results pages, but analytics is telling me these hits are coming from google- which I doubt. The end of the query string (&cat=plus-5-results) is not coming from a link created within my site. Anyone have any ideas? Failing that, would somebody be kind enough to explain how I can ignore these hits, but retain other, valid search result requests? Thanks reading! Will Screenshot%202019-05-16%20at%2022.32.10.jpg
Reporting & Analytics | | madegood0 -
How is Google Analytics defining page depth?
We run two websites and as part of our KPIs we are treating those who visit 3 or more pages of our website as a client served. As a digital team we are not convinced that this is the best metric to use as the improvements we are making to the sites mean that people are able to find the information quicker. Additionally other organisations including forums etc link to us so those users will get the info they need in one click. What I would like to know is how Google calculates page depth in GA. Are they treating the landing page as ground zero and then when users clicks a link they go one page deep? Or is the landing page, page depth 1 . Is page depth a measure of how many clicks a user needs to find their information?
Reporting & Analytics | | MATOnlineServices0 -
Is it possible to use Google Tag Manager to pass a user’s text input into a form field to Google analytics?
Hey Everyone, I finally figured out how to use auto event tracking with Google Tag Manager, but didn't get the data I wanted. I want to see what users are typing into the search field on my site (the URL structure of my site isn't set up properly to use GA's built-in site search tracking). So, I set up the form submit event tracking in Google Tag Manager and used the following as my event tracking parameters: Category: Search Action: Search Value When I test and look in Google Analytics I just see: "search" and "search value." I wanted to see the text that I searched on my site. Not just the Action and Category of the event.... Is what I'm trying to do even possible? Do I need to set up a different event tracking parameter? Thanks everyone!
Reporting & Analytics | | DaveGuyMan0 -
Why seomoz shows me "missing meta discription" on this plugin: http://villasdiani.com/wp-content/plugins/dopbsp/frontend-ajax.php ? Should I edit? how?? IIs it posible??
Good day to all! I am very confuse about results on seomoz Crawl Diagnostics Summary, especially with 6 Crawl Warnings Found. It says title too short: http://villasdiani.com/category/mombasa/, http://villasdiani.com/category/watamu/ , http://villasdiani.com/sitemap/ why would Google punish me for this??? why should I make longer title for sitemap? or Watamu? It is the name of the place - Watamu or Mombasa. It is very confusing for me. I have very big mess with the website and it is not ranking:-( what I have done:-( and is it possible to meta description for this plugin: http://villasdiani.com/wp-content/plugins/dopbsp/frontend-ajax.php how?? I even do not know where is it.
Reporting & Analytics | | VillasDiani0 -
Google Analytics Organic search queries aren't being updated, even though I'm still seeing results in all our typical results pages.
We pushed some new changes to the site and Google Analytics is no longer updating the Organic Search queries listing, even though traffic is consistent and and we're still landing results in all our typical keyword searches. Any ideas?
Reporting & Analytics | | unclekaos0 -
Alternative to Google Analytics
Hi from sunny Manchester! I'm looking for recommendations for alternatives to GA. I'm specifically looking for something which won't sample data and will give us accurate numbers. Our site is pretty big, it receives 6 million+ visits and 50 million+ pageviews/year. Any recommendations would be greatly received together with any good/bad experiences you've had with them. Thanks in advance, Brendan.
Reporting & Analytics | | Confetti_Wedding0 -
Keep multiple Google Analytic / Webmaster accounts seperate?
Hi, I have a paranoid suspicion that putting all my websites on one Webmaster / Analytic account will mean any links between my sites won't carry any weight, and Google might consider similar content much more readily if 2 of my sites are in the same market. So I have about 4 different accounts with my main sites split across them. Am I being over paranoid? Do any of you have any problem with all your sites being on the same account?
Reporting & Analytics | | SpecialCase0 -
Google API Tools - Next Analytics
Have you used any API tools like Next Analytics and/or can you recommend another tool that is particularly useful for a SEO?
Reporting & Analytics | | KnutDSvendsen0