How does direct traffic work?

Direct traffic is a Google Analytics session (or visit) that starts without a referrer being passed by a user’s web browser.

In order to understand how direct traffic works, you first need to understand the concept of a ‘referrer’. 

In order to understand ‘referrer’ you first need to understand HTTP. So let us first start with HTTP and then we will gradually move to ‘referrer’.

Introduction to HTTP and referrer

HTTP or Hypertext Transfer Protocol is a set of rules used by web browsers and web servers to communicate with each other.

A web browser communicates with a web server by sending HTTP requests for each requested resource (HTML document, image file, CSS file, JavaScript file, etc).

A web server communicates back by sending HTTP responses for each HTTP request. Each HTTP request is made up of request lines and request headers (also called HTTP request headers).

Similarly, each HTTP response is made up of status line and response headers (also called HTTP response headers).

This is what an HTTP request looks like:

This request was made to my webserver (where my website is hosted) by a user’s browser when he clicked on a link to one of my blog posts (You are doing Google Analytics all wrong. Here is why) from my Google+ page.

As so you can see from the screenshot above, the referrer is just one of the HTTP request header and it is ‘Google Plus’ in this case:

https://plus.url.google.com/url?sa=z&n=1400603604168&url=http%3A%2F%2Fwww.optimizesmart.com%2Fgoogle-analytics-wrong-why&usg=ZSnkIqTswUCpggL84jvJcY3KXfk

Now since the request was made to my web server, my server has to communicate back (it has to obey HTTP protocols) to the user’s browser. It does so by sending HTTP response.

This is what a HTTP response looks like:

This response was sent by my web server to the user’s browser.

Get the E-book (52 Pages)

Get the E-Book (37 Pages)

 

How to see the HTTP request and response headers

You can’t see HTTP request and response headers by just viewing the source code of a web page. You won’t find them there.

I use a tool called ‘Chrome Developer Tools’ to see HTTP requests and responses for a particular web page. This tool is already built into Google Chrome browser.

Follow the steps below:

Step-1: Right click on a web page and then select ‘Inspect’:

This will open developers tool window at the bottom of your browser.

Step-2: Click on the ‘Network’ tab:

Step-3: Press F5 to reload your web page or click on the browser refresh button.

Step-4: Find and click on the URL of your webpage:

Step-5: Click on the ‘headers’ tab:

On the right hand side of the developers window, you can see all the HTTP response and request headers.

Scroll down and search for ‘Referrer‘ in the HTTP request header:

This is the window from which you can find out whether a referrer was passed or not.

Note: Cookie is one of the HTTP request header (see the screenshot above). So cookie data is sent via HTTP request to a web server.

If your website is on https:// and you are linking out or redirecting to another https:// website, your browser will send referrer data. Similarly, if your website is on http:// and you are linking out or redirecting to a https:// website, your browser will send referrer data.

HTTPs and referrer

HTTPS or Hypertext Transfer Protocol Secure is simply a secure version of the HTTP.

If your website is on https:// and you are linking out or redirecting to a http:// website, your browser will not send referrer data because of security reasons.

What that means, all of the HTTP websites you are sending the traffic to, will see traffic from your HTTPS website as direct traffic. However, if your website is on https:// and you are linking out or redirecting to another https:// website, your browser will send referrer data because both websites are using secure connection.

Following is the visual summary of when a referrer data is passed and not passed in case of HTTPS and HTTP connections:

So if one day, all websites move to HTTPS while your website won’t then you will lose majority of your referrer data for good as HTTPS websites by default, do not pass referrer data to HTTP websites.

I used the word ‘default’ because it is possible to send referrer data from a HTTPS website to an HTTP website.

How to send referrer data from a HTTPS website to an HTTP website

As mentioned earlier, you can send referrer data from a HTTPS website to an HTTP website. For example, Google, Facebook and Twitter are already sending referrer data to HTTP websites and they all use https://

How they are able to do that? They all use an internal redirect script that first redirects a visitor to a HTTP page (which creates its own referrer data) before sending the visitor to the actual URL on a HTTP website.

For example, if you click on this link:

http://www.abc.com/excel-seo-powerful-cheat-sheet-boost-productivity/

from the following Google+ page:

https://plus.google.com/109426632283601974817/posts

you will first be temporarily redirected to the following URL:

http://plus.url.google.com/url?sa=z&n=1400603253616&url=http%3A%2F%2Fwww.abc.com%2Fexcel-seo-powerful-cheat-sheet-boost-productivity%2F&usg=Yr4dTmDnq34M5t5_Y93W7CqqLJk

Then you will be redirected to:

http://www.abc.com/excel-seo-powerful-cheat-sheet-boost-productivity/

All of this will happen so fast, that you can’t easily identify that you were first redirected to an intermediate HTTP page. 

Here Google+ is not sending the original referral data from a HTTPs website to a HTTP website thus honouring the Secure Protocol which states that:

If a website is accessed from a HTTP Secure (HTTPS) connection and a link points to anywhere except another secure location, then the referer field is not sent.

Source: https://en.wikipedia.org/wiki/HTTP_referer

So what Google+ is doing here is, creating its own referrer data by using an intermediate page (http://plus.url.google.com/url?) something like this:

<a href=”http://plus.url.google.com/url?sa=z&n=1400603604168&url=http%3A%2F%2Fwww.abc.com%2Fexcel-seo-powerful-cheat-sheet-boost-productivity&usg=ZSnkIqTswUCpggL84jvJcY3KXfk”>https://www.abc.com/excel-seo-powerful-cheat-sheet-boost-productivity/</a>

Facebook and twitter follow the same tactic. They create and send their own referrer data instead of the original referrer data. Facebook uses facebook.com/l.php as an intermediate page, whereas twitter uses t.co/ as an intermediate page.

Now since these social networks do not send the original referrer data, they can rewrite the referrer data whatever way they want and can hide any information they like. Another advantage of using this tactic is that these social networks can easily hide personally identifiable information and can thus protect users’ privacy.

Google Search Engine also use the same tactic as it redirects you through another URL. That is why even when being on a secure connection, Google is able to send referrer data to HTTP websites. 

Since Google doesn’t send you the original referrer data, it can also rewrite the referrer data whatever way it wants and can hide any information it likes. So Google choose to hide the ‘keyword’ data from its referrer via ‘not provided’ keywords.

You can use the same tactic to send referrer data from your HTTPS website to any HTTP website.

What referrer data are search engines sending to a HTTP website?

If you want to know what referrer data search engines (like Google, Bing and Yahoo) are sending to a HTTP website, then follow the steps below:

Step-1: Install the Get Referrer URL chrome extension. When you install the extension, it appears as a letter ‘R’ on top right hand side of your browser:

Step-2: Search for a keyword phrase for which your HTTP website rank on the first page of Google and then click on your website listing in the search results.

Step-3: Click on the ‘R’ button to see the referrer URL:

You can also use the ‘Get Referrer URL chrome extension’ when you navigate from one web page of your website to another. If you do not see the referrer URL then it means the traffic to another page is treated as direct traffic by Google Analytics:

Related Articles:

Do you know the difference between Digital Analytics and Google Analytics?


99.99% of course creators themselves don’t know the difference between Digital analytics, Google Analytics (GA) and Google Tag Manager (GTM).

So they are teaching GA and GTM in the name of teaching Digital analytics. They just copy each other. Monkey see monkey do.

But Digital analytics is not about GA, GTM. It is about analyzing and interpreting data, setting up goals, strategies, and KPIs.

It’s about creating a strategic roadmap for your business.



Digital Analytics is the core skill. Google Analytics is just a tool used to implement ‘Digital Analytics’.

You can also implement ‘Digital analytics’ via other tools like ‘adobe analytics’, ‘kissmetrics’ etc.

Using Google Analytics without a good understanding of ‘Digital analytics’ is like driving around in a car, in a big city without understanding the traffic rules and road signs.

You are either likely to end up somewhere other than your destination or get involved in an accident.



You learn data analysis and interpretation from Digital analytics and not from Google Analytics.

The direction in which your analysis will move will determine the direction in which your marketing campaigns and eventually your company will move to get the highest possible return on investment.

You get that direction from ‘Digital analytics’ and not from ‘Google Analytics’.



You learn to set up KPIs, strategies and measurement framework for your business from ‘Digital analytics’ and not from ‘Google Analytics’.

So if you are taking a course only on 'Google Analytics’, you are learning to use one of the tools of ‘Digital analytics’. You are not learning the ‘Digital analytics’ itself.

Since any person can learn to use Google Analytics in a couple of weeks, you do no get any competitive advantage in the marketplace just by knowing GA.


You need to know a lot more than GA in order to work in the digital analytics and marketing field.


So what I have done, if you are interested, is I have put together a completely free training that will teach you exactly how I have been able to leverage digital analytics to generate floods of news sales and customers and how you can literally copy what I have done to get similar results.



EXCLUSIVE FREE TRAINING...

"How to use Digital Analytics to generate floods of new Sales and Customers without spending years figuring everything out on your own."



Here’s what we’re going to cover in this training…

#1 Why digital analytics is the key to online business success.

​#2 The number 1 reason why most marketers are not able to scale their advertising and maximize sales.

#3 Why Google and Facebook ads don’t work for most businesses & how to make them work.

#4 ​Why you won’t get any competitive advantage in the marketplace just by knowing Google Analytics.

#5 The number 1 reason why conversion optimization is not working for your business.

#6 How to advertise on any marketing platform for FREE with an unlimited budget.

​#7 How to learn and master digital analytics and conversion optimization in record time.



   

My best selling books on Digital Analytics and Conversion Optimization

Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.

Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.

Attribution Modelling in Google Analytics and Beyond
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.

Attribution Modelling in Google Ads and Facebook
This book has been written to help you implement attribution modelling in Google Ads (Google AdWords) and Facebook. It will teach you, how to leverage the knowledge of attribution modelling in order to understand the customer purchasing journey and determine the most effective marketing channels for investment.

Himanshu Sharma

Digital Marketing Consultant and Founder of Optimizesmart.com

Himanshu helps business owners and marketing professionals in generating more sales and ROI by fixing their website tracking issues, helping them understand their true customers' purchase journey and helping them determine the most effective marketing channels for investment.

He has over 12 years of experience in digital analytics and digital marketing.

He was nominated for the Digital Analytics Association's Awards for Excellence. The Digital Analytics Association is a world-renowned not-for-profit association that helps organisations overcome the challenges of data acquisition and application.

He is the author of four best-selling books on analytics and conversion optimization:

error: Alert: Content is protected !!