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
-
Collecting post codes / zip codes in Google Analytics - Terms of Service
Hi Mozzers, Just reading up on Google Analytic's Terms of Service and wondering if collecting post codes / zip codes (from a website's 'Find my nearest...' tool) adhere's to the following: "You will not (and will not allow any third party to) use the Service to track, collect or upload any data that personally identifies an individual (such as a name, email address or billing information), or other data which can be reasonably linked to such information by Google." What do you think?
Reporting & Analytics | | A_Q0 -
Number of goals larger than the events its bases on - WTF?
Hi all We configured a standard goal in Analytics that is triggered on an event. I have seen cases where the number of triggered events is larger than the goal completions due to limitations to how many times the same goal can be fulfilled within the same session, BUT in this case we got the opposite problem. We got more Goal Completions than we got events that is supposed to trigger the goal. Now also added a screenshot of how the goal is configured. As you can see its just configured to use the Category name of the event. Nothing fancy at all. How can that be possible? Again, more goal completions than events that is suppose to trigger it? Grateful for any help Fredrik AclZDUO
Reporting & Analytics | | Resultify0 -
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 -
How to not track mobile redirects in Google Analytics
If a user is on a mobile device and comes to our home page, http://www.darden.virginia.edu/web/Home/ they are redirected to http://m.darden.virginia.edu/web/Home/. We want a way to remove all the redirects from our Google analytics reports. More specifically we do not want to include the the page view of http://www.darden.virginia.edu/web/Home/ in our page view count when the user is on a mobile device. How do we do that?
Reporting & Analytics | | Darden0 -
Setting up goals in Google Analytics
Hello! This question is seems so obvious that I'm also ashamed to ask... almost. If the goal of a website is to have a visitor complete a contact form, when setting up the Goal in Google Analytics (as a "URL destination") the URL of choice would be the form's thank you page, correct? Because that's the page that proves the visitor completed the task we want them the achieve. Right? Thanks!
Reporting & Analytics | | SmileMoreSEO
Erik0 -
Google Analytics set up for non-canonicalized domains
Our client's website is non-canonicalized (www.example.com & example.com load the same thing). Google seems to have made a preference for the www, but canonicalizing to www breaks their Flash website. All we're really trying to do at this time is install Google Analytics for them. What's the smartest way to make sure that both www.example.com and example.com are treated exactly the same by Google Analytics? Google Developers: Domains & Directories states that by default visit data will be separately collected between the two domains, although I found no references to the common www/naked domain issue. In stackoverflow: Does google analytics combine naked domains with the www subdomain? Török Gábor says, "Yes, users will be tracked, but the same visitor coming from www.datalookups.com and datalookups.com will be counted as two different visitors." On the same page, Open SEO says, "This is completely false: www.domain.tld and domain.tld are treaded just the same, and get the same value for the HASH code (the number at the start of each __utm cookie). This an exception: every other subdomain.domain.tld will be handeld as a distinct web site". Can any Analytics experts help me sort this out? Thanks!
Reporting & Analytics | | GOODSIR0 -
Google Analytics Report throws up Google as a referrer
Good morning from Wet & Windy 12 degrees C wetherby UK... Using Google analytics I've noticed in the traffic sources refferer subsection some traffic is categorized as originating from Google. Whats puzzling me is.... I know a huge amount of traddic stems from Google but as the below screenshot illustrates only 21 visitors come from Google: http://i216.photobucket.com/albums/cc53/zymurgy_bucket/google-refferal-sources-top-levelcopy.jpg And when i drill down some are coming from Google mobile 😞 http://i216.photobucket.com/albums/cc53/zymurgy_bucket/google-referral-sourcescopy.jpg Is traffic categorised as Google referrer down to Google hiding searches via ssl as explained here: http://i216.photobucket.com/albums/cc53/zymurgy_bucket/google-referral-sourcescopy.jpg Any insights welcome 🙂
Reporting & Analytics | | Nightwing0