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 Numbers Are Weird
Hi, I'm having a strange problem from past one month. My website gets about 10k pageviews a month with an average bounce rate of 50%. Lately, I observed a strange thing. The avg time on page of visitors from selected countries is less than 1 second and the bounce rate is zero!! How is this possible? This is happening from past one month and it would be really helpful if you guys could tell me what exactly is happening?? Ive attached a screenshot for better understanding. website url : https://www.specbee.com/ fIAXXgF 3zQuBAN
Reporting & Analytics | | ganesh10 -
What is the "UPDATE" indicate in the Google Search Console Query Reports?
We recently noticed an update note in the Google Search Console that happened on April 27th. Does this denote an algorithm update? Any feedback or article would really be helpful. Thanks! gfQ8FG9.jpg
Reporting & Analytics | | RosemaryB0 -
I have just found that Google Analytics are suggesting everyone upgrade to their new Universal Analytics, will this affect my MOZ account? should I do it now or wait till they default the updgrade?
Here is the link from google developers https://developers.google.com/analytics/devguides/collection/upgrade/guide#overview
Reporting & Analytics | | Jacquie_AegisSafety0 -
Google Analytics Tracking Code Problems
I am having a problem with my Google Analytics tracking codes. The relevant GA tracking codes have been entered into the source code of certain sites I'm running campaigns on, but Google Analytics is still telling me that the tracking code hasn't been installed - yet it has. What could possibly be the problem here? I have checked that these sites don't run off multiple domains, and that the tracking code has been entered in the correct place within the source code - and yet I am still having problems with GA. Any suggestions?
Reporting & Analytics | | WebhouseISP0 -
Setting up goals - google analytics
Hi Im new user google analytics I would like to set up goal for website. I asked to basic questions: What are my bussiness objectives? Answer:make the visitor to click on a advertisment (affiliate links and affiliate banners) to be redirected to company website to finish purchase. How to set up goals? How can I track ads (affiliate banners and affiliate links) on my website?
Reporting & Analytics | | info_tipovanie-stavkovanie.com0 -
Figuring Out the Source of "direct traffic" by looking at landing page parameters
I have a client who runs an e-commerce website, and I noticed that 40% of his traffic and 25% of his sales are all attributable to Direct Traffic. At first, I tried to solve this problem by tagging all of the previously untagged links in his e-newsletter, which I expect to be very helpful. However, then I looked at the landing pages for his direct traffic, and I see that it is almost entirely filled with thousands of unique URLs that begin with a question mark followed by the name of his e-newsletter or shopping cart vendor. It would be the equivalent of having a url like the following: "www.willmarlow.com/?constantcontact=keya;sldkfjsdlfkjdf;sldkjf" If we have this amount of information in the link, shouldn't there be a way to add additional parameters to the URL to move this traffic out of the Direct column? Has anyone encountered this before? Thanks.
Reporting & Analytics | | williammarlow0 -
Google Analytics bug?
Hi, I'm getting hits to this page, it's screwing up my Google Analytics stats. I know it's related with Google Website Optimizer, cuz it correlates with the tests I ran at the same dates. I'm just wondering if you've seen this before and what I should do to clean my stats? And is this affecting my SEO? Because it's still registering hits to these pages but I already stopped the tests a while go. Should I disallow this in my robots.txt file? Thanks! ga_bug3.jpg
Reporting & Analytics | | rhenster990 -
Google Analytics Reports
Hi all , I do not have the skill and time to look into Google Analytics to derive actionable conclusion and inferences. I would like to outsource this activity , just like I outsource link building. But not sure how... Any guidance ?
Reporting & Analytics | | iamnew0