Unlike Google’s Universal Analytics, the new GA4 automatically tracks pageviews as events. This is a default setting and does not require any action on your part to make it happen. Which is nice, but not really all that helpful since it simply tracks ALL pageviews. And as we all know, not all pageviews are equal.
Creating Custom Pageview Events
However, GA4 does make it easy to create custom events, including custom pageview events for any desired subset of pages or a specific page – like a thank you page. Here’s how:
Hover over the far left menu sidebar until it opens, and then select Configure, it’s located at the bottom. By default you should already be on the Events screen, which is where you want to be.
From here, click on the large blue Create Event button.
This will open up a new screen with another blue Create button along with a list of any custom events already created for the account. If this is your first custom event, the table will most likely be empty. Either way, click that Create button since that’s what you are here for.
Start configuring. On the Create Event screen, give your event a name. Be specific so it’s obvious what it is you are tracking. Also, avoid using spaces, they are not supported in any of the fields. I recommend using underscores ( _ ) to stay consistent with GA4’s standard naming conventions already established.
Select the parameter, see above. In this case it’s “page_location”. So either scroll down until you find it in the list or start typing it and select it from the suggested options.
Choose the operator from the dropdown list. “Contains (ignore case)” is typically a safe bet, but there are other options including “equals” which is more ideal for an exact match situation or “starts with” which is best for URLs that may include modifiers or dynamic unique IDs.
And lastly, provide the value. This is the field to enter the URL or portion of the URL for the page that you wish to track. In the example above, the value matches the contact us form submission thank you page for this particular website.
Then hit the blue Create button towards the top right and you are done.
If you’d like to test your newly created event, head over to the Realtime report, pull your website up in another window or tab and see if it fires when you visit the page in question (assuming you aren’t blocking your own ID address).
If it doesn’t fire, pop back into the configuration screen to tinker with the operator and value fields until you are able to trigger the event in the Realtime report.
Note: Don’t be alarmed if you don’t see the new custom pageview event in the regular Events reporting section the next day, even after seeing it fire in real time while setting it up. Some GA4 accounts have thresholding applied, which means there has to be enough data to reach a point of user anonymity before it’ll be made available to you.
Creating Custom Goals aka Conversions
And once the custom events are properly configured and tracking the pageviews of your choosing, you can easily turn them into goals, or conversions which is what GA4 now calls them.
To do this, navigate back to the Configure option on the sidebar, and on the Events tab just toggle on any event you wish to track as a conversion. It’s that easy! Repeat as needed.
Got to give it up to GA4 for making the goal / conversion creation process easier than it was in Universal Analytics.