DTX
DTX

Reputation: 182

How can I hide a link's origin from the linked-to site's analytics?

I've been googling for a while now, but wasn't able to find an answer to this.

What I want to accomplish is the following:

Let's say I have a website that I hide from search engines etc. and that is pretty much only accessible through the direct URL. I want only people whom I send the link to see the site.

On my site I talk about my favourite pizza and link to Joe's Pizza Store.

When one of my visitor clicks the link, Joe's Pizza Store will see my URL as a referrer in their analytics.

Is there anything I can do to my link tags (or otherwise) to obscure the origin?

Upvotes: 0

Views: 422

Answers (1)

dippas
dippas

Reputation: 60603

use rel="noreferrer"

something like this:

<a href="signin.php" rel="noreferrer">sign in</a>

The noreferrer keyword may be used with a and area elements. This keyword does not create a hyperlink, but annotates any other hyperlinks created by the element (the implied hyperlink, if no other keywords create one).

It indicates that no referrer information is to be leaked when following the link.

If a user agent follows a link defined by an a or area element that has the noreferrer keyword, the user agent must not include a Referer (sic) HTTP header (or equivalent for other protocols) in the request.

This keyword also causes the opener attribute to remain null if the hyperlink creates a new browsing context.

More info here

Upvotes: 2

Related Questions