PoolByte

GA4 and Tag Manager: Measure forms and sales accurately

· PoolByte Technology

GA4 and Tag Manager: Measure forms and sales accurately

Page views and visitors count shows how much traffic your site receives; but it doesn't show what this traffic brings to your business. How many times a quote form is sent, how many times a phone number is clicked, or which campaign a visitor makes a purchase from, directly affects business decisions. Conversion tracking allows you to see the true value of traffic by measuring these actions.

Google Analytics 4 (GA4) allows you to mark such key actions as "key events". Google Tag Manager allows you to manage tags without intervening in the site's code every time. In this article, we discuss setting up both together to provide accurate and non-duplicate conversion tracking.

Write a measurement plan first

Before you start setting up tags for conversion tracking, write down what you will measure and why. Define one or two activities for each business goal:

  • Quotation or contact form submission: generate_lead
  • Clicking on a phone or WhatsApp link: a custom event name
  • Membership creation: sign_up
  • Proceed to payment step: begin_checkout
  • Purchase: purchase

Use GA4 suggested event names wherever possible. These names match ready-made fields in reports, making it easier to connect to advertising platforms in the future.

Manage tags in one place

Add the Tag Manager container to all pages of your site and run the Google tag (with your GA4 measurement ID) from within this container. The most common mistake is to add the same tag via Tag Manager in addition to the GA4 tag added directly to the site's code. In this case, each page view and event is counted twice.

Check the number of times your measurement ID appears in the page's source code before installation. An old theme or plugin may also be adding a separate tag.

Measure form submission success at the moment of success

Counting "Submit" button clicks in form measurement is misleading. Even if the user gets an error due to a missing field, the click is counted. The correct method is to measure the moment when the submission is completed successfully. There are two ways to do this: redirect to a separate thank you page after successful submission, or send a datalayer event to the page code on success.

window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
  event: 'generate_lead',
  form_name: 'teklif_formu'
});

Define this event as a trigger in Tag Manager and link it to the GA4 event tag. We explained how to design the form in our landing page guide.

Mark event as key event

In GA4, the concept formerly called "transformation" is now referred to as "key event". Once the event starts reaching GA4, mark the relevant event as a key event from the events list on the admin screen. This sign does not work retroactively; Only data after the moment it is marked is reflected in the reports.

Measure purchases in e-commerce without duplication

The transaction ID (transaction_id), amount (value), currency (currency, TRY for Turkish lira) and product list (items) should be added to the purchase event. Transaction ID is particularly important; Prevents the same sale from being counted twice when the user refreshes the order confirmation page.

Trigger the purchase event at the point when the order is actually confirmed, not at the time of return from the payment provider. We covered how to sync order status with the payment provider in our virtual POS guide.

Make permission management part of measurement

Analytics and advertising tags should not work without the user giving their cookie preference. Google's consent mode allows you to adjust the behavior of tags based on user preference: if consent is not granted, no cookies will be used. Be sure to test the connection between your cookie notification and Tag Manager. We explained the legal framework in our KVKK compliant website guide .

Test before release

Be sure to test conversion tracking before going live. Tag Manager's preview mode shows you step by step which tag is working with which event. You can also see that the events and parameters are correct on the DebugView screen in GA4. Submit a test form, order a test, and verify that each is recorded only once.

Add UTM parameters to email, social media and partner links to differentiate campaign traffic. So you can see which channel is actually bringing in form or sales.

Frequently asked questions

Why is the sales count in GA4 not the same as in my admin panel?

Ad blockers, users refusing cookie consent, cancellations and refunds are the usual reasons for this difference. GA4 is ideal for seeing trends and channel performance; The main source for accounting is always your order system.

Does GA4 replace Search Console?

It doesn't work. GA4 measures the behavior of users coming to the site; Search Console shows how your site appears in Google searches. Using the two together gives the most complete picture.

Official sources