We all make mistakes. I’ve made this one, and it’s why I want to tell you how to avoid it.

Back in my early days, I helped a company set up a new version of their website where the blog was integrated, but I didn’t set up the structure of URLs properly and now it’s a pain in the butt to track blog visits.

This didn’t happen back when people used to have a separate website for their blog. You could have a separate Google Analytics property for it and no problem. But if you’re like most nonprofits, your WordPress website nowadays has an integrated blog, and not setting it up right means a big headache tracking visitors to your blog posts.

Who really cares though, is your website traffic going up? Then it’s all good right?

Well, no. Not at all.

Why Should You Track Blog Visits?

First off, you might have only a handful of pages on your website, homepage, about us, contact, donate, and volunteer pages. Or you might have hundreds. In addition to these you might have a couple or a hundred blog posts that are hopefully driving traffic and engagement on your website, but how would you know.

The big question is “do you know if your blog is useful? Is it growing?”

We should all be able to answer this because running a nonprofit blog isn’t something you should do if it’s not paying off. I’ll be the first one to promote content marketing for nonprofits, but if it’s not working, then it’s not working, and you should change your strategy or stop altogether.

While increasing traffic isn’t the ultimate goal, it is a good metric, particularly at the beginning to see whether you’re on the right track or not. Increasing traffic might then lead to your actual goal of donations, volunteers, or something else.

You probably already have Google Analytics set up your website, but if you look at website traffic, you don’t know if anyone is really looking at your blog, all of your visitors might just be landing on your homepage and that’s it. So here comes my mistake, and likely yours too.

The Big Mistake I Made with URL Structure

In WordPress there a couple of different options for structuring your URL, or “permalinks” as they are also called.

Wordpress permalink settings screenshot

The default is plain, so your URL will look like a garbagey mess like https://methodiccontent.com/?p-123

This won’t do you any good, because your visitors won’t be able to tell what page they’re on in the URL and you won’t have any SEO value from the URL because you don’t have any keywords in there.

The natural conclusion most people come to is using the post name as the url. This is very common, it’s good for SEO, and it makes the url easy to remember. However, with this option, it is hard to tell in analytics what’s a blog post, what’s a page, and what’s a product page if you have them.

Before we go on, I must tell you, DO NOT, I repeat, DO NOT go and change your links right now. This could have a drastic impact on your website performance, your SEO, and your internal and external links. This is why it’s important to do this right the first time because it’s a headache to try and change.

The Solution

If you’re just starting out, you should use a URL structure like this.

https://methodiccontent.com/blog/%postname%/

how to set your wordpress blog url structure for analytics

The reason is now all of your blog posts have /blog/ in the URL. With this set up you can go to your “Behaviour” tab in Google Analytics, select “Site Content”, “All Pages”, then create an advanced filter for pages that contain “/blog/” and voila. Now you know the page views of your blog, even though it is a part of a larger website. See the instructions on how to do this in the screenshots below.

how to setup visit tracking in Google Analytics for wordpress blog

Set advanced filter in Google Analytics for tracking blog visits on WordPress site

Changing the url at the beginning is such a simple thing that really makes no difference to your website and how it functions, but now you can easily see the stats for your blog pages separately in analytics. You can sort your blog posts by the number of visits, see where your visitors are coming from that land on your blog and how much time they spend reading your posts.

What if You Haven’t Done This?

Don’t fear, there is a couple of things we can do. The first is set up your Google Analytics view to exclude pages instead of including blog posts. It’s time-consuming, but you can set up an advanced filter the same as we just did, but select “exclude” pages containing and then use the URL of all page you don’t want in the stat.

You see how this can take a while. And every time you add a new page, you have to go and update your filter to exclude that page as well.

It’s not a pretty solution, but it’s a solution.

Should You Switch It?

If you don’t have a lot of traffic, like you just started your website, it’s probably okay to switch it right now. The longer you wait, the more of a headache it could cause with a drop in traffic and links that are broken.

If you have lots of posts and traffic already you can still move ahead with changing but you will need to set up 301 redirects. A 301 redirect is a “permanent” redirect to tell Google that your page has officially moved to the new URL, and any visitor landing on that page will automatically forward to the new place instead of seeing a 404 page not found error.

If you don’t do this for every single one of your blog posts then you might have links to posts from other pages or other websites, and Google has indexed those pages to show on search results. You will lose all of that connection. 301 redirects will help keep that intact.

There are many redirect plugins for WordPress, find one with a reputable rating and many users like Redirection and go with it. If you have a lot of blog posts you’ll want one that you can import the redirect URLs so that you don’t have to type them all in manually.

So on your next nonprofit website, please don’t make the mistake I did. 2 years after building the site I was referring to, I now had to try to filter out 1200 products and 45 other pages in order to see the blog traffic for about 700 posts from many years of blogging. Do it right the first time and you don’t have to deal with this headache.

if you have WooCommerce or are using any sort of shopping plugin there should be a way to set this up for products as well so that you can track them separately by having /product/ in the URL for example.

Have questions about this process, or want to explore it in more detail? Feel free to send me a message here: http:/methodiccontent.com/contact/

New Subscriber Gift: 38+ Resources to Help Create Stunning Nonprofit Emails

New Subscriber Gift: 38+ Resources to Help Create Stunning Nonprofit Emails

Subscribe to the Methodic Community emails to receive your free gift. A 7-day email series that walks you through the best tools and resources to make impactful email newsletters and campaigns. Everything from graphics, to legal, to writing - it's covered. Join today to see what's inside!

You have Successfully Subscribed!

Pin It on Pinterest