Are your GA4 event parameters missing from your reports and the DebugView?
In Google Analytics 4, parameters are additional pieces of data that add context to your event. Some parameters, such as page_title, are sent automatically, whereas custom parameters should be set up manually.
The values that you assign to your parameters populate dimensions and metrics in Analytics. One example could be a value assigned to a coupon configured as an event parameter.
As you further customize your data collection in Analytics by tracking events and setting up custom dimensions, you are bound to create custom events and parameters.
You do try to be as diligent as you can during the event setup. However, there may be times when your custom GA4 event parameters may not show up anywhere in your account. You try looking for them tirelessly to no avail. What should you do, then?
Don’t worry, we got you covered! We have found some cases to demonstrate this problem and have provided a solution. Join us as we show why some GA4 event parameters might be missing and how to avoid this issue.
Here is a quick outline of what we’ll cover in this guide:
Let’s dive in!
GA4 Event Parameters Overview
There are many ways to create an event in GA4. In this guide, we’ll be looking at an example where our custom event is created in Google Tag Manager.
Let’s first look at how a GA4 event is configured in GTM.
In your Google Tag Manager account, go to the GA4 event tag.
Here, we can see the event name, GA4 event parameters, and their corresponding values.
We’re sending a total of three parameters – param_1, param_2, and param_empty – with corresponding values of book, tutorial, and course, respectively.
If we look at the trigger, we have a custom event trigger for an add-to-cart event.
Let’s verify if our GA4 event parameters are being sent properly.
Click on Preview.
Next, ensure that your website URL is shown, and then click Connect.
Your website should open in another tab.
A small window can be seen at the bottom right corner indicating that the Tag Assistant is connected to the website. Click on the Add to cart button for any of the products.
If we look at the Tag Assistant and go to the add_to_cart event, we can see that our GA4 event tag has been successfully fired.
Clicking on the tag, we can see all the event parameters that are for our tag.
As a final check, let’s also check if these have been sent to Google Analytics.
Go to Configure → DebugView → my_test_event, which is our GA4 event.
We can see that all the GA4 event parameters were successfully sent to Analytics with the correct values.
That’s how we want our event parameters to show up in Google Analytics. Let’s proceed to the first possible scenario for missing GA4 event parameters.
The first reason why your GA4 event parameters might be missing is that they might have an undefined value. An undefined value is returned when the event parameter has no value or does not have any valid value in memory.
🚨 Note: The undefined value is different from an “undefined” string value. If you pass the latter to GA4, that exact text will show on your reports, but the former will have no value.
When can an undefined value show up in your variables? A common instance is when you’re using RegEx Table or Lookup Table variables.
Both variable types allow you to return different values for the variable depending on the match cases you specify. Whenever no match is made, the undefined value is returned by default.
To illustrate how an undefined value causes GA4 event parameters to be missing from your reports, let’s go back to Google Tag Manager.
When we go to the Variables tab, we have created an undefined variable that returns an undefined value.
What’s interesting about this variable is that we used the available Undefined Value variable type.
To see an undefined value in action, let’s go back to our GA4 event tag and replace the value of one of the parameters with this variable.
For this demonstration, we’ll replace the value of the last variable, param_empty, that currently returns the value course.
After clicking on the Tag Configuration to edit it, delete the corresponding value of the param_empty parameter, then click on the lego icon beside the parameter.
Select the Undefined Variable from the list.
Finally, click Save.
For this change to be reflected in our testing, we should preview our tags again. Once Tag Assistant is connected to our site, add another product to the cart.
If we check our GA4 event tag this time, we can see that we still have the same 3 variables. However, the undefined variable is displayed for the last parameter’s value.
Next, let’s check how this tag has been sent over to the GA4 DebugView.
Here, we can see that our GA4 event tag has been successfully sent over to Google Analytics, but only the first two parameters got sent along with it. The last parameter that contains our undefined variable is missing.
This is because parameters that have an undefined value will be dropped from the payload before being sent over to Google Analytics.
🚨 Note: We can still see this parameter in GTM, so the parameter is still recognized. It’s just that no value can be displayed in Analytics, so it has been dropped to make your reports cleaner.
If you’re okay with this arrangement, then you don’t have to change anything else. However, if you want to know in your GA4 reports how often you have undefined values for your GA4 event parameters, then we have a few tips for you.
Let’s start with undefined values in RegEx and Lookup Tables. If you’re using either of these variable types, you can set a different Default Value when no match is made. This setting can be seen above the advanced settings portion.
For more general variable types, we can make use of the Format Value option in user-defined variables. You can transform the returned value of your variables using this feature.
Among the various formatting options available, the one of interest for our case is the “Convert undefined to…” option. As the name implies, you can have undefined values fall back to other string values or the returned value of other variables.
Very interesting, right? Now, let’s have a look at the second scenario.
For this scenario, we’ll be looking at event modifications. In GA4, we can change the value of our event parameters.
Go to Events → Modify event.
Let’s start with providing a modification name. For the matching conditions, let’s put in “event_name equals my_test_event”. If you have to, go back to GTM and copy the event name to ensure that the exact name is inputted.
Now, we’ll modify one of our parameters. For this example, we’ll change the value of param_2 and leave its new value empty. Finally, click Create.
Again, preview the tags and add a product to the cart.
If we go over to the Tag Assistant, you’ll notice that our modification seems to have had no effect.
The second parameter still has the previous tutorial value. This is because our modifications will only take effect after it has been sent to Google Analytics.
If we go and open our event in Google Analytics, only the first parameter will be displayed.
The key to fixing the missing GA4 event parameters due to this scenario is to simply go back to your event modification and ensure that all modifications to your event parameters are populated.
If you will make modifications to your event in GA4, keep in mind that it will overwrite the parameter’s value in GTM.
Now, we have covered the two main reasons why your GA4 event parameters may not show up in your reports and the possible ways of fixing them.
We hope that the key takeaway you get from this tutorial is that when a value is empty or undefined, Analytics would drop that parameter. So you should check GTM if the value is returned or check GA4 directly if you have made some event modifications.
If you find this tutorial helpful, then you might be interested in our tutorial on how to set up GA4 conversion tracking.
Were you able to find out why your GA4 event parameters went missing? Did you find our tips helpful in fixing them? Let us know in the comments below!