MeasureSchool logo

How to Set Up GA4 Conversion Tracking (previously Goals)

Last Updated: October 4, 2023

How do you know if your website is successful? Your GA4 analytics tool can tell you that if you set up conversion tracking.

GA4 conversion tracking and creating goals in Google Analytics 4 are easy, and there are many ways of doing it in GA4. Let’s explore 3 methods to track conversions on your website, at Google Analytics 4.

🚨 Note: Google Analytics 4 is the iteration of Google Analytics’ Universal Analytics. Please update your Analytics and ensure you have linked your accounts.

GA4 For Beginners

Master the basics with our FREE GA4 Course for Beginners

Here is an overview of what we’ll cover:

  1. Define a Pageview as Conversion, by modifying the page_view event
  2. Create a custom event with GTM
  3. Use eCommerce tracking to send a Purchase event

Let’s get started.

Define a Pageview as Conversion, by modifying the page_view event

💡 Top Tip: Keep your GTM, GA4, and your website pages ready to navigate smoothly throughout the demo.

How do we mark a particular page view as a conversion?  Our Google Analytics Debugview shows real-time results, tracking everything. 

Let’s suppose we want to track when someone signs up for our merch and news. We want it as a conversion. So we head towards the sign-up form at the Demoshop.

Going to the sign up form from the demoshop

We sign up with my name and click on Submit, to elicit a response/ data from my Google Analytics4, DebugView.

Input data on the sign up form

The website shows a success page for my sign-up submission. How did Google Analytics record it?

The success page post sign up

When we sign up on a form from our website, the success page pops up and Google Analytics records it as a page_view event.

The Analytics DebugView shows the event as a pageview

The page_view shows parameters on page location indicating  ‘sign-up-form/success/’.

The pageview parameters show the details of the pageview event

This is what we want as a conversion to track. To mark it as a conversion, we head to my All Events report on Google Analytics. 

The reporting page of the GA4

It shows us a record of all events that occurred.

All Events has a list of events for you to mark it as a conversion

You can click on the event and fetch more data about the event. Here, we click on page_view and we avail data about all page view events.

The Pageview event gives data on the event

It can also display data about Page path, User engagement, etc.

The page view event displays detailed data on the event that occured

It’s easy to mark it as a conversion by switching your option at the Mark as conversion column. But this would lead to marking all your page views as conversions. However, we don’t want this.

You can mark your event as a conversion

We only want the particular event to be marked as a conversion.

First, click on Create event in the top right corner of the Analytics site to create your new event.

Create a new event  at Google Analytics to mark the sign up page as a conversion

Give a name to the event. Here, we’re naming it sign_up_demoshop.

Applying event name as sign up demoshop

Second, input the conditions under which the page view is recorded on Google Analytics. We’ve applied 2 conditions – one, where event_name equals page_view and another when page_location contains /success/.

Applying conditions under which the tag will fire

Finally, you can choose to copy the parameters from the source event from the Parameter configuration. Here, we’ve chosen to copy it. 

Copy the parameter configuration

Let’s go ahead and create this event by clicking on Create.

The event after being created with all details

🚨 Note: This event would show up on your All Events page when some data is recorded, and it’s registered by Google Analytics 4.

We’ll try testing this by signing up at our Demoshop again. Let’s go to DebugView at our Analytics and we can see the events pouring in. We notice the sign-up-demoshop event is recorded.

The DebugView shows the event as sign up demoshop

You can click on it to view the Parameters and User properties of the event that just occurred.

The Parameters and User Properties of the sign up demoshop event

When the event is present in your All events list, you can click on the switch and mark it for conversion. Once done, you’ll be able to track the particular page as a conversion.

Your conversions are very useful in your User acquisition report. The user acquisition report tells a lot about where your users come from, average time event counts, and conversions.

Go to User acquisition from Acquisition at Google Analytics 4 to avail of data about your users

User acquisition can tell a lot about how users interact with your website and has data on Engaged sessions, Event counts, Conversions, and much more.

User acquisition providing data on Engaged sessions, Event count and Conversions

This is the first method to classify a pageview as a conversion.

Create a Custom Event with GTM

Welcome to method number two. This time, we use a little bit of Google Tag Manager magic. Let’s get started!

Considering that we want to record the success of a sign-up form from our Demoshop, we’re going to create a trigger and a tag, connect it to our web page and let Analytics take care of recording the data for us.

The Google Tag Manager Workspace

To start, head over to the GTM workspace and click on New to create a generic formSubmit trigger

Create a new trigger for formSubmit trigger

We’ve named it ‘formSubmit’ for easy identification and have set the trigger type to Form Submission.

The form submit trigger with trigger type as Form Submission

Save the trigger created. Let’s test this by going over to Demoshop and signing up on another form. This time, after submitting the form, you can see the trigger being fired on Google Tag Manager.

To ensure that your trigger doesn’t fire at any other event, you can refine your trigger settings. For this, go through the variables of the formSubmit to narrow it down.

Ensure that your trigger configurations are set up

Find the Form ID & copy it. You can head over to the Manager Assistant and check out the variables.

The variables section of the FormSubmit event

Scroll down and you’ll be able to find the FormID. For us, it’s ‘gform2’.

The form ID is found from the FormSubmit event at the variables section

Here, our Form ID is ‘gform2’. We copy this ID and head over to the triggers settings. Note that we’ve established conditions for the trigger to fire only when Click ID equals gform2.

Copy the FormID

Go to the trigger that you created, select the ‘Some Forms’ option, and specify the condition when the trigger is to be fired.

🚨 Note: If you don’t have a Form ID variable, you can always choose another variable from the list to refine your trigger.

We will rename this trigger to formSubmit – sign up, because, now, this trigger will fire only after the sign-up form has been submitted.

In addition, you can select the Wait for Tags option if the user is redirected to another page. Selecting this option ensures you are giving Google Analytics enough time to record the event when the page loads and fires the trigger. 

Moreover, you can state the conditions when you want it to be fired. We have set the conditions such that the trigger will be fired if the ‘Page URL matches RegEx.*.

The trigger configuration for formSubmit sign up

Now that the trigger is set up and ready, we’ll go ahead and connect it to an event tag.

To create a new tag, hover over the plus sign, choose tag type as Google Analytics: GA4 Event, and Configuration Tag as GA4 – Config / Pageview – All Pages

We’ve named it GA4 – Event – Sign UP Form.

Now, we will go to Event Name and Event Parameters. You are free to choose any event name or event parameter, but there are some predefined parameters from Google Analytics.

Moving forward, we’re using the predetermined parameter called method that is specific for Sign Up events. Back at our Google Tag Manager, we input the Parameter Name as method and the Value as form.

The GA4 Event Sign Up Form

Don’t forget to scroll down and connect the formSubmit – sign up trigger to the GA4 – Event – Sign UP Form tag

Click on Save.

Configure trigger to tag settings

After all this, we reach the Demoshop page again and submit another Sign-up form. This time, after submitting, we can now go to Google Analytics DebugView and analyze the events that have occurred on our website. 

We notice the sign_up_demoshop has fired and a few moments later, the sign_up event shows up on the timeline. 

The sign up has popped up on the DebugView of Analytics 4

If you take a closer look into the Parameters of the event, you can find that the method has a value of form.

The parameters shows the values for method as form

Having the trigger fired, you can see that this event could be a scroll, a click, the visibility of an element, or anything you want to track. Thus, the possibilities for Google Tag Manager working for you are innumerable.

Bringing this to an end, you can head over to the All Events page and find the sign-up event and mark it as a conversion.

Now, let’s go to the last method of setting up GA4 conversion tracking – on eCommerce websites.

Use eCommerce Tracking to Send a Purchase Event

Google Analytics can track eCommerce websites for you.

🚨 Note: Make sure you set up your GA4 settings properly for your eCommerce sites.

ECommerce events on Google Analytics and Google Tag Manager are audited and you can find the data under Analytics → Reporting → Monetization → E-commerce purchases.

The eCommerce section on Google Analytics

Under this section, you can review all the conversions and purchase activity that has occurred on your website.

At our end, we have a demo Order Form and a summary of an order for a product worth $11.99. Clicking on Submit gives us the Thank You page.

The order form from the demoshop

For an eCommerce conversion to occur in our Google Analytics, we need to set up a data layer at the GTM, so that specialized data about the purchase can be recorded and reported.

The Purchases data layer from the eCommerce GA4 site

The data layer provides your GTM and GA4 with the data in the background for the tools to analyze and report to you through the screen. 

Google Analytics4’s documentation on setting your data layer is a code so that the data can be recorded in the background. Google Analysis provides more to eCommerce tracking than just tracking purchases.

GA4s' guide on Recommended event

The recommended events section has a predetermined event called sign_up and it will trigger when someone signs up on a form. The parameter for this trigger is method.

The guide says the sign up event will trigger when you use the method parameter

For this demo guide, we’re going to stick to tracking purchases. This code would need to be deployed on your website on the thank you page, for Google Tag Manager to have that data available, and then send it on to Google Analytics 4. 

If your eCommerce shop is on Woocommerce, Shopify, or such eCommerce stores, you might find a plug-in available for you. Having a plug-in can save the time and hassle of entering the code into your GTM and GA4. It can directly send over the data to your GTM and GA4.

To try this out, let’s head to our Demoshop’s thank You page and edit the code. 

Edit the Thank You page of the Demoshop

We’ve already got our code snippet into the code editor, and we’ll save it.

The snippet code can be added by your website developer

Heading to the Tag Assistant, you’ll be able to find the code in the data layer. 

Go over to the purchaseData Layer. The data layer is set up. This information is ready and can be sent to Google Analytics 4. The event key in predetermined events at Google Tag Manager for eCommerce sites is ‘purchase‘. 

The Data Layer of the purchase event from the Tag Assistant

You need to follow the syntax to ensure proper formatting. In GTM, you’ll have to first build a custom trigger.

It is built such that it will fire only after the page loads. Giving it time to load the data about the order on the data layer, and then fire. 

The trigger is named custom – purchase. Choose the trigger type as Custom Event and the Event name purchase. You can choose to set it to All Custom Events because we don’t need to narrow our report.

The custom trigger is named as custom purchase

After all this, we’ll create a Google Analytics 4 tag. Name it GA4 – Event – purchase.

The GA4 event tag for transaction

This is an event tag, so make sure you choose the Google Analytics: GA4 Event, from the list of tags presented to you. 

GA4 Event purchase tag configuration

We will proceed to connect to the Configuration tag followed by the Event Name. Don’t forget that the Event Name is equal as per the documentation, in this instance, it’s {{Event}}.

Event is the event name

Next, we need to add the Event Parameters. We want to add everything we want to measure from the purchase. Here, we’ll enter all the parameters from hierarchy 1.

The parameters we’ve applied are as follows:

  1. transaction-id
  2. Affiliation
  3. value
  4. tax
  5. shipping
  6. currency
  7. coupon
  8. items
The variables from the purchase event

To pull the information from the data layer, you need to set up data layer variables. Let’s try setting up the variable for transaction ID.

You will have to enter the event parameters for the purchase event

Back at our tag, we enter the Parameter Name as transaction_id and the value/data layer variable is customized by generating a new variable. 

The transaction id parameter has a value of dlv transaction id

The variable is called dlv – transaction_id. Remember to save the Variable Type as Data Layer Variable. 

Your Data Layer Variable Name has to follow the same path as the code. In this instance, its ecommerce.purchase.transaction_id.

Data layer variable configuration

Once you’ve set it up for your transaction ID, you’ll have to follow the same for the other variables and ensure the tag is complete. Having completed this, save and you’ll be ready to send data to Google Tag Manager.

Once you’re done, pull a quick review of the tag settings and connect it to the custom trigger that you just created. Once done and saved, you can test this by hitting the preview button.

The event tag set with event parameters and trigger

To test our exercise, we head back to Demoshop and go to the Order Form. We’ll click on Submit and this time the Google Tag Assistant will record the tag being fired.

The Tag Assistant displays information on GA4 Event Transaction tag being fired

You can take a look at the event from the Google Tag Assistant and find more details about the event.

The purchase event has recorded data for all the event parameters

Meanwhile, in the Google Analytics 4 DebugView, we can observe the key events that have taken place on our website. Notice that the purchase done is marked as a conversion.

The purchase event is marked as a conversion at Google Analytics DebugView

You can pull up more data about the purchase as you click on the event. This opens up a new window with Parameters, User Properties, and Items.

The top events section of Google Analytics

Under Items, you will be able to see the data layer parameters – coupon, currency, item, etc.

The purchase analytics provides data on items as per code

🚨 Note: Purchase events are by default marked for conversion at Google Analytics. 

This is the third way of creating a conversion inside of Google Analytics 4 with the help of Google Tag Manager and the data layer which you need to implement.

So, there we go! Those are the 3 ways of setting up your GA4 conversion tracking!


Are there any prerequisites for setting up conversion tracking?

To set up conversion tracking, you need access to your Google Analytics account and your website’s Google Tag Manager (if using Method 2). It’s also recommended to have a basic understanding of Google Analytics and how events are tracked.

How do I view and analyze the tracked conversions in GA4?

Once you have set up conversion tracking, you can view and analyze the tracked conversions in the “All Events” section of Google Analytics 4. You can also explore the “User Acquisition” report to gain insights into user behavior, engagement, and conversions.

Why is conversion tracking important?

Conversion tracking helps you understand the effectiveness of your website and marketing efforts. By tracking conversions, you can analyze which channels, campaigns, or pages are driving the most valuable actions on your website, and optimize your strategies accordingly.


We hope this showed you three novel ways of setting up GA4 conversion tracking. However, you need to think of the best way that works for you.

If you want to track a pageview as a conversion, you can create a new event off the page view. But, if it’s not a pageview and it’s more specialized like a form submit, then you might want to send it at an event. 

To get the most out of Google Analytics 4, check out our guide on GA4 metrics and get a better understanding of your user behavior.

Did you try setting up GA4 conversion tracking? Which way of setting it up do you prefer? Let us know in the comments below!