0405123696 petra@web-data-analytics.com

 945 total views,  3 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.

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

david clayton myomasters

Your attention to detail is beyond what I had expected. The detail of the data is incredible. The best part though was to learn the profile demographic - which is very different to whom I think I've been trying to target through social.

David Clayton Director, Myomasters Massage Health Clinic Google Ads April 23, 2020

claudia impedovo

Our main purpose for generating these reports is about findings out information that will curb our strategy. The Audience Engagement Report provided us with a couple of new findings about our audience. We implemented elements to assist both of those findings and they have increased sales.

Claudia Impedovo Brand Manager at Spendless Shoes Ecommerce Google Analytics, Google Tag Manager & Google Data Studio Integration April 23, 2020

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

Nadia Rossi

It has been an absolute pleasure working with Petra over the last year and a half. 1834 Hotels centralises marketing for over 20 hotels around Australia, all with different branding and websites. On an analytics level Petra’s skills have allowed us to monitor and track our marketing efforts in the digital space. Bringing Petra onboard to manage our Google Ads was one of the best marketing decisions we have made. Her thoroughness and attention to detail is incredible, her insights have helped develop better marketing strategies and demonstrate to shareholders return on investment. I would highly recommend working with Petra.

Nadia Rossi Digital Marketing at 1834 Hotels Ecommerce / Hotel Google Ads April 23, 2020