Anomaly Detection in Google Analytics 4: A Comprehensive Guide
logo
logo

Get in touch

Awesome Image Awesome Image

GA4/GTM

Anomaly Detection In Google Analytics 4

Writen by Magesh

comments 0

Anomaly Detection In Google Analytics 4

Google Analytics 4 is, without a doubt, one of the top analytics solutions in the world. It boasts some industry-leading features. One of these features is anomaly detection. In this post, you’ll learn about this important yet underused feature.

This blog post will answer the question of anomaly detection, some of its benefits, where you can find it, and finally, how to use it. By the end of this post, you’ll be able to access and use anomaly detection easily.

Let’s get started with defining anomaly detection.

What’s An Anomaly?

In Google Analytics 4, an anomaly means something that’s an outlier or isn’t normally seen in your GA4 events or actions.

A good example of an anomaly is outliers in data, for example:

  • An unexpected decrease in web traffic or,
  • A sharp increase in credit card transactions processed at unexpected locations

Now that you understand what an anomaly is in Google analytics 4, let’s look into how detecting anomalies can help your business.

Benefits of Using Anomaly Detection

When these anomalies occur, you need a detection tool to enable you to know what is going on. Once you know exactly what is happening, you can identify potential opportunities and stop potential threats.
A good example of the practical applications of anomaly detection includes the following:

  • An e-commerce business that’s alerted to spikes in demand for new products based on the anomalies of sudden interest in a product from customers
  • A business blog identifying spikes in web traffic due to a recently published post. It can enable the owner to double down on the popular blog topic

How to Find Anomaly the Anomaly Detection Feature GA4?

You can access anomaly detection in GA4 via Google Analytics Insights. It’s not possible to view it from the menu, so to access it, click the Insights icon that is available on the top right of your Google Analytics homepage.

Anomaly Detection Feature GA4

Once you click the insights button, you can scroll down and click ‘View all insights’ to view all available insights.

Insights and Recommendations In GA4

Under each insight, you can see the points where anomalies occur in the visualization.

Now let’s learn more about Automatic Anomaly detection.

Automatic Anomaly Detection Via GA4 Insights

By default, Anomalies are automatically detected within GA4, and you can view them from within the insights panel.

To use anomaly detection, you need to sign into your Google Analytics account and select the demo account.

Automatic Anomaly Detection Via GA4 Insights

Select the GA4 – Google Merchandise Store property and not the Universal analytic property (UA – Google Merchandise Store).

You must use the Google Merchandise Store from the Demo Account to properly understand anomaly detection. You can get the instructions on how to use the demo account from Google answers.

The reason why you must use the Google Merchandise Store property is that it’s the only property that has available insights. And it contains real business data, which you can use to experiment with all the features of Google Analytics 4.

Next, click on ‘Insights’ on the homepage.

Insights on Home Page GA4

Google Analytics presents you with various insights, such as users from sources and conversions from users. You can see the expected and actual values when you hover over the charts.

Expected & Actual Values Insight in GA4

You can expand any insight by clicking the expand window at the bottom of the card.

Expand Insight in GA4

Google Analytics ensures that you understand the insights by explaining each insight and giving you a visualization.

GA4 Visualization

Custom Anomaly Detection via Custom Insights

You can also use custom insights for anomaly detection. This means you build an ‘Insight’ from scratch and customize it.

By creating a custom insight, you can set the evaluation frequency (hourly, daily, weekly, or monthly). You can also add conditions, e.g., device type or location.

By choosing the option, you can generate your own insights, showcasing the versatility of GA4. Initially, a list of recommended custom insights will appear. Each suggestion focuses on anomalies in different daily metrics, demonstrating how you can utilize anomaly detection in Google Analytics 4 in various ways.

Creating Custom Insights in GA4

You have the flexibility to choose which of these suggestions to apply immediately or add them all at once. But what if you want to use a different frequency to detect the same anomalies? Simply select “Review and create” next to any recommended option.

Custom Insights Review and Create Option

In this step, you have the option to adjust the evaluation frequency, choose specific segments for data collection, or modify the metric and condition of this custom insight.

Custom Insights Segment Option

While these ideas are great as templates or for immediate use, we’ll be starting from scratch in this tutorial. Therefore, close the editing window for custom insight.

In the Start From Scratch section, go to the bottom and select Create new.

Start From Scratch Create New Option

Once you close the editing window, you’ll notice that you’re taken to a similar window, but the metric and condition fields are blank. What parameters could we set for personalized insights?

To start, you can choose a monthly, weekly, or daily evaluation frequency for both online and app events. An hourly frequency is also available, specifically for web events. However, you may wonder why this hourly frequency isn’t available for app events.

The reason for this limitation is explained in detail in the Analytics Insights manual.

Analytics Help manual

In short, Google Analytics faces delays in receiving app events, which could lead to inaccurate reports. Consequently, Google has disabled hourly custom insights for app events.

Until these delays are resolved, the availability of hourly insights for app events will remain limited. However, if you’re open to potential inaccuracies, you can fill out the form linked on the Analytics help page.

For this tutorial, let’s stick with the daily frequency. Next, we can choose to use data from all users or focus on a specific subset by defining a custom segment.

Let’s move on to changing the segment.

Changing the segment

In this step, you get to pick the dimension for your segment. You can choose from user demographics, geography, device, or platform.

Let’s go with “Country” as the dimension and select “United States” as the dimension value. Then, click “OK.”

Dimension and Value Option

If you want to narrow down your selection, you can add more specific conditions by clicking on “Add new condition.”

Adding New Condition Option

For example, if we want to choose users who use Windows as their operating system, we would select “Operating System” as the dimension, then “Windows” as the dimension value. Finally, click “Apply” to save the custom segment.

Operating System and Windows Option

Awesome! That’s how you create segments to focus on specific users.

For now, let’s stick with the “All Users” segment and move on to selecting the metric for this custom insight. You can choose any metric from the list.

Select “User engagement.” Next, we’ll set the condition. For this tutorial, choose the “Has anomaly” option.

Metric and Condition Option

You have the option to further customize the condition by choosing from other available options.

You can set a threshold value, and Analytics will alert you if the current value is below or above that threshold. You can also choose to be notified when there is a certain percentage increase, decrease, or any change compared to the previous value.

Next, you’ll need to name your custom insight.

Insight Name

Additionally, you can choose to send notifications to specific users when this insight is triggered.

Manage Notification Section

Please remember that you can only send email notifications to users who have access to this property.

This is how you can create custom insights for detecting anomalies in Google Analytics 4. With this setup, you’ll be able to spot anomalies in your standard reports.

Anomaly Detection in Google Analytics 4 Explore Section

Another method to monitor anomalies is by navigating to the Explorations section and choosing the Free form option.

Click on Explore.

GA4 Explore Option

From here, we’ll select the Blank exploration report.

New Exploration Option

Next, you can create a custom report. For instance, choose “Source / Medium” as the dimension and “Sessions” as the metric. Turn on Anomaly Detection. When enabled, the

Free report will highlight anomalies. Simply hover over the circles to view data about the anomalies.

Report Highlighting Anomalies

From there, you’ll be able to observe anomalies that happen within a specific timeframe!

Final Thoughts

In this blog, you have learned how to use anomaly detection on Google Analytics. As you’ve seen, anomaly detection can help you with various capabilities, such as predicting a spike in demand for a particular product.

This feature in GA4 is quite important, and can ensure that you know more about your users needs.

Keep working with anomaly detection to get the best out of Google Analytics 4.

Tags : ,