Skip to content

Solving the https to http referrer problem in Google Analytics

If you’re a Google Analytics user, there’s an issue caused by the change to https websites which could be problematic. With some sites and directories, you may no longer be seeing their traffic in ‘sources’ or ‘referrers’ labelled as being from them. This may be the case even if your own site hasn’t changed to https – it’s to do with them changing.

Here’s the problem. When traffic moves between sites, it’s accompanied by background data which includes details of the site which sent the visit. If the movement is between https sites, or between http sites, or even from an http site to an https site, this information is freely available for applications such as Google Analytics. So far, so good.

However, when traffic moves from an https site to an http site, the referrer information is not included by default. In Google Analytics, this means that it appears as not set, or “(direct)”.

So, for example, if your site is on http, but you’re advertising on an https site, you won’t see any visits from your advert labelled as being from that site.

This may affect you even if your site has changed to https. How? If the link on the referring site is to the old http version of your site, then it’s still an https to http transfer. Your site probably then redirects the http link to your new https version – fine for the visitor, but too late for Google Analytics. The traffic was sent in anticipation of finding an http site, so it contained no referrer information.

We need a solution to this. Unfortunately, the two actions you can take both need to take place at the originating site, which is difficult, as it belongs to somebody else.

The first action which will sort things out is for the other site to add a sitewide ‘referrer’ header tag, which looks like this:

<meta name="referrer" content="origin" />

This is understood by most browsers now, and is usually sensible for any https website which sends people to other sites, and wants the source to be trackable at the other end. That might include your site, by the way. We’ve added the tag to ours.

So if a third-party website’s traffic has disappeared in your Google Analytics, and you want to see it labelled as being from them again, you might suggest to the site that they research this and possibly add the tag. Not many people seem to know about it.

The better way, if you’ve changed to https yourself, is to get your links at the other site updated to https. Of course, that’s quite a chore for the website owner at the other end. But if you’re paying to be on the site (e.g. directories), then you’re in a position that you can request that they update all their links. After all, it’s in their interest that you can see all those lovely visits they’re sending you.

In summary, here are a few things to do:

  1. If you know of external sites which are https, and link to you, see if your Google Analytics is showing them in the list of referring sites. If not, suggest to them that they add the ‘referrer’ header tag (above) to their site. There’s some background here.
  2. If your site is https, check that the external https sites linking to you are linking to your https URLs. If they’re not, try to get them to update the links. This should be possible with sites where you pay to be included, and sites belonging to suppliers or distributors.
  3. If your site is https, and you want other sites to see how many visits you sent them in their Google Analytics, get your website manager to look into adding the ‘referrer’ header tag (above) to your site.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.