Thursday, April 25

How to Reduce Direct Traffic in Google Analytics

Direct traffic in Google Analytics is often misunderstood. If you think that direct traffic is the one that enters your website’s address in the address bar or accesses it via bookmarks, I have some bad news. In reality, that is just a fraction of what direct traffic really is.

The first reason for this confusion lies in the name itself. Direct. Is it really direct? In Google Analytics, direct traffic really means “I don’t know where that visitor came from”. It might be from the address bar, from bookmarks of your browser, from email, from chat/messengers, etc. It should be called “unknown” instead. But this rant is for another time.

There are many reasons that affect this type of traffic and I wanted to address the ways how to reduce direct traffic in Google Analytics. Also, in the second half of this blog post, I will mention things that you have no control of and you will just have to accept them.

Table of contents

+ Show table of contents +

A quick overview of Direct traffic

There are several things that help Google Analytics determine where the visitor has come from to your website:

  • UTM parameters in the URL like utm_mediumutm_sourceutm_campaign, etc.
  • Referrer, a.k.a. the URL of the previous page (although you should keep in mind that there are quite many privacy-related limitations here)
  • gclid and other similar parameters that indicate that a visitor has come from paid advertising campaigns
  • Traffic source is overwritten on the code/tag level

If none of these parameters return meaningful values (or if they just simply don’t exist) when a visitor lands on your website, such a session is attributed to (direct) traffic in Google Analytics.

Can you see how the name direct is confusing here? In reality, it means that a traffic source is just unknown.

“But direct traffic is proof of our strong brand!”

If you have 40% of direct traffic and you think that this happens because of your solid branding campaigns, I have bad news. Unless you are really working with some huge and well-known brand, most likely, your direct traffic is more related to the limitations of web tracking (or just poor configuration) rather than people looking directly for your brand.

Unfortunately, I cannot prove that. Actually, I don’t think that anyone can prove what kind of direct traffic comes to YOUR website. Maybe your branding IS strong and you get a lot of truly direct visitors. Maybe it isn’t. And from what I have seen, I always bet on the latter.

Why? Because eventually, GTM/GA audits uncover a lot of technical problems.

Direct traffic is blackbox. Nobody can prove what it really is in your case. If someone can, I’d like to meet him/her and learn.

Instead of ranting about all of this, I would like to go to the more practical part of this guide, reasons why you get Direct traffic in Google Analytics and how to deal with that.

You can definitely check all of these list items and implement them in your setup. Hopefully, that will reduce some of your direct traffic and will attribute those sessions to other traffic sources.

Also, I will mention several reasons that you have no control over. Consider them as “gotchas”.

I am pretty sure that there are more items that could be added to the list. If you are missing something, let me know in the comments and I’ll update the list.

How to reduce direct traffic in Google Analytics

First I will start with reasons that you can actually impact and closer to the end of this guide, I will share other reasons that you will just have to accept as a fact.

First, let’s start with how can you actually reduce direct traffic in Google Analytics. Beware, this might require a lot of digging and auditing from your side.

#1. Your website is on HTTP and there are redirects from websites with HTTPS

As I have mentioned in one of the previous chapters of this guide, one of the parameters that Google Analytics uses to determine the traffic source is Referrer.

If another website contains a backlink to your site AND that site has an HTTPS in the URL (while your site is on HTTP), the referrer will not be passed.

So, if your website is still not using SSL (meaning that your site’s address still contains http:// instead of https://, your direct traffic numbers are affected by it.

If you don’t know how to add SSL, go and find a developer who will do it for you. Really, I mean it. Please do it. It’s 2020.

If you have implemented a cookie-consent banner on your website because of GDPR or some other privacy regulation AND a visitor gives consent just on the 2nd (or subsequent) pageview, that session will be treated as a (direct).

Why?

Because the traffic source is available only on the first pageview (if we are talking about regular websites, not single-page applications).

Here’s a situation. A visitor lands on your site (the URL might contain UTMs or maybe the referrer of the previous website is available). Once the visitor goes to the next page, the URL changes and your UTMs are now gone. Also, the value of the referrer will change. Now that referrer’s value contains your landing page’s URL (because that is the previous page). GA will treat this as a self-referral, meaning that your session’s traffic source is (direct).

So, what are the exact situations where this problem is possible?

  • Your cookie consent popup/bar is not eye-catchy and the visitor just ignores it, thus continues browsing (and then you lose your traffic source)
  • I have also seen some cases of poorly implemented solutions where the visitor (immediately after consent was given) is redirected to some other page, hence the referrer/other parameters are also lost.

What to do in this case?

First, just to save myself, I will post the usual “I am not a lawyer, you should discuss this with your legal department”. Alright, now we can continue.

I would suggest that:

  • Your cookie consent popup/bar should not redirect visitors anywhere after they give consent. Just let them browse further and fire your tracking codes accordingly.
  • Your cookie consent popup must be visible and get all the attention once the visitor lands on a site. The visitor should make his/her choice right away – to accept or decline. Your goal is to get that choice on the first pageview.

#3. UTMs with errors

It is a normal practice to mark your URLs with additional parameters called UTM (utm_medium, utm_source, utm_campaign, utm_term, utm_content).

If the visitor lands on your website and the URL contains those parameters, GA will attribute that session to the traffic source that is mentioned in those parameters.

Usually, these parameters are used in email marketing, social media posts, paid advertising, custom channels (like ebooks), etc.

But here’s the catch. If you want the UTMs to properly work, they must be properly formatted:

  • It is recommended that UTM parameters go in the URL after the question mark (while it is possible to also use UTMs after the #, that is not recommended). Example: mysite.com?utm_medium=social&utm_source=twitter.com
  • Different parameters must be connected with an ampersand (&)
  • UTM parameter names must be exactly like this:
    • utm_medium
    • utm_source
    • utm_campaign
    • utm_term
    • utm_content
    • Other variations (like utmMedium, etc.) will not work.

So, where is the problem? Quite often, I see typos or just a poor configuration in GA reports.

If the visitor lands on your website and the Referrer’s value is empty but the URL contains UTM parameters, that session will be attributed to some traffic source (that is described in those UTMs). But if UTMs are incorrect (I mean, they are formatted incorrectly), that session will be attributed to (direct).

The easiest way to check if your UTMs are broken is to go to the Landing Page report in Google Analytics (go to Behavior > Site Content > Landing Pages).

If UTMs are correct, they will not be displayed in the Page URLs. GA just reads them, attribute to the correct traffic source and that’s it. UTMs will not be displayed as the part of the URL.

But if you or your colleagues added them to the URL incorrectly, you will see them in your reports.

In that Landing Pages report, click “Advanced” next to the search bar.

Then enter the following filters:

  • Include Source/Medium containing (direct) / (none)
  • and Include Landing Page containing utm

Did the report return something? Yes? Then here you have your broken UTMs. Do your best to fix them and contact the people responsible for some of those UTMs, and ask them to fix it.

How can you find those people? You’ll have to play a detective and figure that stuff on your own.

Other things to search in that very same report (but not limited to):

  • medium
  • source
  • #

I hope you get the idea.

#4. Affiliate links with no referrer or UTMs

Is your business running an affiliate program? If yes, chances are that at least part of your affiliate links is coming in as direct traffic.

In GA, go to Behavior > Content > Landing Pages. Let’s say that all of your affiliate links contain the URL parameter affiliate_id. Example: mysite.com?affiliate_id=123123.

Now, let’s enter “affiliate_id” (without quotation marks) to the search bar of the Landing Page report. Note: if your affiliate ID parameter is different, enter YOUR parameter there (e.g. aID, affID, partner_id, etc.).

The report will return the list of landing pages that contained the affiliate_id parameter.

Now, add the secondary dimension Source/Medium. Finally, open the advanced search in GA and enter the following condition: Include Source/Medium containing (direct).

As a result, you will get a list of all sessions from your affiliates that are treated as (direct) in Google Analytics.

how to reduce direct traffic in google analytics

A quick fix is to create several variables and overwrite campaign data in Google Analytics tags. If the URL contains affiliate_id, then we’ll manually set the traffic source to be utm_medium=affiliate and utm_source to be the actual ID of an affiliate that drove those visitors to your site).

Create the first one (name this variable cjs – campaignMedium):

function() {
 return window.location.href.indexOf('affiliate_id') > -1 ? 'affiliate' : undefined;
}

If your affiliate parameter is different (not the affiliate_id), insert it in the code above (instead of the affiliate_id)

The 2nd variable (name this variable cjs – campaignSource):

function() {
 return window.location.href.indexOf('affiliate_id') > -1 ? {{url - affiliate_id}} : undefined;
}

For the 2nd variable to work, you need to create a URL variable in Google Tag Manager with the following settings:

url - affiliate id

The name of that variable must strictly be url – affiliate_id. If your affiliate ID parameter’s name is different, use that one instead. But make sure the replace it in all of the variables above.

Finally, go to your Google Analytics settings variable > More Settings > Field to set and add two new fields (as I have displayed that in the screenshot below). Field names are case-sensitive.

In the value field of the campaignMedium, I’ve inserted the first Custom JS variable we’ve recently created. And in the campaignSource field, I’ve inserted the 2nd Custom JS variable.

#5. URL shorteners

If you are using link shorteners, they might lose the referrer, hence no traffic source data. What you could do is to add UTMs to the final destination URL.

For example, instead of inserting “https://www.mywebsite.com/some-landing-page“, you could insert “https://www.mywebsite.com/ some-landing-page?utm_medium=……” (replace the dots with the actual UTM parameters).

That way, even if the referrer is not available, UTMs will properly indicate the traffic source to Google Analytics.

I have no quick ways to audit short links, thus you will probably need to review/update them one by one in your link shortener platform/app.

#6. Links in non-web documents are missing UTMs

If your visitors/users can download files like ebooks (and those files are in PDF or some other rich format), those files might contain links to your website, right?

When a visitor clicks any of those links, the referrer is not available. Ever. Even if you open PDFs with Chrome, the referrer is not available.

A solution? All links in your PDFs and similar files should contain UTM parameters.

If you already have a bunch of ebooks published and none of them contain UTMs in links, you will need to manually update them. If many people have already downloaded your ebooks, you cannot change links those files.

Speaking of naming convention, one of the ideas could be like this:

  • utm_medium=pdf
  • utm_source=[type of content], for example, utm_source=ebook, utm_source=checklist, etc.
  • utm_campaign=[name of the document], for example, utm_campaign=very-cool-ebook.

#7. UTMs are not adopted company-wide

Even if you are aware of UTMs and you always use them, your colleagues might not be on the same page. You need to communicate with them and ask them to always use UTMs in links in PDFs, emails, etc.

When many people are working with UTMs, communication, and consistency become a challenge.

Many people = many different naming conventions, a.k.a. random $h!t everyone comes up with. Some people might use utm_medium=email while others in your company might use utm_medium=Email.

Google Analytics is case-sensitive, thus Email and email are two different traffic sources.

What can you do about it?

One of the ways could be to create a spreadsheet with your naming conventions. Whenever someone wants to general a link with UTMs, they need to:

  • Enter all the UTM parameters in certain cells and then the sheet will return the URL
  • However, by seeing that sheet, they will need to look at other already existing UTMs and at least try to follow the naming convention.

For inspiration, you can take a look at Annie Cushing’s (Annielytics) spreadsheet.

The more links are tagged with UTMs, the smaller (direct) traffic will be.

#8. Fake traffic from bots

It is very likely that you are already getting fake traffic from bots and see that in Google Analytics.

In the past, that was possible to tackle with dimensions like Service Provider in GA but, unfortunately, those days are now gone. We have lost that valuable data in GA that was helpful in the fight against spam.

As a workaround, you could try to implement this solution. But be aware of its quota limitations.

Also, make sure you have enabled this checkbox in the View settings of your Google Analytics. Do that in every view (except the Raw view).

#9. Incorrect implementation of the measurement protocol

Measurement protocol enables marketers/analysts/developers to send the data directly to Google Analytics. No tracking codes are needed, the communication is done server-to-server.

This is useful in some cases. For example, if a visitor initiates a purchase but still has to do the wire transfer, you should count the sale when the funds reach your bank account.

By the moment this happens, the visitor will most likely be offline, thus regular tracking codes (including GTM) are useless.

But in this case, your developers could send the purchase data directly from your website’s server to Google Analytics via Measurement protocol.

In theory, this sounds very good. However, developers sometimes mess things up by forgetting to include important data. The result? The majority of your sessions are attributed to the (direct) traffic in GA and all those users are displayed as New Users.

What is the reason? Developers are not passing correct client IDs to Google Analytics.

Client ID is a random ID that is assigned by the Google Analytics tracking code. When the visitor browses your site, that ID persists across all pages (unless a device is changed or cookies are deleted). When you get the funds from the customer in your bank account, the developer’s code should send the purchase data to GA together with the client ID of that visitor. Then GA will be able to attribute the purchase to the previous non-direct traffic source.

This means that developers must:

  1. Retrieve the client ID while the visitor is in the checkout process
  2. Store that client ID in the database and then use it in the request that is sent to the Measurement Protocol after the funds were successfully received via wire transfer.

This is much more technical than the rest of the guide, thus I will only leave the related resources for you to read as a homewok:

#10. Not all pages of your website have Google Analytics (or Google Tag Manager) code

Here’s a situation, a visitor lands on a certain page of your website from Google. The referrer is “google.com” thus it would be easy to identify the traffic source.

But for some reason (maybe a human error), that page does not have a Google Analytics tracking code implemented. Then the visitor navigates to the second page that has the GA code.

So, the first pageview in GA is actually the 2nd pageview of that visitor. And the value of the referrer of that page is your own website. This means that GA will treat this as a self-referrer, hence the direct session.

How to prevent this? Audit your website and check whether GA is implemented on all sites.

One of the possible options is to use the Screaming Frog.

Screaming Frog is a solution that is especially popular among SEO professionals who want to check what’s happening on their clients’ websites. How is it related to GTM or GA? You could configure it to crawl the entire website and look for particular information (like scripts).

If you have implemented Google Analytics via GTM, then you could configure Screaming Frog to keep looking for https://www.googletagmanager.com/gtm.js in the website’s source code. This URL is used by the Google Tag Manager container.

In Screaming Frog’s application, go to Configuration > Custom > Search and enter the following condition:

Does not contain https://www.googletagmanager.com/gtm.js

Enter the URL of the website you wish to check and hit the Start button.

Screaming frog

That’s it! As the crawl progresses, you’ll be able to see the full URLs of the pages where your GTM container code is missing. Your next step is obviously to add the tracking code to those pages or ask a developer to do that.

And then, of course, make sure that the trigger of your Google Analytics tag in Google Tag Manager is related to All Pages or other condition that fires on all pages.

If you have implemented Google Analytics directly in the website’s source code, then here are other URLs you could use in the audit:

  • https://www.googletagmanager.com/gtag/js (if you are using the latest version of the GA code, gtag.js)
  • https://www.google-analytics.com/analytics.js (if you are using the older version, called Universal Analytics). It is highly recommended that you migrate to the newer version.

If none of the abovementioned options work, you are probably dealing with even older GA versions. In that case, it’s time for you to migrate to the newer version. I’m serious.

#11. ITP

ITP (Intelligent Tracking Prevention) is a privacy-enhancement mechanism that applies to Safari browsers and also all browsers on iOS.

There are many things that it affects but one of the main things in the context of direct traffic is:

  • Cookies set by Google Analytics (and other JavaScript tracking codes) are set to expire in 7 days (unless the visitor returns to your site sooner)
  • Cookies set on the page when the visitor directly lands from the ad network (e.g Google Ads or Facebook Ads) are set to expire in 24 hours (unless the visitor continues to browse your site)

So if you acquire a visitor for the first time from Google Search and later that visitor returns after 8 days, Google Analytics:

  • Will treat it as a new user
  • The current traffic source will get priority. If the current traffic source of that repeat session is direct, it will be reported as direct in GA as well.

If the visitor from Google Search returns after 6 days (and enters your site, say, from a Slack chat), then GA will treat it as a returning user and the traffic source will be “organic” because of the GA’s last non-direct click attribution.

What can you do about the ITP? It limits cookies that are set via client-side JavaScript (read: via JS tracking codes that are added via GTM or are hardcoded in the website’s source code). But if the cookies are set from the server-side, their expiration data is fine (at least for now).

Thus, you could ask your developers to build a service that rewrites cookies and extends their expiry date. They could use this blog post for inspiration. Alternatively, you could use a ready-made solution Cookiesaver that is easier to implement. However, keep in mind the privacy concerns about this tracking method.

#12. Did you rebrand recently and change the domain?

If yes, then check whether your direct traffic numbers have increased after the launch of the new brand. You can go to GA > Acquisition > All Traffic > Source/Medium and then click on (direct) / none.

Then choose a larger date range and check whether there was a sudden increase on the day when you publicly rebranded or several days after that.

If you see a sudden increase, most likely this is caused by some redirects (between the old and new domain) and the referrer is lost somewhere along the way.

Unfortunately, I don’t have a quick way how to identify what exactly is broken (if you know one, please please please, let me know ? ). But here are several ideas:

  • Check some of the backlinks of your client/business that redirect to the older domain. Click on some of them. Then when you finally land on the new domain, open the JavaScript console of your browser and enter document.referrer. If you see just quotation marks with an empty value, then there is a chance that the referrer value is lost somewhere in the redirects between your old and new domains.
  • Check which traffic sources (especially in the Referral medium) have lost the traffic after the rebranding. They might give you some clues about which referral traffic has turned into the direct one. For example, in the screenshot below, I’ve identified that the referral traffic dropped significantly after the official rebranding. The next step I would do is to check whether the direct traffic increased by a similar amount. If yes, I would check the most popular referral backlinks, click them on their respective websites and see if the referrer is visible in the console. If the referrer is lost, consult with developers.

This process is usually very exhausting, especially if you work as a consultant for the client and you don’t know their business that well as they do. As a result, they have no clue what you are looking for and you don’t know that exactly to ask because you still don’t have a clear picture of their technological ecosystem.

What should you do when you identify the traffic sources/referrals that redirect visitors to your site but do not return the referrer anymore?

First, collect a handful of examples of pages (on other websites) that contain your backlinks. Then send those links to your website’s developers and explain: when your backlink is clicked, the redirects happen between your old and new domain, and the referrer is somewhere lost. They need to fix it — your devs need to preserve the referrer.

It is not your job to know and explain to them HOW to do that. Just tell them that you need the referrer to be preserved when those links are clicked and redirect between your old domain and new domain occurs. If they don’t know how to fix that, maybe it’s time to look for more experienced devs.

IMPORTANT: However, there might be other reasons why referrer is missing and you/your devs have no control of it (check this chapter). So, before you contact them, finish reading this blog post.

#13. Incorrectly configured cross-domain tracking

If visitors can navigate from one domain to another (I am not talking about subdomains of the same domain), you need to implement Google Analytics cross-domain tracking. However, if you misconfigure something, chances are that part of your traffic will become (direct) in GA’s reports.

One of the possible cases that comes to my mind is this: you updated the Referral exclusion list in Google Analytics correct but the GA client ID is different across different domains.

The result of this? You will get a lot of new users on domain B and their traffic source will be direct (because the domain A is excluded from referrals).

If you want to learn how to properly configure Cross-domain tracking in Google Analytics with Google Tag Manager, download my free e-book below.

#14. Check the Landing Pages report in GA for one more time

In this blog post, we have already checked those reports for several times. But let’s do that one more time. In this chapter, you should be looking for anything suspicious and unusual. I will not be giving very specific tips because every website is different but here is one of the theoretical examples.

First, let’s go to GA > Behavior > Site Content > Landing Pages. Add the Secondary Dimension “Source/Medium”.

In the search bar, click advanced, enter the following condition, and hit Apply.

Notice that I include the question mark in the search filter. In this case, we are looking for landing pages that had some URL (a.k.a. query) parameters but were assigned to the direct sessions. Do any of those parameters look familiar?

Maybe a URL that contains ?_hsmi parameter means that this email was sent via Hubspot but for some reason, the link was not decorated with UTMs?

How do I know that _hsmi belongs to links from Hubspot emails? One of the most valued skills these days is googling.

Once you identify the tool from which that direct session came, it’s time to (once again) play the detective and find out why some links in Hubspot are not decorated.

Keep in mind, I don’t know whether it is possible to have an undecorated link in Hubspot. This is just a theoretical example. Do the same research on other suspicious query parameters.

This will not be quick and easy.

#15. If possible, ask to not include the noreferrer in backlinks (#quiteUnlikely)

I am not a link builder and I think that I would be pretty bad at this. I have serious doubts that this tip is useful but hey, maybe it will work at least in some cases where you have very good relationships.

So here’s the thing: if a link on another website redirects visitors to your site and that link contains “rel=noreferrer”, that traffic will become (direct) in your GA reports (unless there are UTMs). That happens because (surprise surprise!) the referrer is not passed.

So, if that is possible (in most cases, probably not), ask to remove the noreferrer from the rel parameter in that link element.

Speaking of cost/benefit of this solution, I’d say that you should invest more of your time in other tips mentioned in this blog post.  If it was already challenging to acquire the backlink, getting someone to remove the noreferrer will be even more challenging. Plus, some webmasters might reject your request due to privacy issues.

Anyway, just wanted to mention that in case you’re desperate for solutions ?

Things that you should accept

Speaking of all of the previous tips on how to reduce direct traffic in Google Analytics, you have at least some sort of control/impact. You can fix some issues yourself while in other cases, you can cooperate with developers.

But there are situations where just have to accept the fact: a significant portion of your direct traffic is related to mediums that do not pass the referrer. Period.

#1. Some websites don’t send the referrer data

This is related to tip #15. If a backlink to your website has a rel=”noreferrer” parameter, that traffic will be displayed as direct in your GA reports.

But this is not the only way how the referrer policy can be configured. It can also be set:

  • in the HTTP headers
  • in the meta tags of the website. If you open the website’s source code and see this in the head

    this means that no links on a site will pass the referrer, hence direct traffic.
  • via the referrerpolicy attribute

#2. Chats and messengers usually do not send the referrer

If someone shares your website’s link on Slack and the other person clicks it, that’s a direct session for you, my friend. And there is nothing we can do about it. Also, messengers usually tend to not pass the referrer. Although I’ve noticed that Facebook Messenger still passes the referrer.

#3. Visitors might use browser plugins that affect the referrer

For example, a Chrome Extension called Referrer Control lets you forge the referrer OR disable it completely. If a visitor lands on your website with the disabled referrer, you guessed it — there is nothing we can do about it.

#4. People can actually enter the address in the address bar (or bookmark it)

Unfortunately, you cannot identify whether the visitor actually did that or maybe the visitor just landed on your website from another medium that does not pass the referrer. There is no way to do that.

Also, there is a chance that a visitor landed on your site from an email (and the UTMs are in the URL) and bookmarked it, every time that bookmark is clicked, the traffic source of the visit will not be (direct). It will use the UTMs that were stored in the bookmark as well.

How to Reduce Direct Traffic in Google Analytics: Final Words

When it comes to reducing direct traffic in Google Analytics, there is no single solution that will work for everyone. Even if you manage to implement all the tips, you will not reach the REAL numbers of direct traffic in your GA reports.

Unfortunately, this is what we (marketers and analysts) have to accept and work with.

But if you are thinking that you have a large volume of direct traffic jus because your branding is strong, that is, most likely, not true.

My goal of this blog post was to show you that the term direct traffic is misleading and it should be renamed to “I have no idea where this visitor came from” and, hopefully, after reading this guide and implementing at least some of the tips, you’ve managed to distribute direct traffic to other traffic sources.

This is a neverending topic and if you know something that was not mentioned in this guide, I’d be really happy to hear your thoughts.

Got questions? Post a comment below.

Source: analyticsmania

0 0 votes
Article Rating
Subscribe
Notify of
guest

2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
amit
3 years ago

Thank you for sharing the massive information to us. It is very useful and informative.

2
0
Would love your thoughts, please comment.x
()
x