How to Fix – Google Analytics – “Value is not a valid domain”

Google IconGoogle Analytics has what may be a “bug” right now. Whether it’s intentional or not, you are unable to supply a subdirectory / subfolder for the Default URL under “Property Settings” and “View Settings”. The error message you’ll get when attempting such — Value is not a valid domain.

This is extremely inconvenient. There are times when you want a specific part of your website to be separate from the rest.

For example, what if I have…

And I want them to be separate for convenience sake?

Luckily, there is a way to get around the problem. It is a “hack” of sorts, but it is a perfectly viable option.

1) Go to the Property Settings or View Settings page using Google Chrome.
2) Right click on the textbox and click “Inspect element”.
3) You’ll see a line similar to this one, highlighted:

<input type="text" data-type="inputBox" data-name="defaultUrl" data-validate="domain required" class="hf Rh V9 f2" label="Example:" value="" placeholder="Example:">

Double click where it says data-name and it should go into edit mode. Delete the following part of the line: data-name=”defaultUrl”

4) Now click on the Default URL textbox again with your mouse and enter whatever you’d like.
5) Hit “Save”

Boom! You just bypassed Google’s validation to accomplish your goal!

When I figured this out, it made me happy, the client happy, and my brain happy.

Hopefully it makes you happy too.

Leave a Reply

Your email address will not be published.