0405123696 petra@web-data-analytics.com

 2,976 total views,  9 views today

Your filtered view in Google Analytics should be your main view that you use for day-to-day analysis and reporting. And one of the first filters that you will want to configure in this key view is the “Include My Domain” filter. The reason for this filter is that you only want to include website traffic that goes to your domain.

Without an Include My Domain filter, spammers can cause you problems on Google Analytics. They can send data to your Google Analytics account if they know your Google Analytics tracking code, without even needing to visit your website at all.

Imagine if someone stole, or accidentally typed, your Google Analytics tracking code, and put it on their own website. Then whenever visitors went to this other website, all of the data included within it would be tracking into your Google Analytics account. Very irritating!

If a malicious spammer or competitor wanted to upset your business they could steal your Google Analytics tracking code, and add it to other websites. If you didn’t discover this quickly then your Google Analytics Account would effectively be rendered useless because you’d be receiving data from websites other than your own, and your data would no longer be trustworthy.

Obviously this is something that we want to eliminate as a possibility before it even happens!

So the first filter that we need to implement in order to make sure that we’re on top of the issue is an Include My Domain filter. This can be a Predefined or Custom Filter Type depending upon how many hostnames you need to include.

To set it up as a predefined filter, choose “Include only” > “traffic to the hostname” > “that begin with” > then add the hostname of your website. See the following image for an example:

Click Verify this filter before saving to see if there are any other hostnames that are coming through which will now be filtered out.

I also want to highlight the fact that in this filter I suggested selecting traffic to the hostname “that begin with” rather than “that are equal to” because sometimes Google will cache your website, and they will append .googlecache to your hostname. If instead you want to only include traffic to the domain that is exactly equal to your hostname then you can do that as well, but the cached pages will be cut out of your view. Personally, I like to include the cached pages, but it is completely personal preference and won’t make a lot of difference either way.

Creating a Filter Pattern using a Regular Expression

If you have multiple domain names, or if you have cross-domain tracking between your website and a payment gateway, there will be more complexity required in your filter. This is because each domain name will need to be included in your filter, otherwise they will be excluded from your view. To do this, you will need to create the filter as a custom filter.

In this case choose a Custom filter type and choose ‘Include’. In Filter Field pick ‘Hostname’. This will give you the option to add a Filter Pattern.

The Filter Pattern uses a Regular Expression to set the rule for what to include in your view. A Regular Expression is a way of filtering text using a rule. To write the Regular Expression for your own hostnames you can define it as follows:

^ ( host1 | host2 | host3 ) – i.e. this will include a hostname that begins with “host1” or begins with “host 2” or begins with “host 3”.

Important note: If you have more than one hostname and you want them all to show up in the same view you must put them all in the one filter rather than creating separate filters for each of them. If you have more than one Include filter in your Google Analytics view then it will only include data that matches both of the filters at the same time, not host1 OR host2. In the case of hostnames you never have more than one hostname at a time for any given URL, so if you had two separate Include hostname filters you would wipe out all your data completely and end up with an empty view.

Important note #2: If you have more than one top level domain (TLD) such as UK, US, AU etc and the currency changes in each case, you should set up a separate view for each and choose the appropriate currency in that view. Otherwise the currency will be converted in Google Analytics.

Google Analytics offers you a lot of marketing and commercial potential, but it’s important that you keep on top of the vulnerabilities that it also creates. By adding an Include My Domain filter to your filtered view, you will ensure that invalid host spam is kept out of your data. This secures your business, and potentially even gives you an edge over your (much spammed) competition.

Michelle Bridger

Petra's detailed reports and her personal assistance has been helping us to know where to concentrate our efforts and even showed us technical issues we needed to fix. Our Audience Engagement Report identified several key interests of our buying audience. We tried targeting one of those interests and it brought in two sales almost immediately! I highly recommend working with Petra and accessing her brilliance to scale your business.

Michelle Bridger Michelle Bridger, Facebook Advertising Specialist Ecommerce Google Tag Manager, Google Analytics & Google Data Studio Configuration April 23, 2020

charles marois olsa tools

Working with Petra was a great experience, communication was easy and she is very organized. She also provided detailed reports of the work she had done and the results generated. We would definitely recommend her services.

Charles Marois CEO, Olsa Tools Ecommerce Google Ads April 23, 2020

Erica Stacey Scout Digital

I recently worked with Petra to improve my understanding of Google Tag Manager.

Petra not only provided a solid overview of GTM set up and event tracking, she also provided many tips on best practice, and answered the questions that I didn't even know to ask!

Petra is patient, fun to work with, and her analytical programming mind is hell bent on finding the BEST solution to any data, analytics or tracking problem.

Erica Stacey Scout Digital Marketing Strategy Session June 21, 2017

leesa dawson

I am so grateful to have met you, as I think your insights are the BEST I have ever come across.

Leesa Dawson CEO, The Uniform Stylist Ecommerce Google Ads April 23, 2020

brett leggett

Hi Petra, Hope you are well, I checked out the Google Analytics and all I can say is AWESOME. You have essentially doubled her revenue in a month and the Google Ads seem to be popping off!

Brett Leggett Brett Leggett ✪ eCommerce Growth Specialist Ecommerce Google Ads April 23, 2020