Google Ads Conversion Code: How to Add It with Tag and GTM

Short answer
How do you add Google Ads conversion code to your website?
Google Ads conversion code is a tag that tells Google Ads when a customer action happens on your site. Also, you can add it in three ways: the no code page URL method, an event snippet, or Google Tag Manager. First create the conversion action in Google Ads, then set up the tag, and test it last.
The order matters. If you place the tag on the site first and define the action later, you mix up which data belongs to which action. In this guide we walk through each path step by step.
For the official view, also read Google's conversion tracking help page. Here we offer a practical roadmap with a decision table.
What is conversion code, and how does it differ from the Google tag?
Two ideas get mixed up often. The Google tag, also called gtag.js, is the base code that runs on every page of your site. The event snippet is an extra piece of code that reports one specific action.
So "conversion code" in everyday speech means two things at once. The first is the base tag. The second is the event snippet for each action. For some conversions you need no extra code at all. In practice, a conversion based on a page load can be defined without code.
You can check whether the tag already runs on your site with the Google Ads scan feature or with Tag Assistant. Therefore check the current setup before you add code from scratch.
Duplicate setups are the first cause of double counting. So know what exists before you add anything new.
Which setup method fits your Google Ads conversion code?
So the choice depends on the type of action and on the tools you have. The table below summarizes the methods from the official help page from your point of view.
| Method | When it fits | Code needed | Risk to watch |
|---|---|---|---|
| Page URL method | Page loads, such as a thank you page | No | Double counting on reload |
| Event snippet | Button clicks, dynamic values, transaction IDs | Yes | Placing it on the wrong page |
| Google Tag Manager | Managing many tags in one place | Container code once | Wrong trigger |
| Google Analytics event | A key event already exists in GA | No, you import it | Data delay |
For a small site, the URL method is often enough. However, if you want to track a value, a transaction number, or a button click, you need an event snippet or Tag Manager.
Also, do not forget to tag your campaign links. A utm builder is a handy start. That way you can separate which campaign brought which conversion in your reports.
What should you prepare before you start?
If you skip preparation, the setup stays half done. Google's help page says you need admin access in Google Ads and edit access to any linked Google Analytics property. So confirm your access first.
Check this list:
- Do you have admin rights in the Google Ads account?
- Can you reach the site's admin panel or theme files?
- If you use Tag Manager, is the container already on your site?
- Did you write down which action you want to track?
- Do you know the page address where the action happens?
Deciding which action carries real business value also belongs to this stage. Our guide on how to set website conversion goals frames that decision.
Finally, check whether another plugin or tool already sends conversions from your site. Google's page warns you to avoid double tagging, especially with CMS plugins. If you cannot build the measurement plan alone, professional google ads management can save time at this stage.
How do you write a measurement plan before adding Google Ads conversion code?
Also, a measurement plan is cheaper than a later fix. It shows which action counts, why it counts, which method you will use, and whether it matters for bidding.
Also, the table below is a starting draft for an example service business. Adapt it to your own model.
| Action | Why it counts | Suggested method | Primary or secondary |
|---|---|---|---|
| Contact form submission | Direct lead | Tag Manager or event snippet | Primary |
| Click on a phone button | Shows call intent | Click trigger | Depends |
| Pricing page view | Early interest signal | URL method | Secondary |
| Booking confirmation page | Real business value | URL method or event snippet | Primary |
Name an owner for each row. In other words, write down who sets up the code, who tests it, and who watches it. So the Google Ads conversion code gets installed once, and responsibility stays clear.
When you fill in the table, choose what earns money, not just what is easy to count. Also, if you mark a cheap action as primary, automated bidding chases a weak signal.
How do you create the conversion action in Google Ads?
A conversion action is the definition that tells Google Ads what to count. Besides, you start a new action for website conversions in the goals area. Menu names can change over time, so focus on the function.
The flow usually runs like this:
- Add the website data source and scan your domain.
- Pick the category that fits the action best, such as purchase or lead.
- Choose the method: URL, code, or Tag Manager.
- Review settings like value, counting type, and attribution window.
- Mark the action as primary or secondary.
So the last step matters a lot. According to the help page, a wrong setting can weaken Smart Bidding. Primary conversions guide bidding, while secondary conversions are for observation only.
For details, read our guide to primary and secondary conversion actions. Also see how to create a Google Ads conversion action for the account side. If you choose well, you set up the code once and rarely touch it again.
How do you define a conversion with the no code URL method?
Also, the URL method works without writing code. A conversion counts when the user reaches a given page. In practice, a thank you page after a form or an order confirmation page usually fits this job.
Its strength is simplicity. So if the Google tag already runs on your site, you enter the page address while you create the action, and you are done. You never touch a code file.
Still, some points need care:
- Anyone can type the thank you page address directly, so fake conversions can appear.
- A page reload can count the conversion again.
- You cannot pass a dynamic value or a transaction ID.
So for orders with changing totals, the URL method is not enough. In that case, an event snippet or Tag Manager steps in. For the page itself, thank you page design after a form submission is a useful guide.
Also, if you chose the URL method, take one small precaution. Keep the thank you page out of search results so people do not land on it directly. Also consider showing the page content only after a real submission. Talk to your developer about it.
How do you place Google Ads conversion code with an event snippet?
The event snippet suits detailed cases such as a button click, a dynamic value, or a transaction ID. According to the help page, you add the event snippet for this method, and you can also add it through Tag Manager.
Besides, when you add it straight to the site, follow this order:
- Open the option that shows the event snippet while you create the action.
- Copy the code.
- Place it only on the page where the action happens, such as the thank you page.
- Make sure the base Google tag runs on that page.
- Save and test.
If you place the code in the header of the whole site, every page view counts as a conversion. In short, that is one of the most common setup mistakes. So tie the event snippet only to the right page or to the right trigger.
If you use a CMS such as WordPress, you can add the code through a page specific field or a theme setting. However, if you do not want to keep editing code files, Tag Manager is the easier path.
How do you set up the conversion tag with Google Tag Manager?
Also, Google Tag Manager, or GTM, lets you manage tags without touching code files. According to the official Tag Manager page, you set up the conversion tag in this order. First, create the conversion action in Google Ads. Then add a new tag in your Tag Manager workspace.
In the tag configuration, pick Google Ads and then the Google Ads Conversion Tracking tag. Enter the conversion ID and the conversion label. After that, set a trigger, save, test with preview, and publish.
In short, the flow is:
- Create the action in Google Ads.
- Open a new tag in GTM.
- Choose the Google Ads conversion tracking tag.
- Enter the ID and the label.
- Attach the trigger.
- Test in preview, then publish.
For more examples, see what Google Tag Manager is and how to use it. As the official source, use the Tag Manager conversion tag page.
Tag Manager also saves versions of your changes. So if you make a mistake, you can go back. Besides, preview mode lets you test without touching the live site. For these reasons, Tag Manager is often the most flexible path for Google Ads conversion code.
Where do you find the conversion ID and the conversion label?
In practice, a Tag Manager tag asks for two values. The conversion ID belongs to your account. So the conversion label belongs to each conversion action.
According to the official page, you find these values in Google Ads. In the goals area, you select the conversion action and open the option to use Google Tag Manager. There you copy the ID and the label and paste them into the GTM tag.
However, one detail matters here. Conversions that Google Ads creates automatically, such as auto detected goals or Smart campaign conversions, may have no standalone conversion label. In that case, create a manual action instead.
Do not leave spaces when you copy. Besides, one extra character can stop the tag from recording anything. Checking the ID twice costs far less than hunting for errors for hours later.
How do you choose the trigger: thank you page or button click?
The trigger tells the tag when to run. In practice, a wrong trigger gives worse results than even a correct code.
There are three common options:
- Page view: It runs when a given page loads. It suits a thank you page.
- Click: It runs when someone clicks a given button or link. It suits actions like a phone button.
- Form submission: It runs when a form is sent successfully. The safest choice is usually the confirmation screen shown after sending.
Also, the danger here is counting an action that never happened. For example, clicking a button does not mean the form was submitted. So tie the trigger to the success confirmation whenever you can.
If your site has no success page, ask your developer for an event that fires only on a successful submission. In practice, that way empty or failed submissions do not count as conversions.
How do you pass conversion value, currency, and transaction ID?
If you sell online, passing the amount to Google Ads shows which campaign brings revenue. So the official page says you can add a conversion value, a transaction ID, and a currency code to the Tag Manager tag. Use Tag Manager variables for these when possible.
Then mind this note: if the conversion value is empty or undefined, Tag Manager sends 0. In other words, if you do not connect the value correctly, every sale looks worth nothing.
The general approach looks like this:
- Your site writes the order amount into a data layer field.
- In Tag Manager, you create a variable that reads this field.
- You connect that variable to the value field of the tag.
- You enter the currency the same way, or as a fixed value.
Besides, you may need to work with your developer for this. Of course, if the amount is fixed, you can type the value into the tag directly. However, for changing amounts, an automatic connection is the right path.
How do you prevent double counting?
Double counting means the same action gets recorded twice. It inflates your data and misleads automated bidding. In short, the help page tells you to avoid double tagging, especially with CMS plugins.
The Tag Manager page gives a clear fix: pass the transaction ID from your site through the data layer and retrieve it with a variable. That way a second record with the same ID does not count again.
Also, these are the common causes:
- You set up the same action with both a plugin and Tag Manager.
- The thank you page reloads, so the tag fires again.
- The same event snippet sits on two different pages.
- Both a Google Analytics import and the Google Ads tag count the same action.
This check is the most critical step of the setup. To understand why numbers come out low or high, also read why GA4 conversions are missing.
How do you test the setup with Tag Assistant?
In practice, do not publish your Google Ads conversion code without testing it. According to the official Tag Assistant page, you go to tagassistant.google.com, add your domain, and connect. The tool shows whether the tags on your site run, which events they send, and which errors appear.
So a simple test flow looks like this:
- Open preview mode in Tag Manager.
- Perform the action on your site yourself, for example by sending a test form.
- Check in the preview whether the conversion tag fired.
- Confirm in Tag Assistant that the event was sent.
- If all is fine, publish.
For connection problems, try these steps: turn off ad blockers and browser extensions, check that your consent tool allows Google's consent API, and make sure no firewall or content security policy blocks the tag. The official page lists these points.
Then use your own device for the test. Do not send test submissions as real customers. Cleaning test data later is hard.
Besides, remember one more thing: a test record from your own device is not the same as a real customer record. A user who clicks an ad and converts carries a trace through a cookie. Also, a direct visit may not be credited to an ad. So the test shows the tag works, not the whole attribution chain.
What should you do if the status says unverified or inactive?
According to the official help page, new tags often show an unverified or inactive status until the first conversion or test event is recorded. So this status alone is not an error, because the system waits for its first record.
If the status does not change after a while, check these in order:
- Does the tag really run on the page? Confirm with Tag Assistant.
- Are the conversion ID and label correct?
- Does the trigger fire on the right page or event?
- Does a consent tool block the tag?
- Did you complete a real test conversion on the site?
Also, you can follow the status in the goals summary in Google Ads. Menu names can change, but the status column usually lives there.
If you did everything and still see no record, also consider reporting delay. Our article on conversion lag and why yesterday's data misleads covers it.
What should you watch with WordPress and plugins?
CMS plugins make setup easier, but they reduce control. Above all, remember the risk that a plugin and Tag Manager send the same action.
In practice, we suggest these rules:
- Send the same conversion through one path only.
- Read from the plugin settings which events it sends.
- Test the conversion again after every plugin update.
- Check whether the code disappeared when you change a theme.
A theme change or a new form plugin can silently break the tag. So make a test conversion a habit after any large change.
Also think about site speed. So every new tag adds some load to the page. Clean up unused tags. Besides, mind data privacy. Tags can use cookies, so your site needs a cookie notice and, where needed, a consent mechanism. This guide is not legal advice, so confirm your obligations with your own advisor.
How do enhanced conversions and cookie consent affect the setup?
Enhanced conversions are a feature you add on top of existing tracking to improve measurement accuracy. According to Google's page, your tags send first party customer data such as an email address or phone number after hashing it with SHA256. The raw data is not sent.
Also, it is an extra step you can switch on after the tag setup. First make the basic conversion work correctly, then move to enhanced conversions. For details, see our enhanced conversions setup guide.
Cookie consent can also affect the tag. The Tag Assistant page says consent tools must allow Google's consent API. So test how the Google tag behaves while you build your consent banner.
For a wider view, read is Google Consent Mode v2 mandatory. We do not give legal advice here.
How do you measure phone calls and offline sales separately?
Not every conversion happens on a website. Google's help page lists phone calls and offline conversions among the conversion sources. In short, some types, such as calls through a Google forwarding number, need no tag.
So tracking only the web form can ignore part of your business. If most customers reach you by phone, set up call tracking separately.
For offline sales, meaning jobs that close by phone or in a store, you import the conversion afterward. Also, that method needs its own setup.
For details, see these guides:
- Our guide on how to track phone calls from Google Ads.
- Our walkthrough of offline conversion import.
Define each action as its own conversion, and decide on purpose which ones are primary.
How does an example scenario set up a contact form conversion with GTM from start to finish?
This is an example scenario, not real customer data. Assume a service business wants to measure its contact form.
In practice, the setup runs like this:
- Create a new conversion action named contact form in Google Ads and choose the lead category.
- Mark the action as primary.
- Copy the conversion ID and the label.
- Open the Google Ads conversion tracking tag in Tag Manager and paste the values.
- Attach the trigger to the thank you page that opens after a successful send.
- In preview mode, send a test submission from your own device.
- Confirm in Tag Assistant that the event was sent.
- Publish and wait for the first real record.
Tag your ad links too. So open the UTM link builder and enter source, medium, and campaign name. That way you can tell which ad brought which form in your analysis.
Still, this scenario is a starting draft. Adapt the trigger and the action type to your site structure. Also make your measurement goal shareable. If you work with a team or an agency, write down what each conversion action stands for. Otherwise, a few months later, the question of what an action counted wastes time.
What mistakes do you make most often with Google Ads conversion code?
Next, the table below shows common mistakes and fixes together. These are common situations from field experience, not a forecast or a guarantee.
| Mistake | Symptom | Fix |
|---|---|---|
| Placing the event snippet on all pages | Conversion count far too high | Tie it only to the action page |
| Entering the wrong conversion label | No record ever arrives | Copy the ID and label again |
| Leaving the value empty | Revenue shows as zero | Connect a data layer variable |
| Setting up two methods together | Double counting | Choose one path |
| Skipping the test | Months of lost data | Test after every change |
| Using the wrong trigger | Clicks count, sales do not | Tie it to the success confirmation |
In short, most mistakes come from setting things up once and forgetting them. In truth, tags can break as the site changes. So build a habit of periodic checks.
If your conversion count is low and you cannot find the reason, our sibling article answers low Google Ads conversions: where am I going wrong.
How often should you check your conversion code after setup?
Conversion code does not end with the setup. As the site changes, the tag can break. So keep a simple maintenance calendar.
Also, we suggest this rhythm:
- Weekly: look at the conversion status and the last record time.
- Monthly: compare the numbers with your own site records, such as form notifications or the order list.
- After every site change: run a test conversion after a theme, plugin, or form update.
- Every three months: clean up old unused tags and actions.
The comparison matters most. In practice, if Google Ads shows 40 conversions while your site has 25 real forms, something is wrong. This is an example case, but the logic is real.
So when you see big gaps, do not panic. Check double counting first, then the trigger, and last the reporting delay.
How long should you wait for the data to settle?
Do not expect full data right after you publish the tag. According to the official help page, after a major change in conversion goals, Smart Bidding may need one to two conversion cycles to adjust.
Then a conversion cycle is the average time between a user seeing the ad and completing the action. If your sales cycle is long, this period gets longer.
During that time, do this:
- After you confirm the tag works, avoid needless changes to bidding or budget.
- In the first days, watch whether records arrive, not the totals.
- Read reports with conversion lag in mind.
Once you are sure the setup is correct, collect data for a full business cycle. Then decide. Deciding too early can disturb even a healthy setup.
When should you ask for outside help with conversion code?
Most businesses can set up a simple contact form alone. The difficulty starts when many actions, changing order totals, several pages, a consent banner, and plugins come together.
As Talha Aslan and our team, we work in this order: measurement plan, then tag, then testing. In short, if you do not want to manage such a process yourself, or if your data looks inconsistent, outside support can speed things up.
Before you hire anyone, ask:
- Do they plan in writing which actions to measure and why?
- Do they share test evidence after setup?
- Do you keep ownership of the account and the tag access?
Promising results would not be honest. However, correct measurement is the base of every optimization decision. If you want us to review your measurement together, see our google ads agency services page.
Core guide: What Is Digital Marketing? Its types, examples and how it is done, on one page with an interactive film that travels through the brain.



