Navigation

Related Articles

Back to Latest Articles

Invalid visits • Campaign reporting problem


Wojtek Andrzejczak
Invalid visits • Campaign reporting problem

How to estimate the invalid visits in the campaign reporting? Why this problem exists and how we could avoid report discrepences.

What is a valid campaign visit?

When you click on the ad and you are redirected directly to the landing page with the tracking parameters (like UTM, dclid, gclid), Google Floodlight, and other pixels fires. Then we know how many confirmed user “landings” our campaign has generated.

This metric is called the Click-To-Landing page, which indicates how many users have landed from our campaign successfully and how many not (Dropoff-Rate).

Social Sharing Links problem

But the problem begins when someone copies his landing page URL with the tracking parameters and sends it to someone else via e-mail, messenger app, to one more person. Then we’ll have additional traffic coming outside of the physical campaign ad-click-website channel.

On the one hand, it is good that someone shares links to our website so other people can visit our website and make some purchases. But when those shared links contain tracking parameters, it hurts our campaign reporting, while it includes nonvalid campaign visits.

Important notice

There is no technical possibility to track with 100% if someone has come from WhatsApp, Telegram, or any other social platform. But with high probability, we can distinguish if the visit is coming from the ad or not.

Track referrer URL

Referrer URL contains a website URL from which the user has come by clicking on the ad, image, or text link. In typical cases, if the user has clicked on the ad, we should access the referrer information on our landing page.

You can check referrer information in the Developer console in chrome by pressing F12 on windows or CMD+Shift+J on Mac.

document.referrer
Invalid visits / Track referrer URL
Google Chrome / DevTools / Track referrer URL

Blocking referrer

Unfortunately, it would be too easy to track referrer, right? Right.

Many apps and web applications are blocking passing referrer information. It means that we are not able to identify which app or website has managed users to click to get to our website.

Invalid visits / Blocking referrer
Google Chrome / DevTools / Link REL “noreferrer” attribute

Example platforms which block referrer URL

  • WhatsApp
  • Telegram
  • Instagram
  • Twitter

Example referrer domains

Facebook

  • facebook.com
  • m.facebook.com
  • l.facebook.com

Google Marketing Platform

  • tpc.googlesyndication.com
  • ad.doubleclick.net
  • s0.2mdn.net

Google Ads

For ads delivered via Google Ads GDN, we’ll not see any Google domain. Instead, the website URL where the ad was displayed.

  • google.com
  • google.*

LinkedIn

  • www.linkedin.com
  • com.linkedin.android
  • lnkd.in

Direct Bookings

In case when we have Branding Days, ads in the background of the website, parallax, and many similar ad formats where it is required to implement the ad directly into the website. We also like in the case of Google Ads, GDN might see the publisher’s website URL.

Track browser history

Another trick to get information if the user clicked on the ad/link or has a typed website or pasted URL in the navigation bar is checking how many steps in the browser tab we have available.

If we click on a link, and a website page-load in the new tab. It means that we’ve come here by a referrer URL. And it does not matter that we don’t know what the referrer URL is.

If we open a new tab and type website URL, or paste URL from the clipboard, we’ll have the possibility to go back in the browser history (go back button). So we could not click on any ad/link because the new tab would be opened.

history.length

Note
If someone has a bookmark in the browser and opens it in a new tab, history will be 1, and referrer will be empty.

Solution idea

So to let us track campaign traffic on our landing page, we want to be able to make sure that:

  • We cab access the referrer URL
  • Match referrer with channel service through we are delivering our ad
  • Browser history equals 1

Implementation

Ok, so now let’s go to make some coding stuff to let us collect all the data we need.

Google Analytics

We’d need to create 2 new dimensions. You can call them how do you want 🙂

  • Campaign Referrer Host Name – collect referrer information
  • HistoryLength – collect history steps available in the browser

Google Tag Manager

As a preparation step, let’s prepare a few things inside of the Google Tag Manager. If you use another tag management system, the process should be very similar.

Create variable

First of all, we need to create variables, which will collect the information we need.

Campaign Referrer Host Name

To keep track of the referring domain, we need to create a variable that will extract this information for us. In case when there is no information about the referrer domain, the variable will return “none”.

function() {
  var referrer = typeof document.referrer === 'string' ? document.referrer : "";
  var chunks = referrer.split('/');
  var hostname =  chunks.length > 1 && chunks[2] ?  chunks[2].replace('www.', '') : '';

  return (hostname !== '') ? hostname : 'none';
}

In Google Analytics we need to create a Custom Dimension.

Invalid visits / Google Analytics / Custom Dimensions
Invalid visits / Google Analytics / Custom Dimensions

HistoryLength

Next Google Tag Manager variable is much easier. It returns which in the browser tab history our page is loaded. It the value would be “1” and “direct” visit, that means that the user has entered our page from a browser bookmark.

function() {
 try{
 	return history.length;
 } catch(e) {
   return -1
 }
}

In Google Analytics we need to create a Custom Dimension.

Invalid visits / Google Analytics / Custom Dimensions
Invalid visits / Google Analytics / Custom Dimensions

Extend Google Analytics settings

Map created variables with a Google Analytics dimension index. And when you ready, you can publish your changes.

Invalid visits / GTM / Map variables
Invalid visits / GTM / Map variables

Results

Depends on how many campaigns you have, you can wait for a few days to see some results.

Bellow, you can find a short analysis of the LinkedIn shared posts to my blog.

Invalid visits for LinkedIn posts

In normal case, all visits directly from linked should be marked with one of the LinkedIn domain. Marked domains in red, represent not valid/expected domains.

19 visits have been made with UTM’s but without referrer information (mail client, messenger app).

Invalid visits / Google Analytics / Linkedin
Invalid visits / Google Analytics / Linkedin

Invalid visits for Google Ads

For SEA campaigns, the disproportion is not that high, but we could identify from which Google search versions users have been searching our website. Sometimes it can be interesting information.

Invalid visits / Google Analytics / Google Ads
Invalid visits / Google Analytics / Google Ads

Summary

Described example, it is not a 100% answer where the user came. But instead, allow us to understand the user share of the user that shared campaign URL through social media because we’ll be able to estimate the viral effect of our campaign with a direct assignment to a specific campaign.

What results to expect? Well, it depends on what campaign do we have. If we advertise an expensive, exclusive car brand, I’d not expect to see the significant result here. But for an e-commerce shop, events, sales events like black-Friday, it could make a very substantial result to analyze.

Subscribe to receive updates about new articles.

Links

Show Comments (0)

Comments

Related Articles

Google Display & Video 360

6 steps to activate Floodlight in DV360 • TrueView for Action

6 steps to activate Floodlight in DV360 for TrueView for Action campaign.

Posted on by Wojtek Andrzejczak
Google Campaign Manager

Google response to Apple ITP • Enhanced attribution

Google Enhanced attribution is an answer for Apple Intelligent Tracking Prevention (ITP). But how does it actually work?

Posted on by Wojtek Andrzejczak