Google Analytics 4: From How To Get Started To Pro Tracking

Google Analytics 4: From How To Get Started To Pro Tracking

Ah, GA4. How quickly it’s arrived, right before our eyes. And if you haven’t already, it’s time to learn to embrace it – and dig into how it can help you succeed.

A lot of things get compared to learning a new language.

I’d like to add the fine art of fully grasping new platforms, or even new versions of them, to the list. It’s not enough to understand precisely how they function – we have to become fully-versed in how they make us better at our work.

That’s one reason I’m both excited about and impressed with the collection of articles. It goes beyond the simple how-to and gets down to the practical, nitty-gritty specifics of the stuff you have to do with GA4, whether it’s avoiding common configuration pitfalls, setting up A/B tests, or leveraging it to track offline conversions. (No leads left behind — amirite?)

In all seriousness, I’m eager to find out how you apply this content to your work – and other inventive ways you’ve seen GA4 leveraged to get the best marketing, SEO, and overall business results.

Analytically yours,

Amanda Zantal-Wiener
Amanda Zantal-Wiener Former Editor-In-Chief, Search Engine Journal

7 Top Tips To Become A GA4 Pro (Even If You’re A Beginner)

Discover new time-saving and advanced-level features GA4 offers that UA didn’t, key resources you may have missed and more to fast-track your GA4 learning curve.

Ginny Marvin Ginny Marvin 27K Reads
7 Top Tips To Become A GA4 Pro (Even If You’re A Beginner)

The July 1 migration deadline for Google Analytics 4 (GA4) has passed, and perhaps you’re still feeling unsteady working in the platform, still have some setup to do, or are in the Jumpstart queue.

If you’re a reluctant GA4 user or haven’t had the time to get comfortable with it, stick with me as I distill some of the key differences between Universal Analytics (UA) and GA4, highlight what’s new and improved, and share bookmark-worthy resources to amp up your expertise.

Whether you’re at an SMB, enterprise, or agency, here are seven tips to help you work faster and get more out of GA4.

1. Know Why GA4 Is So Different From Universal Analytics

This may not seem like a tip, but understanding why GA4 came to be and why it’s a departure from UA is key to learning to work with it successfully.

GA4 accounts for these two key shifts:

  • Browsing behavior that now happens across devices and platforms.
  • Privacy changes which mean less user data is observable via cookies, and more data is aggregated to protect user anonymity.

Universal Analytics was built for a time before these shifts, and its methodology was fast becoming outdated and obsolete.

GA4 is designed to measure across the web and apps via data streams.

While UA reported on individual user sessions, GA4 uses an event-based model that enables unified measurement across user journeys.

This is why dimensions and metrics naming conventions often differ and why comparing GA4 and UA reporting can be difficult.

Even if you don’t have both a website and an app, you’ll benefit from GA4 because it doesn’t rely on third-party cookies for measurement.

2. Set Up For Success

If you’ve been Jumpstarted or migrated yourself but aren’t sure you’ve completed all the steps to customize your property, consider the following.

For advertisers, be sure to confirm your Google Ads links imported, validate that your goals and conversions migrated, and that you’re bidding to the right conversions and audiences in Google Ads.

You can also quickly bring your UA events into GA4 by selecting the “Collect Universal Analytics events” in your GA4 tag settings.

This will create a single GA4 event type that records Category/Action/Label as parameters. You can confirm this works by looking at the Events section under Configure.

The GA4 Setup Assistant can help you set up your property. This tool will continue to evolve into a more personalized and comprehensive setup flow in GA4 for all users.

And be sure to check out the Setup Guide, which walks through the key steps and concepts for setting up a robust GA4 property for your business, including critical steps for advertisers.

3. Get Your Bearings Before You Dive In

Perhaps like you, my first encounters with GA4 were…uncomfortable, to say the least.

That is until I spent some time learning and took the Skillshop courses, which provided a solid overview of the foundational concepts and structure of GA4.

Whether you’re a beginner or have been working in GA4 for a while, here’s a roundup of Google resources that can help you work faster and smarter:

  • Skillshop: If you’re feeling at all uneasy in GA4, I highly recommend starting with the Skillshop modules to understand the key concepts and account structures in GA4.
  • Analytics for beginners & SMBs: If you’re new to Analytics, this is a helpful next stop. It walks through setup, reporting, and more.
  • Analytics for marketers & analysts: This is a guide for those with more digital marketing experience and goes into some advanced capabilities.
  • Mini Guides: Bookmark this page for a quick entry point to dive deeper into each aspect of GA4.
  • Metrics: GA4 vs. UA: One of the bigger hurdles to becoming comfortable in GA4 is knowing the metrics and how they do and don’t compare to UA. This handy comparison cheat sheet is a headache stopper.
  • Reporting comparison: This table shows what data is and isn’t available in reports, explorations, the Google Analytics Data API, and BigQuery Export.

For more, check out the new learning hub at google.com/analytics/learn with customized learning paths, videos, a link to join the Google Analytics community Discord, and more.

Coming soon: You’ll be able to get help finding the info you need right in the UI with a brief page description and valuable actions you can take.

A new help panel will be available on most pages in GA4 by clicking the light bulb icon in the upper right corner.A new help panel will be available on most pages in GA4 by clicking the light bulb icon in the upper right corner.

4. Master The Features GA4 Offers That UA Didn’t

There are several new and improved features in GA4 to give you more in-depth insights, more audience capabilities, and save you time.

Here’s a rundown of some of the new and improved features in GA4 designed to help novice and advanced users alike get the insights they need.

These (SMB-friendly) Features Are New For GA4

Business Objectives

Now when you specify your business objective, that signal is used to automatically surface a tailored set of reports relevant to your goal, such as lead generation, online sales, and brand awareness.

You can also find the Business objectives collection in the report Library at any time and add some or all of those reports to your property.

Customized Home Page

While UA showed the same data points to everyone, the new GA4 home page leverages product usage and user signals to customize the experience for you.

Analytics Intelligence

This set of features uses machine learning and rules you set to surface automated and custom analytics insights in several places in GA4 to notify you of any significant changes or emerging trends in your data.

Fun Tip: You can type navigational or insights questions directly in the Search bar.

Or if you click on it, you’ll see “Ask Analytics Intelligence” suggestions at the bottom, and clicking “More suggestions” will bring up a whole sidebar of questions to get a range of insights in a flash.

Enhanced Event Measurement

No coding required!

With enhanced measurement, you can enable events directly in the GA4 interface to measure interactions with your content, such as form interactions, downloads, and video engagement page scrolls.

Cross-device/Platform Audiences

Because GA4 is built for cross-device measurement, it captures and unifies more touch points across the user journey – and can use this data to enhance your advertising audiences.

Predictive Audiences

In UA, Audiences were assembled only based on past behavior without inferences. GA4 uses AI to build predictive audiences, such as users predicted to make a purchase in the next seven days.

Note that predictive analytics models do require sufficient data, and you can learn more about predictive metrics and eligibility requirements here.

Analytics Audience Builder In Google Ads

In UA, you could create Audiences and import them into Ads, but with GA4, you can create regular and predictive audiences in Ads when you link the accounts.

There’s no need to change accounts to leverage audiences in both products.

These Improvements Bring More Advanced Capabilities To GA4

User-ID

In UA, User-ID was used only in special views and reports. In GA4, User-ID is used throughout reporting to give you the most accurate, user-centric view of customer behavior and journeys.

Explorations

Previously only available in UA 360, explorations (accessible from Explore in the left-hand navigation) let you dive deeper than the standard reports to better understand customer behavior and your key business metrics.

Custom Funnel Reports

Previously only available in UA 360, custom funnels allow you to see the steps users take to complete a task and evaluate how many users drop off between each step on your website and/or app.

You can save funnel explorations to the report Library for quick reference.

BigQuery export

Previously only available in UA 360, the BigQuery event export is now available to all GA4 users.

You can include specific data streams and exclude specific events for each property to control the export volume and BigQuery costs.

GMP Integrations

Previously only available in UA 360, now you can integrate DV360, Ad Manager, and other Google Marketing Platform products with GA4.

App ecosystem integrations

Deep integrations with Firebase, Play, App Campaigns, AdMob, and Ad Manager in GA4 can give you a clearer understanding of user behavior and monetization in your apps.

5. Customize Without Code

A huge plus for resource-strapped businesses is the ability to create and modify events in GA4 without having to make any coding changes.

With the Google tag implemented, you can easily create and edit events in GA4. This Help Center page has more details, examples, and video tutorials.

GA4 can go beyond Category, Action, Label, Page Views, and Sessions and collect dozens of standard events and any events you customize yourself.

This high level of customization makes GA4 incredibly versatile.

For example, with the report builder, you can create reports that visualize virtually any combination of dimensions and metrics available.

You can then assign filters to reports so that teams in different regions or business units can get insights tailored to their needs.

6. Take Full Advantage Of Ads Integrations

For advertisers, GA4 offers a much more robust audience builder than UA.

To take full advantage of the audience-building capabilities in GA4, you need to link your Google Ads, Display & Video 360, or Search Ads 360 accounts to your Analytics property and enable personalized advertising.

You can then automatically capture, share, and activate tailored audiences in your campaigns.

Importing your conversions from GA4 can also provide important feedback to your campaigns and improve automated bidding performance.

Note that you can exclude events or user-scoped custom dimensions from being used for ads personalization in the GA4 interface if desired – no coding is needed.

The audiences you define are pre-populated based on the last 30 days of data and evaluated on an ongoing basis.

7. Understand Reporting Identity And Data Thresholding

I see a lot of questions (and frustration) about data thresholds in GA4 reporting.

We’ve established that privacy is a core tenet of GA4, which is why you may see data thresholds, depending on the data you’re reporting.

Let’s dig into this a bit.

GA4 can use four identity methods to unify user touchpoints across devices and platforms into a single user journey: User-ID, Google signals, Device-ID, and Modeling.

We’ll get into some more details below, but this is a helpful overview of Reporting Identity to refer back to later.

There are three reporting identity options:

  • Blended, which runs through each of the four methods, in the order above, to identify users.
  • Observed, which evaluates the first three identity methods but not behavior modeling.
  • Device-based, which, you guessed it, only uses device ID.

If you’re using either the Blended or Observed option with Google Signals enabled, your reports will be subject to data thresholds to protect your users’ anonymity.

An orange triangle icon in the top right corner of a reporting card indicates that thresholding has been applied and that data will only show when the minimum aggregation thresholds have been met.

Two Key Things To Note About Google Signals And Data Thresholding In GA4

  • You can switch reporting identity options at any time without impacting data collection or processing. That means you can keep Google Signals on for ads remarketing purposes and opt to see what reports reflect when you select Device-based, for example, which isn’t subject to data thresholds in reports with user counts. And then switch back any time!
  • Google signals data is also not exported to BigQuery. This is why you may see different user counts and event counts per user in BigQuery versus Analytics.

More New Features And Enhancements To Come

GA4 was built for a new era and will continue to evolve.

While it’s highly customizable, features like automated insights, more default reports, and the new personalized Home page are designed to help make GA4 more intuitive and useful.

Stay tuned for even more updates, particularly in the Advertiser Workspace, and more customization features for SMB customers.

And as you work more in GA4, you’re bound to have your own top tips to add to this list!

More resources: 


Featured Image: slyellow/Shutterstock

7 Common Google Analytics 4 Configuration Mistakes To Avoid

Failing to regularly monitor and analyze your data can lead to missed opportunities and make it difficult to identify and address issues on time.

Vahan Petrosyan Vahan Petrosyan 16K Reads
7 Common Google Analytics 4 Configuration Mistakes To Avoid

If you had a chance to read previous guides we’ve published on Google Analytics 4 (GA4), you probably know that it is not a plug-and-play analytics tool like Universal Analytics was.

There is a lot of information one needs to absorb in order to be able to set up GA4 properly, and time is ticking.

UA sunset countdownScreenshot from Google, May 2023

With GA4 being a more complex tool, it’s easy to make mistakes that can hinder the accuracy and reliability of the data collected.

In this article, we will explore five common Google Analytics 4 mistakes that can easily happen and provide practical tips to avoid them.

1. Not Setting Data Retention Period

GA4 comes with a two-month data retention period by default, and you have the option to set it to 14 months. The retention period is applied to custom reports in explorations, whereas data in the standard reports never expire.

Once the retention period has passed, data will be automatically deleted – which means if you don’t change that setting as you set up GA4, you will not be able to run YoY custom reports and will lose valuable historical data.

In order to change the retention period, navigate to Data Settings > Date Retention, and in the dropdown, choose 14 months.

Retention settingRetention setting.

You will also notice a checkbox reading “Reset user data on new activity,” which means the 14-month data retention period is counted from the moment of the user’s last visit onwards.

In other words, each time a user engages in a new activity, their data retention period gets extended for another 14 months.

Honestly, I can’t think of a use case when you would choose to turn that option off, so I keep it switched on.

2. Dimensions With High Cardinality

High-cardinality dimensions are dimensions that contain more than 500 unique values within a single day. This can present challenges and limitations in data analysis within GA4.

Cardinality in GA4 can negatively affect data accuracy and reliability.

For example, when you track the exact word count as a custom dimension on every article page, you may end up having high cardinality if you have thousands of articles because the word count can be different for every article.

How To Fix High Cardinality

To mitigate the impact of high cardinality in GA4, consider creating a bucket of values.

With the example above of word count custom dimension, it really doesn’t matter that much whether the article will have 500 or 501 words. You can bucket values into ranges like:

  • <500.
  • 500-1000.
  • 1001-1500.
  • 1501-2000.
  • +2000.

And instead of pushing too many distinct values, you will have only five different dimensions.

Also, as a best practice, always define custom dimensions wisely.

Ensure that custom dimensions align with your analysis objectives and consider their potential impact on data accuracy and resource consumption.

3. Not Linking To BigQuery Account

Linking to BigQuery was available in Universal Analytics 360 but not in the free version. With GA4 now, all users have access to that premium feature.

Since it is exporting data to BigQuery from the moment you connect, it’s important to set it up at the beginning in order to have as much historical data as possible.

BigQuery has a big advantage over GA4 custom reports as data is never sampled, whereas in custom reports, data will be sampled if there are more than 10M events in the exploration report.

In order to link GA4 to BigQuery, navigate to BigQuery Links in your GA4 settings.

In order to complete linking to BigQuery, you would need to create a BigQuery project which will require you to enter your billing information.

It is freemium, and 10 GB is free each month; it will charge you $0.02 per GB if you exceed that number.

4. Failing To Set Up Custom Audiences

GA4 has powerful audience-building capabilities you can read more about in our guide on how to create segments and audiences.

With GA4 audiences, you can analyze specific data segments, empowering you to derive valuable insights. For instance, you can create target audiences such as engaged users, subscribed users, or users who made a purchase in the past 30 days.

It is advisable to create audiences for your ICP and mark it as a conversion.

Since audience dates are not retroactive, it is important to define your target audiences at the beginning of setup in order to gather historical data.

5. Using Auto Migration From Universal Analytics

GA4 is a totally different beast compared to UA, with a different data model.

Even though it offers the option to automatically collect Universal Analytics events, it is better not to use that, as it is a chance to rethink your analytics and design your event collection architecture anew for better analytics.

Collect Universal Analytics EventsCollect Universal Analytics events.

6. Not Excluding Unwanted Referrals

Often ecommerce websites have third-party payment processors which are hosted under different domains – and when redirecting them back to the website after the user completes a checkout, GA will detect it as a new session because the referral is different.

In order to avoid that and not distort your conversions data, you need to exclude such domains from referrals so GA doesn’t initiate a new session.

At SEJ, for example, we have the short link “sejr.nl” domain, which should be treated as the same domain – so we added it to our exclusion list.

Also, if you have subdomains and want to track across subdomains using the same GA4 property, you need to exclude your own domain from referrals in order to keep the same session when users navigate from one subdomain to your main domain.

7. Not Choosing The Right Reporting Identity

The following reporting identity options are available in GA4:

  • Blended.
  • Observed.
  • Device-based.

Reporting identity optionReporting identity option.

The good news is you can switch back and forth between these options anytime, and it will reflect in your custom exploration reports.

But I would like to mention why it’s important to choose the right option according to your business case.

If you don’t have login and user IDs on your website, 99% of cases should go with “device-based,” because the other two options may distort your conversions data.

The reason is the user’s privacy. With Google signals enabled, GA uses user IDs to track users across devices, then matches them if they are logged in to their Google service accounts on different devices – and there is a chance that user identity may be exposed.

In such cases, it hides user data from the reports and models data based on user behavior. Modeling of data can introduce some level of inaccuracy because it’s an estimation rather than an exact measurement.

With modeled and observed options, you will often notice “Data thresholds are applied” in your reports which have implications for data accuracy.

Treasholding appliedThresholding applied.

You may try switching between these options and see how your data is changing.

If you notice a significant difference in the number of conversions between blended, observed identities, and device-based, it may be preferable to use the latter option.

Device-based identity works similarly to how Universal Analytics tracking works.

Conclusion

In conclusion, it is crucial to avoid common configuration mistakes when setting up Google Analytics 4 to ensure accurate and reliable data collection.

By understanding these potential pitfalls and taking the necessary measures, you can make the most of GA4’s capabilities and derive meaningful insights for your website or application.

Additionally, GA4 requires ongoing maintenance rather than a one-time setup.

Failing to regularly monitor and analyze your data can lead to missed opportunities and make it difficult to identify and address issues on time.

More resources:


Featured Image: Cast Of Thousands/Shutterstock

Google Analytics 4 Event Tracking: How To Get Set Up

This guide is here to help you with the migration of your custom events, with a step-by-step on how to set up GA4 custom events.

Vahan Petrosyan Vahan Petrosyan 20K Reads
Google Analytics 4 Event Tracking: How To Get Set Up

Universal Analytics is being sunset, and everyone is rushing to migrate from UA to Google Analytics 4 (GA4).

In this guide, we’ll help you migrate your custom events and walk you through how to set up GA4 custom events.

Types Of Events That GA4 Automatically Tracks By Default

Google Analytics 4 automatically tracks several events by default, without any additional configuration. Some of these events relevant to web property tracking include:

  • click.
  • file_download.
  • form_start.
  • form_submit.
  • page_view.
  • scroll.
  • session_start.
  • user_engagement.
  • video_complete.
  • video_progress.
  • video_start.
  • view_search_results.

It also collects the following parameters by default:

  • page_location.
  • page_referrer.
  • page_title.
  • screen_resolution.
  • language.

But in most cases, it is not enough for comprehensive tracking, and here is where custom event tracking comes into help.

Let’s look at how to set up custom event tracking in GA4.

How Does Google Analytics Event Tracking Work?

When you perform an action on a website or in the app, GA4 sends requests with detailed information about your activity, called events (formerly “hits” in Universal Analytics).

After receiving those requests, GA4 processes the submitted data, aggregating and organizing it to generate meaningful reports and insights.

How To Set up Custom Event Tracking Manually In GA4

First, I would like to share one of the most powerful sides of GA4: You can create custom events by using other events which meet certain criteria.

Navigate to Events in GA4 and click the Create Event blue button in the top right corner.

Create eventScreenshot from GA4, April 2023

In the popup dialog, click Create.

In the dialog, you can set criteria for when your new custom event should fire.

Here, we created a “newsletter_sign_up” event on the page_view event when the page_location parameter contains “newsletter-confirmation” in the URL (as you read above, GA4 tracks these by default).

Based on your newsletter thank you page URL specifics, it can be different.

Create custom eventScreenshot from GA4, April 2023

And what is even cooler: you can turn that event into a conversion and track sign-ups as conversions.

Pretty easy, isn’t it? This is one of the wonders GA4 brings with it; no coding skills are needed to make this magic happen.

You can use this feature in a bunch of different scenarios. But if you run into a situation where this is still not enough to meet your needs, you might need to set up events with custom parameters.

Below we will discuss advanced techniques for setting up custom events.

How To Set Up Custom Event Tracking With Custom Parameters In GA4

In Universal Analytics, there are four parameters for events you can track, and there is no option to add more parameters:

  • Event Category.
  • Event Action.
  • Event Label.
  • Event Value.

In GA4, there is no longer such a structure, but it comes with more flexibility, as you can define as many event parameters as you want.

The advantage is that you get highly customized event tracking with lots of data, but the downside is that it’s no longer a plug-in-and-play like UA.

Configuring custom event tracking in Google Analytics 4 (GA4) requires several steps.

In order to track events with custom parameters in GA4, you have to start by adding custom dimensions, and there are two ways of doing that: gtag and GTM-based.

First, we’ll discuss gtag-based implementation. If you prefer GTM-based, you can skip this first section and read that part below.

For implementation, follow the step-by-step guide below.

How To Add Custom Dimension In GA4

Navigate to Admin > Property > Custom definitions.

Custom definitions in GA4Screenshot from GA4, April 2023

Click the Create custom dimensions blue button and create an event-scoped custom dimension by entering the dimension name and event parameter.

Event scoped custom dimensionScreenshot from GA4, April 2023

For our guide, let’s start with custom events tracking analogical to Universal Analytics with custom parameters.

  • Event Category.
  • Event Action.
  • Event Label.

Suppose you want to track clicks on your main navigation menu.

In this case, you could set the Event Category to Menu Clicks, the Event Action to the anchor link, and the Event Label to the anchor text.

An example use case for this setup is to change the anchor text of menu items and track which ones attract more clicks, allowing you to optimize your navigation menu for better user engagement and conversion rates.

Per GA4 documentation, you should trigger a gtag event when one clicks on your menu items (we assume links are inside the <li> html tag, which have .menu-item class).  You can see the example code below.

<script>
document.addEventListener('DOMContentLoaded', function() {
  var menu_anchors = document.querySelectorAll('.menu-items a');
  //Click event listener to each anchor element
   menu_anchors.forEach((anchor) => {
   anchor.addEventListener('click', (event) => {
    gtag('event', 'menu_clicks', {
       'event_category': 'Menu Clicks',
       'event_action': anchor.href,
       'event_label': anchor.textContent
    });
   });
  });
});
</script>

The event name “menu_clicks” can be anything you want, and it will have three parameters you provide. This is one approach if you don’t have Google Tag Manager and prefer gtag implementation.

You can use custom parameters to pass additional values to predefined events, for example, sign_up event. Per GA’s documentation, it supports only one parameter called “method” ( which can be anything, e.g., social login, email, etc. )

gtag("event", "sign_up", {
method: "Google"
});

By adding custom dimensions, you can also pass additional information such as sign-up subscription plan (for example, “free trial,” “basic,” “premium.”)

You can add custom dimension”sign_up_plan” and pass along with “method.”

gtag("event", "sign_up", {
method: "Google",
sign_up_plan: "basic",
});

To implement all these, you need basic JS programmer skills, which you can quickly learn by using ChatGPT. You can now test the prompt:

JavaScript code that triggers a gtag custom event with the name ‘menu_clicks’ when a user clicks on a menu item with a parent li tag that has class ‘.menu-item’. Pass the following custom event parameters: ‘event_category’ should be set to ‘Menu Clicks’, ‘event_action’ should be set to the link of the clicked item, and ‘event_label’ should be set to the anchor text of the clicked item.

Try this prompt, and you will see the magic happening.

You can copy and paste that code into your CMS code editor, and voila!

Now, let’s set up the same event tracking using the GTM tag.

I assume you’ve already installed GA4 via Google Tag Manager and will proceed with the steps from there.

You would need to add custom dimensions per the steps explained in the section above.

How To Set Up Event Tracking In Google Tag Manager

Create a new a new JavaScript variable in GTM that returns clicked anchor’s parent tag class name – because, in GTM, there is no built-in way to get parent DOM element attributes.

Navigate to Variables > User-Defined Variables and click the New button on the top right corner. In the popup dialog, select Custom Javascript.

Custom javascript variable in GTMScreenshot from GA4, April 2023

Copy and paste this code into it.

function() {
 'use strict';
 try {
       var clickElement = {{Click Element}}; // clickable element DOM object
       var clickParent = clickElement.closest('.menu-item'); //clickable element DOM object parent with class .menu-item
       if (!clickParent) return ''; 
       return clickParent.getAttribute('class'); // if element exist return class attribute
 } catch (err) {
       return '';
 }
}

Custom JavaScript variable which returns class name of parent tagScreenshot from GA4, April 2023

This code returns the parent class attribute of a clicked element when there is a parent with class ‘.menu-item’, or it returns an empty value if there is no such parent element.

We can use this to ensure that we only detect clicks on menu item links, not other links elsewhere on the page.

Create a new trigger in GTM that fires on all clicks on elements with a parent <li> that has class of “menu-item”.

Navigate to Triggers and click the New button in the top right corner.

From the popup dialog, select Click – Just Links.

Add new click event GTM dialogScreenshot from GA4, April 2023
Add new click event GTM dialog

Choose Some Link Clicks > Configure it to fire on clicks where the parent element class contains the string “menu-item.”

Some Link ClicksScreenshot from GA4, April 2023

Navigate to Tags and add the GA4 Event tag.

Choose tag typeScreenshot from GA4, April 2023

Fill in as event name “main_menu_clicks” or whatever you want to name the event, and add custom parameters event_category, event_action, and event_label.

GA4 - Menu ClickScreenshot from GA4, April 2023

For event action and label, choose Click Text and Click URL build-in variables.

Choose a serviceScreenshot from GA4, April 2023

Choose the trigger of Menu Clicks we created before, and save the tag.

Add triggerScreenshot from GA4, April 2023

Publish changes and debug to ensure when you click on your menu items, the event is triggering with all parameters set correctly.

GTM preview modeScreenshot from GA4, April 2023

How To Implement Custom Event Tracking By Using dataLayer.push() Method

If you still prefer custom coding and have GTM, you can use the datalayer.push() method.

In that case, you would need to add event_category, event_action, and event_label parameters in GTM as dataLayer variables.

GTM datalayer variableScreenshot from GA4, April 2023

And on your website <head> section, you should use the code below.

<script>
//Click event listener to menu items with the '.menu-item' class
document.addEventListener('DOMContentLoaded', function() {
    const menuItems = document.querySelectorAll('.menu-item');
    menuItems.forEach(function(menuItem) {
    menuItem.addEventListener('click', function(event) {
    //Link and anchor text of the clicked link
    let link = menuItem.querySelector('a').href;
    let anchorText = menuItem.querySelector('a').textContent;
    // Trigger the custom event 'menu_clicks' using dataLayer.push()
    dataLayer.push({
      'event': 'menu_clicks',
      'event_category': 'Menu Clicks',
      'event_action': link,
      'event_label': anchorText
    });
  });
 });
});
</script>

How Do I Know If Google Analytics Event Tracking Is Working?

It is also important to check if you see an event log with the same parameters in GA4 debug view. It may happen that GTM will fire, but because of misconfiguration, it will not be passed to GA4.

GA4 debug viewScreenshot from GA4, April 2023

In case you have gtag implementation, you should enable debug mode by installing the Chrome extension or by adding one line of code to your GA4 configuration.

gtag('config', 'G-12345ABCDE', { 'debug_mode':true });

Always debug and make sure that all custom parameters pass as expected.

Conclusion

GA4 is quite challenging and not a plug-and-play analytics tool like Universal Analytics; you need to spend a good amount of time learning it.

On the other hand, it comes with plenty of new features you can use and enhance your analytics to an unprecedented level.

By being able to customize the event tracking, you get a powerful skill that even can help you work around some of the attribution models that Google Analytics is sunsetting by tracking users’ first visit source in a custom dimension.

With this in mind, I will be publishing a step-by-step guide on how to (partially) restore the first attribution model using custom event parameters.

More resources:


Featured Image: Andrey_Popov/Shutterstock

A Step-By-Step Guide To Creating Segments And Audiences In GA4 With Examples

Discover new ways to perform behavioral analysis with the help of Google Analytics 4. Here's your step by step guide to unlock them.

Vahan Petrosyan Vahan Petrosyan 17K Reads
A Step-By-Step Guide To Creating Segments And Audiences In GA4 With Examples

Google Analytics 4 (GA4) comes with a more flexible audience builder and offers more advanced audience creation capabilities than Universal Analytics (UA).

GA4 also takes a different approach to measuring screen views compared to Universal Analytics.

Instead of measuring screen views in separate properties for mobile and web, GA4 combines data from both web and app views into a single property.

This means that audiences can be created based on a user’s entire journey across multiple devices, which makes it possible to create more complete user profiles.

What Are Audiences?

Audiences refer to subgroups of users that can be used for both analysis and advertising purposes.

These groups can be created based on a variety of factors, including dimensions, page views, user properties, and events (or their sequences) that are relevant to your business.

It’s important to note that, as new user data is continuously collected in GA4, audiences are automatically re-evaluated.

What Are Segments?

Segments refer to a part of data that meets certain criteria and can be analyzed separately from the rest of the data.

Rather than analyzing data from all visitors, segments allow you to separate specific groups of users and compare their behavior to the rest of the data.

For example, you can compare the behavior of users from the United States to the behavior of all users, or mobile users to desktop users, and get deeper insights.

Segments Vs. Audiences

When you create a segment, you can choose to build an audience based on a segment – but these two features are different. You can’t use segments in standard reports, but you can use audiences.

Segments are available only in exploration reports, while audiences are not.

Audiences can be used in Google Ads remarketing campaigns, but segments can’t.

Most importantly, segments are retroactive, but audiences aren’t, as audiences start collecting information from the moment of creation.

How To Create Segments

In GA4, navigate to Explorations > Create a New Exploration.

There are three types of segments you can create:

  • User segment: Includes all events associated with users who satisfy a specific set of criteria.
  • Sessions segment: Includes all events associated with those sessions that match the set of criteria.
  • Event segment: Includes only specific events that meet a set of criteria.

Let’s dive into how each type of segment works with a simplified model.

Let’s say the user who visited the website performed the following actions during the first session:

  • Page view.
  • Submitted form.
  • Watched a video.

On the second session the next day, the same user performed these actions:

  • Page view.
  • Page view.
  • Watched a video.
  • Clicked.

If we create a user segment with the condition that the user submitted a form, it will contain data from both sessions because we tell GA4 to include all data that belongs to that user.

If we build the sessions segment with the condition that during the session, the user submitted a form, it will contain only data from the first session because we told GA4 to contain data only from sessions where one has submitted a form.

If we build a session segment of when someone watched a video, it will have data from both sessions because the user watched a video during both sessions.

And finally, if we create an event segment for times when the user clicked a link, it will contain only click event data from the second session.

While it may seem like a lot of information and hard to swallow, don’t worry; you will gradually understand all of these as you start using it.

Now, let’s dive into the segment builder UI of GA4, which is the same one we will be using for building audiences.

Get To Know Segment Builder UI In GA4

Here are some of the features to know about within segment builder:

  • OR/AND conditional logic operators can be used to apply multiple criteria at the same time in the groups.
  • Sequence is available only in user segments and can’t be configured for session or event segments. You can use it to know how many users subscribe after visiting your home page.
  • You can apply time constraints to your sequential segments. An example use case would be to know how many users visit your subscribe page and sign up within five minutes, or how many users visit your product page and add it to the cart within five minutes.
  • By checking the “Build Audience” checkbox, you can create an audience from that segment too.
  • “Exclusion group” is a valuable tool that allows you to refine your segment or audience by excluding specific users. For instance, you can create an audience comprising individuals who clicked the ‘Add to cart’ button but exclude those who have already made a purchase. This enables you to develop a targeted audience for your remarketing campaign in Google Ads, specifically catering to those who expressed interest in your product but didn’t complete the purchase.
  • Group level scoping: 1. across all sessions, and 2. within the same session within the same event. Which applies to all conditions in the group. Please note that you can apply specific sequence level scoping “across all sessions” and “within the same session.” Note that “across all sessions” scoping is available only in user segments.

Now, let’s explore a few examples of each type of segment so we can understand how they work.

Example Of A User Segment

At SEJ, we have sign-ups, and we are interested in how long it takes a user to sign up for our newsletter after landing on our article pages.

For that, we should build a segment of users who signed up for our newsletter, which is directly followed by a page_view event within 10 minutes.

For that, we choose “first_visit” as an event.

If you want to apply a time constraint to a specific step, you can utilize the time constraint option within the sequence. However, in our case, we have chosen a sequence global time constraint, which means that it applies to all steps within the sequence.

What we’ve found from this segment is that 478 out of 1302 subscribers (37%) subscribe within 10 minutes when they visit the article page.

If you have a shop, you can build a segment of those who purchase within a day after visiting a product page.

There are an infinite number of possibilities for how you can use this, and I would like to emphasize the fact that the new segment or audience builder of GA4 is very flexible and powerful compared to Universal Analytics.

Unfortunately, as you build a segment you can’t share it across explorations, and you need to create it again. There is a workaround you can apply to duplicate exploration if you need the same segment.

Basically, you can create an empty exploration with all the segments you might need. Then, whenever you need a new report, you can duplicate the exploration and utilize the segments within the copied version to avoid creating them each time.

Here are a few ideas of segments you may need to use for a users segment:

  • User Acquisition: Understand user behavior from different acquisition channels (organic search, paid ads, social media, email marketing).
  • Cohort Analysis: Compare engagement, retention, and conversion rates between new and returning users.
  • Customer Lifetime Value (CLTV): Identify high-value users based on revenue, order value, and purchase frequency.
  • Demographic Analysis: Segment users by age, gender, location, or interests to personalize marketing strategies.
  • Churn Analysis: Identify and re-engage users who have churned via remarketing campaigns.

Example Of A Session Segment

While user segments are valuable for analyzing long-term behavior and user characteristics, session segments provide a more focused and contextual analysis of user interactions within a single session.

Sessions segments are the best choice for content engagement analysis type of reports. By using session segments, you can analyze how users engage with different types of content on your website or understand user behavior based on referral sources.

Session segmentScreenshot from GA4, May 2023

In the sessions segment, everything is the same, but it no longer has:

  • “Across all sessions” scope.
  • Sequences.
  • Time constraints.

Let’s build a segment of users who arrived at our website from social.

Sessions segment of social trafficSessions segment of social traffic.

Note that I used “session source” equal to “social” with condition OR of page referrer with regexp match.

.*(?:facebook\.com|instagram\.com|twitter\.com|linkedin\.com|pinterest\.com|youtube\.com|t\.co|lnkd\.in).*

Here are a few ideas for how you can use session segments vs. users:

  • Content Engagement: Analyze sessions where users interacted with specific content types.
  • Campaign Performance: Evaluate sessions that originated from specific marketing campaigns or channels to understand how effective your marketing efforts are.
  • Feature Engagement: Detect sessions where users actively engage with specific features on your website, such as adding items to a wishlist, using a live chat, etc.
  • Conversion Funnels: Analyze sessions that progress through key steps of your conversion funnel, from initial engagement to goal completion, helping you optimize the user journey.

Example Of An Event Segment

Event segments are subsets of events triggered on your website or app.

With users and session segments, you may already feel you have all that you need, so why would you need event segments? Well, event segments provide a more targeted and specific analysis compared to session-based or user-based segments.

They allow you to look into specific actions users perform on your website and optimize the user experience.

As an example of how they can be used, let’s create a scroll depth event segment. By analyzing users who reach certain scroll depth thresholds, you can identify engaging pages, optimize content layout, and improve overall user engagement.

Event segment of scroll depth 50%Event segment of scroll depth 50%.

In our example, we want to see data from users who scrolled 50% of the page and noticed from scoping that only “within the same event” was left.

The granular scroll depth tracking we have requires a custom setup which we will cover in the next guides. On your end, if you don’t have it set up you can just use the  “scroll” event without the custom parameter “percent_scrolled.”

Here are ideas on when you can use events segments vs. users and session segments.

  • Clicks Events: Create a segment based on click events, such as “Add to Cart” or “Submit Form.” This allows you to analyze sessions or users who actively engage with your calls to action and measure the effectiveness of specific call-to-action buttons.
  • Video Engagement: You can build a segment based on events, such as “video_start,” “video_progress,” or “video_complete.” This segment allows you to analyze sessions or users who engage with video content on your site or app.
  • Custom Interactions: Set up custom event tracking to create segments based on specific interactions relevant to your business, such as social media shares or error tracking, to help you identify and analyze sessions or users who encountered issues.
  • Error Tracking: Create a segment based on error events, such as form validation errors, broken links, or server-side errors. The advantage: event segments focused on errors help you identify and analyze sessions or users who encountered issues, enabling you to improve error handling, fix broken elements, and enhance overall website or app functionality.
  • Interaction with Dynamic Content. Analyze sessions or users who interacted with dynamically loaded or personalized content elements, e.g., image carousels, related articles, or personalized offers.

As we learned how to use segment builder in UI, we can create an audience easily.

How To Create Audiences

The easiest method is to create audiences right from segments by checking the checkbox to build an audience.

Alternatively, you can access it under the Property menu.

AudienceAudience.

As an example, we will build a user audience of those who abandoned sign-up form submissions in order to target them via Google Ads remarketing campaigns.

We used the event “form_start” but excluded those who submitted a form.

Let’s dive into a few new options you have in audience builder.

What Is Membership Duration Setting?

It is the period of time that a user remains a member of an audience after they meet the criteria for inclusion. It allows you to define how long a user should stay in the audience before being automatically removed.

Based on your remarketing campaign’s needs, you may need to set it to different values.

For example, you may want to build an audience of users who were interested in your product in the last 15 days and advertise to them.

What Is Audience Trigger?

Audience trigger is a new feature in GA4 that lets you trigger a custom event when a new user enters into an audience. It allows you to build user acquisition conversion by marking the event as a conversion.

You can build an audience persona by a number of conditions – for example, users who read three articles on the topic of “Marketing” – name it “Marketers,” and trigger the custom event “marketer_acquisition.”

As you run certain campaigns to bring traffic to your blog, you can use marketer_acquisition conversion as a KPI to measure how effective your campaign was in attracting relevant traffic to your website.

The checkbox “Log an additional event when audience membership refreshes” is self-explanatory, and it is up to you to decide.

This may be useful for e-commerce, as when we have users who are interested in a product in the last 15 days and removed from the audience as time elapses, you may want to retrigger it when they return and are interested again, say, 30 days later.

Conclusion

With all the challenges GA4 brings, it also has big advantages you can use.

Audience-based conversions are vital KPIs for publishers to know whether they are attracting an Ideal Customer Profile (ICP) audience, or just random visitors.

In Universal Analytics, this wasn’t available – but with GA4, it is.

Also, time-based constraints let you build segments and open new ways to perform behavioral analysis. For example, you can create a segment of users who made a purchase within the last month.

This helps you focus on recent user interactions and understand current behavior patterns.

More resources:


Featured Image: Vitalii Vodolazskyi/Shutterstock

Offline & Phone Conversion Tracking: How To Configure GA4 For Calls That Lead To Conversions

Learn to thoroughly monitor how consumers move through your sales funnel, empowering you to adjust and improve your customer experience.

CallRail CallRail 10K Reads
Offline & Phone Conversion Tracking: How To Configure GA4 For Calls That Lead To Conversions

This post was sponsored by CallRail. The opinions expressed in this article are the sponsor’s own.

How do you make sure your online marketing is contributing to in-person sales?

Are you ready to start tracking your offline conversions for a more comprehensive look at your marketing campaign results?

What happens when a customer follows an online lead but doesn’t actually complete the transaction until they’re offline?

Sales that take place in real life are more difficult to track without an effective offline conversion tracking process.

You probably know this already, but the most common form of offline conversions is phone calls.

Who Needs To Set Up Online Conversion Tracking For GA4?

If you or your clients have brick-and-mortar stores and locations, offline conversion tracking tools are essential for successful marketing campaigns.

Offline conversion tracking allows you to thoroughly monitor how consumers are moving through your sales funnel, giving you the power to adjust and improve your customer experience.

So, let’s learn innovative ways to get the most information from your calls.

You Can Get Lead Generation Insights By Tracking Phone Calls

With advanced call tracking, you can gain Google Analytics 4 call insights such as:

  • How long did a lead speak to a rep?
  • Was the call answered or not?
  • Did the rep mark the lead as qualified?
  • Was the lead tagged as interested in a particular product or service line?

From there, you can:

  • Dive into detailed call insights: CallRailʼs AI-powered call analytics transcribes and records all customer conversations, and it automatically classifies and qualifies callers.
  • Fine-tune your ads approach: Link each caller to the piece of marketing that drove them to your clientʼs business, helping to identify top-performing strategies. Use conversational data to discover potential new keywords for future campaigns.
  • Track all inbound calls: Analyze all of your client’s phone calls, not just those that came from ad clicks.

Tracking phone call conversions, the primary source of inquiries to a business, helps you understand where the majority of your high-intent customers are coming from.

Now, you’ll be able to double down on PPC and SEO campaigns that are truly bringing in customers.

Although phone inquiries usually represent high-intent prospects, it can be difficult to know which marketing channel drove a particular lead to call your business – that’s where Google Analytics 4 comes in.

Does Google Analytics 4 Attribute Call Conversions & Data By Default?

No. Googleʼs native call tracking doesn’t effectively attribute nor analyze calls.

Right out of the gate, GA4 only tracks the following conversion events:

  • purchase (web and app).
  • first_open (app only).
  • in_app_purchase (app only).
  • app_store_subscription_convert (app only).
  • app_store_subscription_renew (app only).

To properly attribute phone calls within GA4, you may need to manually create custom conversion events.

Also, even though GA4 has the ability to track clicks on a phone number, they still miss out on a large percentage of calls where users type the numbers directly into their phones.

How Can I Track Advanced Phone Call Analytics In Google Analytics 4?

Since GA4 does not effectively track phone calls, implementing Call Tracking by CallRail into your Google Analytics strategy can help you gain more actionable marketing insights than using Google Analytics 4 alone.

CallRail integrates seamlessly with GA4 to enhance your call-tracking process.

Step-By-Step Guide To Creating Call Tracking Conversion Events In Google Analytics 4

CallRail’s full guide to Google Analytics 4 lays out how to set up your goals (now known as “conversions”) in GA4.

Here are the quick details.

To manually mark an event as a conversion in GA4, you can configure the event in two ways:

  • Track an existing event as a conversion.
  • Create a new conversion event from the event name.

To start tracking an existing event as a conversion:

  • In the left navigation, click Admin > Events.
  • Locate the event in the Existing events table.
  • In the event’s “Mark as conversion” column, click to turn the switch on. If you have CallRail you will see conversions under the following names: phone_call, form, chat, sms.

To create a conversion from the event name:

  • In the left navigation, select Admin > Conversions.
  • Click New Conversion Event.
  • Enter the name of the new event. Be sure to use the exact event name with proper capitalization.
  • Click Save.

Sign up for a free trial of CallRail and discover what advanced call tracking can do for your business.

Start Using Phone Call Event Data To Supercharge Your Marketing

Don’t guess which marketing tactics are working for you, and to what extent – know for sure.

CallRail will help you better “understand what makes your phones ring.” And with this new set of data, you and your clients can start filling the information gaps in your process.

Now, you can get the full scope of your ROI and keep track of all the major conversion events within a lead’s lifecycle.

Once you start incorporating offline conversion tracking into your strategy, you’ll notice an improvement in your agent-client relationship, as you prove campaign value through data collection.

Your clients just want assurance that their marketing efforts are paying off, and leveraging Google Analytics 4 with CallRail’s Call Tracking can help you prove that all aspects of their marketing campaigns (including phone calls) are working successfully.


Featured Image: Image by CallRail Used with permission.

Know which marketing works with CallRail's Call Tracking. Uncover hidden call metrics to maximize your budget, reduce cost per lead, and boost ROI.
Try Call Tracking, risk-free
GA4 How-tos: Say Goodbye to Missed Opportunities!
In partnership with Rundown

For newbies and pros, this is the bundle of GA4 how-tos you’ve been waiting for. Inside are handpicked articles that simplify GA4, offer guidance on sidestepping pitfalls, and highlight features… all in one place.

THIS RUNDOWN INCLUDES:
  • 7 common Google Analytics 4 configuration mistakes to avoid.
  • How to customize event tracking for your needs.
  • 7 top tips to become a GA4 pro (even if you’re a beginner).
  • A step-by-step guide to creating segments and audiences (with examples).

[The Rundown is our latest product designed to bring you carefully curated content to dive deeper into topics.]

By clicking the “Submit” button, I agree to the terms of the Alpha Brand Media content agreement and privacy policy.

Search Engine Journal uses the information you provide to contact you about our relevant content and promotions. Search Engine Journal will share the information you provide with the following sponsors, who will use your information for similar purposes: CallRail. You can unsubscribe from communications from Search Engine Journal at any time.

Unlock this exclusive article stack.

By clicking the “Submit” button, I agree to the terms of the Alpha Brand Media content agreement and privacy policy.

Search Engine Journal uses the information you provide to contact you about our relevant content and promotions. Search Engine Journal will share the information you provide with the following sponsors, who will use your information for similar purposes: CallRail. You can unsubscribe from communications from Search Engine Journal at any time.