Are you having trouble setting up custom goals in Google Analytics to match your custom events? Do you see the events show up in your real-time view, yet the goal counts still sits at zero? This can happens if just one of the Event conditions aren’t set to match correctly. Let’s go over places to check.
Custom events are signals that you send to Google Analytics when a user does a specific action on your web site.
Custom events are set up with four fields or parameters. Fields or parameters are a way of sending data from your web site or web app to Google Analytics. Each parameter has a specific input type and which column the data will end up in.
Below is a table from the custom event setup page from Google.
|Field Name||Value Type||Required||Description|
||text||yes||Typically the object that was interacted with (e.g.
||text||yes||The type of interaction (e.g.
||text||no||Useful for categorizing events (e.g.
||integer||no||A numeric value associated with the event (e.g.
Let me elaborate. Each time a user does something you are interested in using as a metric on your web site or app, you can send an event in four different fields.
Now that we have the basics, let’s move on.
If you want an event when fired to be registered as a goal, you’ll have to set up a custom goal and select the event type. When you are configuring the details of the Event conditions, you’ll need to know the details that was sent.
Each field has to match up with what the event sent in the four fields (category, action, label, value). You’ll need to make sure you select the correct match type (“Equals to”, “Begins with”, “Regular expression“, “Greater than”, and “Less than”).
Here are some common mistakes that you should be aware of.
Sometimes you need to set up goals for events that were configured by someone other than you or by your content management system (CMS) like WordPress for example. However, since you didn’t create the custom event yourself, you won’t know exactly what is sent in the four fields. Where would you go to find the details of what is being sent and for what action? This is where you’ll need to use your technical skills to monitor the events as you trigger the events in your browser.
To find out what fields are being sent in the events for what user actions, using the developer tools already built into your web browser can help. Below I will show the developer tools found in Chrome Browser.
To quickly open developer tools, open your web page or web app in Chrome Browser. Then right click anywhere on the page to bring up the contextual menu. In the menu, click the last menu item called “Inspect“. This should open the developer tools.
Along the top, you should see a row of tabs. Select the “Network” tab.
Now, you should be able to see any communication between your browser and the internet (your server or Google Analytics).
When you do something on your web site that has already been configured to send an event, your event will show up here as the event and its data travels from your browser to Google Analytics.
Go ahead and do that action now.
Once done, find the network request that starts with “collect?v=1&_v=…” as seen in the screenshot above. This is the name of the page where Google sends your data. You can use the filter (funnel icon at the top), to find it faster.
Once you found one, click it to view the “Headers” tab. Scroll down to the “Query String Parameters” section and you can find out that this was a type (t) “event”, the event category (ec) is “Graph” (which is what we named this event), and what the event action (ea) and event value (ev) are.
With this information, you can accurately set up your custom goal for custom events.
Happy goal setting!
If you are still having trouble and cannot figure things out, please feel free to comment below or reach out to our team here. We are always willing to help as doing so allows us to learn from each other.