How to Add Conversion Tracking Code to Woocommerce
Posted: Sun Jan 05, 2025 9:56 am
In this section, you will learn how to add Google Ads tracking code to your Woocommere store. If your eCommerce store sells products with different prices, you will need to make a small change to the conversion tracking code to pass the purchase price to Google Ads. By default, when a transaction is successfully completed (after checkout), users are redirected to the Woocommerce "Order Received" page.
WooCommerce Checkout Flow
Adding the code requires editing your functions.php file. If this task is too complex for you, it is better to ask a developer for help. Basically, all you need to do is edit the functions.php file and add the following code. This code is executed when an order is completed. It gets the order cost and sends it to Google Ads.NOTE: You should replace 'AW-XXXXXXXX/d_qrCN6n1NoBENj-guAD' with the tracking code provided by Google Ads.
How to Test Conversion Tracking in Google Ads
There are two ways truemoney database to check if the conversion tracking code has been added correctly. The first way is to check the conversion report in Google Ads, and the second way is to use the Google Tag Assistant tool .
How to Check Conversion Status in Google Ads
Sign in to your Google Ads account.
Click on the Tools option (top right corner)
Click Conversions (in the Measurements section).
Look at the tracking status column if the status code is:
Conversion Tracking Status Column
No recent conversions or conversions by record , then everything is fine. Unverified , then you should try to go to the pages where you added the code or make a test purchase and check again in 24 hours. How to check the tracking code using Google Tag Assistant . Go to Google Tag Assistant and click the ADD DOMAIN button. Enter the domain of your site and click the CONNECT button.
Google Tag Assistant
A new window will open. Go to the pages on your site where you added the tracking code (you may need to create a few test transactions), and then return to the Google Assistant window to view your reports.
Google Tag Assistant Reports
Find the Google Ads container and click on the ERRORS column to view all problem messages.
WooCommerce Checkout Flow
Adding the code requires editing your functions.php file. If this task is too complex for you, it is better to ask a developer for help. Basically, all you need to do is edit the functions.php file and add the following code. This code is executed when an order is completed. It gets the order cost and sends it to Google Ads.NOTE: You should replace 'AW-XXXXXXXX/d_qrCN6n1NoBENj-guAD' with the tracking code provided by Google Ads.
How to Test Conversion Tracking in Google Ads
There are two ways truemoney database to check if the conversion tracking code has been added correctly. The first way is to check the conversion report in Google Ads, and the second way is to use the Google Tag Assistant tool .
How to Check Conversion Status in Google Ads
Sign in to your Google Ads account.
Click on the Tools option (top right corner)
Click Conversions (in the Measurements section).
Look at the tracking status column if the status code is:
Conversion Tracking Status Column
No recent conversions or conversions by record , then everything is fine. Unverified , then you should try to go to the pages where you added the code or make a test purchase and check again in 24 hours. How to check the tracking code using Google Tag Assistant . Go to Google Tag Assistant and click the ADD DOMAIN button. Enter the domain of your site and click the CONNECT button.
Google Tag Assistant
A new window will open. Go to the pages on your site where you added the tracking code (you may need to create a few test transactions), and then return to the Google Assistant window to view your reports.
Google Tag Assistant Reports
Find the Google Ads container and click on the ERRORS column to view all problem messages.