One item often overlooked when setting up a Google Analytics account is whether or not to include the www or non-www version of the URL as the preferred domain. Preceding the domain name in a URL, www (pronounced “dub-dub-dub”) can inadvertently turn into a thorn in your side by way of inaccurate metrics if you haven’t one version or the other for your preferred domain.
Fortunately, this is super easy to put in place but it will require you to make adjustments in both your Google Analytics (GA) and Google Webmaster Tools (GWT) accounts.
Before you get started, you’ll want to confirm with your current web host which version is set up as the primary domain name. We won’t go into a discussion about which version is better and for now, rest assured that you can’t make a wrong choice (hint: check your analytics to see which version site visitors use most often) Whichever option is in place, you should have the opposite set up as a redirect; i.e. www redirects users to the non-www version and vice versa.
Google Analytics Settings
Note: if you don’t already have your GA account connected to your GWT account, you’re missing out. You can verify if you have the accounts connected from the same admin panel, just scroll to the bottom of the page and look for the “Webmaster Tools Settings” section. If you don’t have a version set for enabled views, you can make that change here.
Google Webmaster Settings
If you don’t already have both www and non-www versions of your site set up in GWT, you’ll want to do that before getting started. Keep in mind, if you need to add one of those versions, you’ll need to complete GWT’s verification process and to that end, having access to your website’s sFTP /FTP to add the verification file (my preferred method) will make life much easier. Conversely, you can ask your web provider/host to do this for you but that will add some time to the process.
Note: if you have both www and non-www versions set up in GWT, you’ll want to perform the following steps at both.
That’s it, pencils down.
In the end, the good news here is if you ever need to update your primary domain to use either www or non-www, you can always go back and edit these settings accordingly.