Google is getting rid of Universal Analytics in July 2023. Here's what that means for you. (Spoiler alert: It's a good thing.)
Have you ever wondered why URLs are sometimes so long? You click on a link and rather than going to “site.xyz,” you end up at “site.xyx?thing=thing”. Why is that?
It all comes down to the question mark in the URL.
URLs sometimes use question marks as “separators.” This marks the end of the navigable part of the URL (the thing that tells your browser where to send you) and the beginning of tracking elements called query strings.
The short answer is that you can usually ignore everything after the question mark in a URL. But it’s the web, so things get more complicated fast.
What is a URL?
URL stands for “uniform resource locator.” It’s the human-readable “address” of a web page or asset. When you point your browser at a URL, it’s told by the site’s DNS (domain name system) and structure where to take you. This is called “resolving.”
What is URL tracking?
Many longer URLs include tracking elements. These are used by the site administrator to better understand:
- Where traffic is coming from, often using “UTM” codes
- Whether users are new or returning
- Whether personalized content can be used
- Which ads or links are getting clicks, and which aren’t
In addition, they can be used to pre-fill forms with known information about a user. If you’ve ever entered your email address, hit enter, and been taken to a longer form with the email already filled in, that’s probably what happened.
The most common tracking element is a “query string.” They’re structured like this:
Multiple query strings can be tied together with an ampersand, like this:
What does the question mark in a URL do?
The question mark in a URL separates the part that tells your browser where to take you from the part that delivers tracking information to the site. Depending on how much tracking information is encoded into the URL, this can create extremely long web addresses.
Can I remove question marks from URLs?
A user simply looking to get to a web page or asset can usually delete the ? and everything after it. For instance, if you want to send someone a link to site.xyz and your browser shows site.xyz?thing=thing, you can simply copy “site.xyz” and be fine.
Is a question mark in a URL the same as a slash?
No! A question mark in a URL is a separator. A slash represents a core part of the navigational address – basically, a folder in the site structure. Removing a slash and anything after it will cause you to end up in the wrong place.
Is a question mark in a URL the same as period?
No! A question mark in a URL is a separator. A period is part of the structure of the URL itself. It can indicate a subdomain:
… or be used before .com, .org. or another top-level domain suffix.