Here are a few tips for debugging your Google Analytics tagging implementation.
Estimated Read Time: 7m 25s
The Google Analytics Include filter is a powerful tool that allows you to limit data in your Google Analytics View based on the subdirectory, hostname, source IP address or any other required logic. However, there is one caveat for using multiple Google Analytics Include filters: When you use two or more Include type filters in your Google Analytics View, each filter works independently and only allows traffic which satisfies the filter condition. For example, if you were to filter traffic by two Include filters using /sales/ and /checkout/ subdirectories of the website, the first filter will only include hits to the page containing /sales/ (excluding /checkout/ pages) in its URL and a second one only pages with /checkout/ (excluding /sales/ pages). So unless there are pages containing both sales and checkout patterns in its address - nothing will be included in the View. The solution here is to use just one filter matching both patterns (regex expression: (/sales/)|(/checkout/)).
You don't normally see more than one Include type filter in the View for exactly this reason.
As I wrote in Google Analytics Limits and Quotes each filter can only accommodate 256 characters in the text field. This is enough for most websites, but not for your average enterprise. At Internetrix we are noticing this limitation kicking in every couple of months when implementing Google Analytics structure for our enterprise clients. Furthermore, you can't use different dimensions in the same filter.
An example could be a requirement to include hits from one hostname and hits from another hostname where Page Title contains specific phrase (for ex. "On Sale").
A little workaround that I have found to the previously mentioned limitations is to match against conditions one by one using an Advanced type filter. Then you can use only one Include filter at the end (since Google Analytics guarantees that filter will be executed in the specified order). In other words, every filter "remembers" in a separate field that we need to include the current hit rather than simply filtering traffic. Later, the Include type filter checks if the field is set to any value, and if it is, allows this hit to be included.
Let's say we are tasked with collection of all hits to the website www.example1.com.au and hits to hostname example2.com.au where Custom Dimension with index 31 is set to Yes. We are going to create three filters which need to be applied to the View in the following order;
As you can see from the above, the filter order is super-critical and should they be executed in an incorrect order - nothing will work.
While things should be up and running now, we have used a bit of a non-standard approach. I am a big fan of simple and self-documenting things. This one is obviously not and therefore I only recommend doing this as a "last resort".
By simply changing the order in which filters execute we can easily get incorrect results. More importantly, if anyone accesses the View setup they will find it very hard to understand.
To use this setup effectively, my hot tips are:
Hopefully by now you have a much better understanding of how to apply my little Include Filter workaround. If you have any questions or are looking for further assistance with any Google setup and implementation issues get in touch today. Internetrix has a diverse team of digital analytics experts with years of experience utilising the Google Marketing Platform, especially Google Analytics 360. If you have any questions or projects regarding Google Analytics, please get in touch with our expert team today!