You spend a solid budget on ads every month. Site traffic is growing, click numbers are high, and the charts in your report point up. Then comes the question: how many orders, calls and inquiries did this advertising actually bring in? The answer is often: "We don't know exactly, but it feels like it's up."
That means spending your ad budget blindly. Only conversion tracking shows which campaign works and which one is losing money. In this article we'll walk through how to set it up step by step with three tools: Google Tag Manager, GA4 and Meta Pixel.
What Is Conversion Tracking?
A conversion is an action by a user that is valuable to your business: placing an order, filling in a form, making a call, signing up. Conversion tracking records these actions automatically and shows which source, which ad and which campaign they came from.
Without this data, the only things you can measure are clicks and impressions. They don't tell you how much you are earning for the business.
The Role of the Three Tools
| Tool | Role | When you need it |
|---|---|---|
| Google Tag Manager (GTM) | Manages all tracking code from one place | Almost always, if the site has more than one tracking code |
| GA4 (Google Analytics 4) | Measures user behavior and conversions on the site | To analyze traffic and sources |
| Meta Pixel | Reports actions on the site to Facebook and Instagram ads | If you run Meta Ads |
According to Google's official explanation, GTM works with a container snippet that is placed once on every page of the site. After that, you add, remove or change tags without editing the site's code again: you make the changes in GTM and publish them. In other words, a developer doesn't need to step in again for every new tracking request.
Plan First: What Should We Measure?
The most common mistake is to set up the tools first and only then ask "so what are we measuring?" Start by defining the business goal. A simple question: what action on this site brings the business money?
- E-commerce site: product view, add to cart, checkout start, completed sale.
- Service and corporate site: contact form submission, click on the phone number, click on the WhatsApp button, price request.
- Mobile app promotion: click on the store link, download button.
- B2B company: quote request, catalog download, meeting booking.
For many Azerbaijani businesses, phone calls and WhatsApp are an important source of inquiries alongside forms. If you don't measure them, you may miss a large part of what your advertising really delivers.
It helps to split conversions into two groups. A primary conversion (a sale, a confirmed inquiry) is directly tied to revenue. A supporting conversion (add to cart, a visit to the pricing page) shows that the buyer is on the way.
Step 1: Set Up Google Tag Manager
- Create an account and a container for the site in GTM.
- Place the container code you're given on every page of the site (through a developer or the CMS).
- Use GTM's Preview mode to check that the code is working correctly.
There are three core concepts in GTM:
- Tag: a piece of code that collects data or sends it to another system.
- Trigger: a rule that decides when a tag fires. For example, "when the thank-you page opens" or "when a button is clicked."
- Variable: a place where changing values are stored, such as the page address or the order amount.
Every tag needs at least one trigger, otherwise it will never fire.
Step 2: Connect GA4 and Define Key Events
Create a GA4 property and connect it to your site through GTM. Two concepts get mixed up at this stage:
- Event: any action recorded in GA4: a page view, a click, a scroll, a form submission.
- Key event: an event that is important for the business. GA4 used to call these "conversions," and the official documentation now says "key events."
According to Google's official documentation, to make an existing event a key event, you go to the Events list in the Admin section and click the star next to the event. For an event that doesn't exist yet, you can use "Create event" to make a new event and turn on the "Mark as key event" option. The change only affects data from that point forward and doesn't alter past data. It can take up to 24 hours to show in standard reports, while realtime reports show it within a few minutes.
According to the same documentation, you can mark up to 30 events as key events in a standard property. That tells you not every small click should be a key event. Pick only the ones that truly matter.
On e-commerce sites, the purchase event is marked as a key event in GA4 by default. Other e-commerce events (for example add_to_cart and begin_checkout) are marked automatically only under certain conditions, when Ads Personalization is enabled and a Google Ads account is linked. Don't rely on that. Check for yourself which events are key events.
Step 3: Send Events with GTM
In most cases there are two ways to track an event.
Tracking based on a thank-you page
If the user lands on a separate "Thank you" page after a form is sent or an order is completed, it's enough to choose that page's address as the trigger in GTM. This is the simplest and most reliable method.
Tracking with the dataLayer
If there is no thank-you page (for example, the form is submitted without reloading the page), a developer notifies GTM after the successful action:
window.dataLayer = window.dataLayer || [];
dataLayer.push({
event: 'generate_lead',
form_name: 'contact'
});
In GTM you create a Custom Event trigger matching this event name and attach a GA4 event tag to it. This approach lets you see the difference between "the button was clicked" and "the form was submitted successfully." Counting by clicks often gives wrong results, because a user can press the button even when the form has errors.
Tracking calls and WhatsApp
Clicks on phone (tel:) and WhatsApp links can be tracked with GTM's click triggers. Keep in mind that this measures the click, not a real conversation. In other words, it counts "call attempts."
Step 4: Set Up Meta Pixel
The Meta Pixel reports actions on your site to Facebook and Instagram ads. With this data, Meta learns to show your ad to people who match your goal and optimizes the campaign.
According to Meta's official documentation, the standard events include Purchase, Lead, AddToCart, InitiateCheckout, ViewContent, CompleteRegistration, Contact, Search and others. The same documentation states that the Purchase event requires the currency and value parameters. So when you send a sale, you also need to send the amount and currency, otherwise Meta can't calculate the revenue from your ads.
A simple example:
fbq('track', 'Lead');
fbq('track', 'Purchase', {
value: 120.00,
currency: 'AZN'
});
You can also set up the Pixel as a separate tag in GTM, and the triggers can be the same ones you built for GA4.
Conversions API and Deduplication
The Pixel works through the browser. Ad blockers, browser restrictions, or a user closing the page quickly can cause some events to be lost. The Conversions API sends the same data to Meta directly from your server.
Meta's documentation recommends using the Pixel and the Conversions API together (a redundant setup), because the server can catch events the browser misses. In that case the same event is sent through two channels, so it's important that it isn't counted twice. For that, both channels must send the same event_name and the same event_id. According to the documentation, when a matching pair is found for the same Pixel ID within 48 hours, the later duplicate is discarded.
fbq('track', 'Purchase',
{ value: 120.00, currency: 'AZN' },
{ eventID: 'order-10452' }
);
The same order-10452 identifier must be present in the event sent from the server through the Conversions API. Each unique event should have its own identifier, and it shouldn't be reused for another event. After setting it up, check in Events Manager that the correct events are being kept.
The Conversions API is set up on the server, so this part usually requires a developer. In projects tied to an order system and payment logic, it becomes part of custom software. In a payment flow, confirming the real order status on the server matters both for security and for accurate conversion measurement.
User Consent
If your site has users in Europe or the United Kingdom, tracking code needs to be managed with user consent. Google Consent Mode is used for this, and its main signals are ad_storage, analytics_storage, ad_user_data and ad_personalization. Consent Mode itself does not show a cookie banner. It only passes the user's decision on to Google's tags. The banner itself is shown by a consent management platform (CMP).
The same logic should apply to Meta: if you have consent logic for the Pixel, apply the same rule to Conversions API data. Even if you only serve an Azerbaijani audience, consult a specialist about the legal requirements. This article is not legal advice.
Testing: Check Before You Launch
Setting up tracking and saying "it works" isn't enough. You need to check every event:
- In GTM Preview mode, check that the tag fires with the right trigger.
- Confirm that the event appears in the GA4 realtime report.
- In Meta Events Manager, check that events are arriving and that the parameters (amount, currency) are correct.
- Check that the same event isn't counted twice (if the Pixel and the Conversions API run together).
- Submit a real test order or a test form and see whether the result matches in all three places.
- Test on a mobile device too, since a large share of traffic often comes from mobile.
It's also worth checking from time to time after you go to Production. When the site's design or forms change, tracking can break, and if you don't notice, you can make decisions on wrong data for months. As in a proactive monitoring approach, it's a good habit to set up an alert for when the conversion count suddenly drops to zero.
The Most Common Mistakes
- Counting every click as a conversion: A click on a button doesn't mean a successful submission. If possible, rely on the thank-you page or a successful response.
- Defining too many key events: Actions that aren't important pollute your reports and disrupt ad optimization.
- Not sending the amount and currency: You see the number of sales but not the revenue.
- Connecting the Pixel and the Conversions API without deduplication: Every sale is counted twice, and the campaign looks better than it is.
- Adding the same tag both in GTM and in the site's code: Events arrive twice.
- Not testing: Discovering after the ads have started that the data is wrong is a budget loss.
- Not rechecking tracking when the site changes: A new design or form can break it.
- Not tagging the source (UTM): Without UTM parameters in your ad links, GA4 can't show exactly which campaign the traffic came from.
How to Get Started
- Define the business goal and the 3 to 5 main actions to measure.
- Create the GTM container and install it on the site.
- Connect GA4 through GTM and mark the main actions as key events.
- Add the Meta Pixel and send the matching standard events.
- Pass the amount and currency for actions that have a value.
- Test everything with Preview, realtime and Events Manager.
- If you need accuracy, add the Conversions API and deduplication.
- Watch the reports for a few weeks and check that the data matches your business numbers (CRM, sales, calls).
Accurate measurement is the first condition for growing sales. For other steps to boost your site's sales potential, you can also read our article on increasing sales with an e-commerce website.
Frequently Asked Questions
Is GTM absolutely necessary?
Not strictly, but if the site has several tracking codes (GA4, Meta Pixel, ad tags), GTM lets you manage them from one place and removes the need to change the site's code for every change.
Are GA4 conversions and key events the same thing?
GA4 used to call this concept "conversion," and it is now officially called "key event." In Google Ads, the term "conversion" remains, and you can create Google Ads conversions based on GA4 key events.
I've set up the Meta Pixel. Do I need the Conversions API too?
Meta recommends using the Pixel and the Conversions API together, because the server can catch events the browser misses. When you set them up together, deduplication must be done correctly.
Why do sales counts differ between GA4 and Meta?
That's normal. Each system works with a different attribution rule, a different time window and a different way of collecting data. The goal isn't for the numbers to be identical, but for them to broadly match your real sales or CRM figures.
How long does it take to set up tracking?
A few days for a simple corporate site, and longer for an e-commerce system with payment and server-side tracking. The timeline depends on the site's structure and which actions will be measured.
Can calls be measured as conversions too?
You can track clicks on a phone number. To measure actual conversations, you need a call tracking service.
Conclusion
Conversion tracking is the basic condition for seeing what your ad budget is spent on and what it earns. GTM manages tracking code from one place, GA4 measures behavior and key events on the site, and the Meta Pixel and Conversions API give Meta's ads information about real results. The core rule is simple: first define what you will measure, then build it, then test it, and recheck your tracking as the site changes.
If you want to set up conversion tracking on your site or check the tracking you already have, get in touch with the Crocusoft team. Let's work out a measurement plan that fits your business goal.
+994512060920