Services, online stores, and other websites often use tracking links instead of direct links.
This is especially noticeable in emails: a link to a question, order, product, or another page first goes through an intermediate service that tracks the click and then redirects you to the actual URL.
But tracking links are not limited to email. You can also encounter them on forums, in comments, communities, and other services — basically anywhere the site owner wants to track clicks on external links.
Sometimes the actual URL is already embedded directly in one of the tracking link’s parameters. For example:
https://tracking.example.com/click?u=https%3A%2F%2Fexample.com%2Forders%2F12345&campaign=email
Here, the u parameter contains the destination URL:
https%3A%2F%2Fexample.com%2Forders%2F12345
You don’t have to copy and decode it manually. You can quickly extract the direct URL right in DevTools.
How to do it
- Copy the tracking link.
- Open DevTools by pressing
F12. - Go to the Console tab.
- Enter:
const url = new URL("https://tracking.example.com/click?u=https%3A%2F%2Fexample.com%2Forders%2F12345&campaign=email");
- Then retrieve the value of the parameter:
url.searchParams.get("u");
The Console will display the already decoded direct URL:
https://example.com/orders/12345
You can even click the link directly in the Console.
The URL object provides access to query parameters through searchParams, and URLSearchParams.get() returns the value of a specific parameter. Query parameter values are decoded automatically, so there is no need to call decodeURIComponent() separately.
Of course, the parameter name will not always be u. Depending on the service, it could be url, target, redirect, redirect_url, or something else.
The main thing is to inspect the tracking link and look for a parameter that contains the encoded destination URL.
It’s a simple way to get the direct link without opening the tracking URL and going through the intermediate service.