Browsing Category

Google Analytics

Google Analytics

Why Direct Traffic Is High In Google Analytics

I was hesitant to write a new post about this topic as it is already covered well, in this post I will try to focus more on the diagnoses and recommendations than explaining the reasons behind direct traffic.

What is direct traffic in Google Analytics:

The popular conception about direct traffic that it is a type-in traffic where people type in the website directly in the browser or visit it using a browser bookmark list, but realty is that it is not always the case, all web tracking software need the referring URL to identify the traffic source, and it comes empty too them they recognize it as a direct traffic.

Take this URL as an example when Google Analytics detects a URL like that, it compares to its existing list of known sources, they will see that is listed as a search engine, the q=seo will confirm that it is a search URL not one of Google's properties, the other checking point is to check if the landing page has GCLID in the URL which refers to paid search, GA also checks for any UTM variables that forces GA to override the source. If there is no GCLID or UTMs then GA will categories this medium as organic and the source will be Google.

As you can see the referring URL is vital for GA to track any traffic, when the referring URL is missing r the source of the visit will be categorized as direct.

What causes the referring URL to be missing (in other words what causes direct traffic in GA):

The most popular reasons for direct traffic in GA are:

  • Excluded referrals in Google Analytics without a proper cross domain tracking
  • Type-in traffic (When someone types a website’s URL into their browser, it’s direct traffic) and browser's bookmarks
  • Traffic via desktop e-mail clients like Outlook
  • Traffic from APPs and desktop software
  • Fake direct traffic from spam bots
  • Referral traffic from a secure (HTTPS) site to a non-secure (HTTP) site
  • Non-web documents like PDF or DOC
  • Traffic from incorrectly tagged campaigns (mainly wrong UTM tracking)
  • Traffic from links that do not send referral traffic (links with rel="noreferrer" tag)
  • Traffic from browsers that block referrals using add-ons or due to firewall settings

I do not want to spend a lot of time explaining what causes direct traffic in GA, especially that many of the reasons above are beyond webmasters control, direct traffic will be always available in GA, it is normal to see 10%-20% direct traffic, no point of fighting, all what webmasters need to do is inspecting the problem and making sure that they have done everything from their end too prevent it.

Diagnosing direct traffic in GA:

Most traffic sources in GA have another tracking point, first thing is to check if GA traffic is matching the numbers provided by other platforms:

  • Install Google Search Console and make sure that the organic traffic in a specif time frame matches the number of sessions in Google Analytics for the same time frame
  • If you are running Google Ads make sure the number of clicks in Google Ads' dashboard matches the sessions in GA
  • Same thing applies to Facebook ads or any other platforms

If the numbers are close that will be a good signal that the most important traffic sources are tracked properly, in the next step I will explain:

How to reduce direct traffic in Google Analytics:

You do not need to worry about every reason for direct traffic, especially the ones you can not control, like type-in traffic, no-referrer etc, direct traffic will be always there, just work on things that are under your control:

  • Make sure GA settings are correct and the code is installed on every single page of the website
  • Check the referral exclusion section in GA and make sure all excluded domains have cross domain tracking installed.
  • Make sure all pages are served with HTTPS with no errors, broken HTTPS can stop browsers from passing referral path and showing traffic as direct
  • Tag email campaigns and other marketing channels (especially APPs advertisement) using UTM
  • Filter out bot traffic in GA if there is any

Finally just remember, it is almost impossible to reduce direct traffic to zero, 10%-20% is normal, just do your part and keep monitoring and diagnosing any spikes in direct traffic.

Google Analytics

Google Analytics Page Filters Explained

I was checking which page filters in Google Analytics can be used to track user journey on the website, so I can use those filters in conversion rate optimization, I did the two sessions below and tracked the results in Google Analtyics:

First session (flat URL structure):


Second session (deep URL structure):




I will check the results of each filter and mark it as useful or useless to study the user journey and do conversion rate optimization:

Landing page (useful): will show the first page visited in a new session :

Destination page (useless): all pages visited in a session will be destination pages:


Exit page (useful): last page visited in the session:


Next page path (useless): it seems to be just telling the potential path for the next page on the same folder level:


Second page (useless): not sure what is that, it seems to be including the second page up in the hierarchy of the site:


Previous page path (very useful): this is showing the previous page that the user visited before getting to the current page:


Page depth (useful): it is an indicator to the number of pages visited by a user (even in multiple sessions):


Page path level 1 (useless): this filter seems to be analyzing the folder levels and deciding the page path based on that:


Page path level 2 (useless): similar to level one, but it shows the second level in the folder structure:


Page path level 3 (useless): similar to level one and 2:


Search destination page (useful): a page that is clicked on after a user conducted an internal search:


Start page (useless): a page where a user started an internal search:

Google Analytics

Track Form Abandonment Using Google Analytics Funnel Visualization

My previous post was about CRO, in that post I included form optimization as an important step for a better CRO. Form optimization can not be done without collecting data about users interaction with the form, and form abandonment is probably the most important metric that can do that.

What is form abandonment:

Form abandonment is the event where people start filling a form (at least filling one field) but did not click the submit button, so they have the intent to fill the form but due to possibly some hurdles the did not complete it, possible hurdles:

  • Long form (too many fields)
  • Technical issues (the form is not working on some devices or browsers)
  • The form has personal questions that users are not willing to fill
  • The form is broken or the Captcha is so difficult.

There are some online service like Hotjar that can track form abandonment, but unfortunately Hotjar does not work with every form easily, not mention that the data lives outside Google Analytics which means you have another platform to work on and monitor. You can see the form tracking chart offered by Hotjar below, it gives you the time spent by users field each field and the abandonment rate for each field.


In this post I will provide a step by step tutorial how to do form abandonment tracking using Google analytics. I will assume you a simple form on your website like the one belwo:


The source code of the form will like like this:


I will assume that the submission will lead to a thank you page like, please be aware that this tutorial will require a good knowledge of Google Analytics and Google Tag Manager (GTM).

The method I will be explaining will be utilizing the funnel visualisation feature in Google Analytics, which is not designed initially for that, it is designed more to track multiple pages funnel. Considering that a high level of accuracy is not required here the method below should provide a good insight on where and why people abandoning your form.

Step #1:

First step will be pushing an event to the data layer when a user try to fill in a field along with the field name, you can do that by adding the JavaScript code below as a custom HTML tag to your Google Tag Manger:

(function($) {
$(document).ready(function() {
$('form :input').blur(function () {
if($(this).val().length > 0 && !($(this).hasClass('completed'))) {
switch($(this).attr('name')) {
case "first_name":
virtualp = "first-name";
case "last_name":
virtualp = "last-name";
case "phone_number":
virtualp = "phone";
case "email_address":
virtualp = "email";
case "comments":
virtualp = "comments";
virtualp = "unknown";

dataLayer.push({'eventCategory': 'Form - ' + $(this).closest('form').attr('name'),
'eventAction': 'completed',
'feildLabel': virtualp,
'event': 'gaEvent'});
else if(!($(this).hasClass('completed')) && !($(this).hasClass('skipped'))) {

Please note that:

  • The code above assume that jQuery is installed already on the website.
  • You need to change the case to match your field names.
  • You can change virtualp (which is going to be the virtual page URL) to anything also just make sure the page is not already existing on your website.

Step #2:

Add a datalayer variable to track the field name:


Step #3:

Create a virtual page view to track every form field filling as a pageview:


The firing rule for the tag above will be as below:


After that publish your GTM container.

Step #4:

In Google analytics create a goal that tracks the thank your page with funnel steps that reflect the virtual page names you have set in step #1:


When you have enough data you should be able to see a funnel visualisation as below:


The funnel above should tell which field is causing that highest abandonment rate so you can either remove or change it.

Step #5 - Bonus - Track scrolling down as a page view:

Some forms are placed below the fold, or they are multiple step forms where people need to scroll down to see the other parts of the form. For those forms you can add the scrolling down to the form location as a virtual page view (see the tag and the trigger below and use them in GTM):



Form tracking abandonment is an important part of conversion rate optimization, always do it with any tool you feel comfortable with, there are other things you can do from a CRO prospective when it comes to form:

  • Exit intent pop-up window trying to give users unrefusable offer to stay on the page and fill the form.
  • Tracking filled fields even if people did not click submit and use it to better understand user behaviour.