Skip to content
Facebook Twitter Github RSS
Google Tag Manager for WordPress
  • Home
  • FeaturesExpand
    • Basic features of GTM4WP

      You can use many post or page attribute in you Google Tag Manager setup even for custom post types and taxonomies.

      Basic data

      Page / post attributes

      Site search

      User data

      Multisite data

      3rd party data

      Browser attributes

      Device attributes

      Operating system attributes

      Weather conditions

  • SetupExpand
    • Setup advanced GTM4WP features

      Integrate your measurement with WooCommerce, setup Google Analytics 4, Google Ads remarketing or conversion tracking maximizing capabilities.

      WooCommerce related

      Google Analytics 4

      Google Ads – Dynamic Remarketing

      Google Ads – Conversion tracking

      Google Ads – Enhanced Conversions

      Other setup articles

      Exclude WordPress admins

      Embedded media players

  • DevelopersExpand
    • Information for developers and WP managers

      There are several tools in GTM4WP to support your special needs and to adjust plugin behavior to your website or WooCommerce shop.

      Do you want to contribute with a bugfix or a new feature? Visit the GTM4WP’s GitHub page!

      For Developers

      Actions and filters

      WP themes + Proper ecommerce tracking

      For WP managers

      Setup GTM Environments

      Hard code GTM parameters

  • Blog
  • GDPR
Download
Google Tag Manager for WordPress
Home / Google Tag Manager for WooCommerce / Google Ads conversion tracking for WooCommerce – How to setup?

Google Ads conversion tracking for WooCommerce – How to setup?

Google Ads conversion tracking for WooCommerce

Learn to setup Google Ads conversion tracking for WooCommerce purchases using Google Tag Manager and GTM4WP.

  • Easy task at first glance
  • Ingredients to setup Google Ads conversion tracking
  • Step 1: add your Google Ads conversion tracking tag
  • Step 2: enter purchase related variables
  • Step 3: Provide product-level sales data (optional)
  • Step 3: Provide new customer data (optional)
  • Step 4: Provide shipping data (optional, currently US only)
  • Step 4: Enable Restricted Data Processing if necessary
  • Step 5: Add the purchase trigger
  • Enhanced Conversions
  • Google Ads conversion tracking is easy to setup

Easy task at first glance

Setting up conversion tracking does not seem to be a complicated task. You create your conversion tag in the ad management platform, you usually get some unique IDs. A new tag here, a pageview trigger with your “thank you” page URL there and you are all set up. Easy, isn’t it?

Well, that might be the case for many conversion events but not in your WooCommerce shop if you setup your Google Ads conversion tracking code. Let’s have a look at the Google Ads (AdWords) conversion tag options in Google Tag Manager back in 2014:

Google Ads (AdWords) conversion tag in 2014

Conversion ID and label is generated by Google Ads itself. You might have one challenge with adding the end total value of the order. Now open your Google Tag Manager container for editing and add a Google Ads Conversion Tag. You will see something like this:

Google Ads (AdWords) conversion tag in 2021

And then you just look at the options and you feel like this:

Confused by the new options?

But no worries: this article will guide you through these new options. It will show you how to setup your Google Ads conversion tracking in your WooCommerce shop with Google Tag Manager and GTM4WP.

Ingredients to setup Google Ads conversion tracking

Allow me to save some text from this content and jump straight to the tag setup. Before that, you will need to go through some steps:

  • Create your Google Ads conversion code and have your conversion ID and label at hand
  • Activate WooCommerce ecommerce tracking in plugin options
  • Import the GA4 container template as shown in the GA4 tracking setup article

Step 1: add your Google Ads conversion tracking tag

I assume this is not the first time you add a tag into your container so I will skip showing you how to select the proper tag type and explain the first parameters:

Google Ads conversion ID and conversion label
  • Conversion ID: this ID is unique to your Google Ads account. Whenever you create a new conversion tracking code or a remarketing tag in the same account, the conversion ID will be the same. This is why I usually advise to save this ID into a “Constant” type variable so that it can be easily reused in your container
  • Conversion Label: this is unique to the tracking tag so this does not need to be stored in a variable, you can enter it directly into the input field.

Step 2: enter purchase related variables

Now here comes the magic: if you imported the GA4 container template as mentioned before, you will already have the proper Google Tag Manager variables to select into the next 3 input fields. This is why enhanced ecommerce data is so valuable: you can grab ecommerce data in a unified way that is actually independent of the site or the ecommerce platform.

Google Ads Conversion Value, Order ID and Currency Code parameters
  • Conversion Value: this should be the total revenue of your order. It will be stored in the data layer in the ecommerce.value key. The {{Ecommerce Value}} variable shown on the image already reads this data layer variable for you. It will be available once you imported the GA4 container template
  • Transaction ID: this parameter is useful to de-duplicate conversion values in Google Ads and prevent tracking of the same order multiple times. It is also a mandatory element to use conversion adjustments to make sure Google Ads can optimize bids towards your ROI goals and not the net revenue. This parameter is stored in the data layer variable ecommerce.transaction_id but you can simply select {{Ecommerce Transaction ID}} from the variable list
  • Currency Code: if I were the maintainer of this tag template, I would move this line above transaction ID as it is more connected to the conversion value. If you have a webshop where customers can buy your products in different currencies, it is important to let Google Ads know what currency should be used when calculating actual conversion value. This parameter is stored in the data layer variable ecommerce.currency but you can simply select {{Ecommerce Currency}} from the variable list

Step 3: Provide product-level sales data (optional)

Though this step is not mandatory for your Google Ads conversion tracking to work, it is not hard to setup and gives you additional reports in Google Ads. If you setup conversion reporting with cart data, you can better understand what product ads drove sales to different products on your site.

After putting a check mark into the “Provide product-level sales data” box, additional parameters show up:

google ads adwords provide product level sales data
  • Data Source: select “Custom Fields”
  • Merchant ID: enter your Google Merchant Center ID. If you open your GMC account, you can locate this ID at the top of the page, in the account selector dropdown, next to the name of your GMC account
  • Feed Country: the country associated with the feed where your items are uploaded. You need to use territory codes found in this XML file
  • Feed Language: the language associated with the feed where your items are uploaded. You should use ISO-639-1 codes
  • Discount: this should be the total amount of discount in the order. I will show you how to fill in this fields below this list
  • Items: this includes the product IDs, prices and quantities in the cart. Fortunately, the format of this data is exactly the same as the product data in GA4 ecommerce therefore you only need to select the GTM variable {{Ecommerce Items}}

Providing the total amount of discount is the only challenge. Here you need to do some more steps:

  • Open GTM4WP plugin settings page and go to Integration->WooCommerce
  • Locate the “Order data in data layer” option and turn it on if it is currently turned off. This will add some more data into the data layer that has nothing to do with enhanced ecommerce tracking. This option is for any other use case. In our case we will use this to easily get the total amount of discount in the order

Now go back to your Google Tag Manager container and open the Variables section, then start creating a new variable:

Create a new variable in Google Tag Manager
  • From the list of variable types select “Data Layer Variable”, then enter this value into the “Data Layer Variable Name” field: orderData.totals.total_discount
  • You may want to enter a default value to make sure this is set to 0 in case the discount value is missing for some reason
Create the Order Total Discount variable

Save this new variable, go back to your Google Ads conversion tag and select it in the “Discount” field

Step 3: Provide new customer data (optional)

This step is optional as well but with GTM4WP v1.4 or newer it is super easy to use and gives you additional advantages in your Shopping campaigns. With that, you can set your Smart Shopping campaign to focus on new customer acquisition. To make this work, you can enter an additional value in your campaign settings to have a different (higher) value for new customers in your webshop.

Turning on new customer data in your Google Ads conversion tag.

There are only two very easy steps to use this feature: turn on the checkbox and select “Data Layer” from the “Data Source” drop down. That’s it, you are all set!

Step 4: Provide shipping data (optional, currently US only)

This option is currently only useful if you are advertising in USA. Here you have the opportunity to show in your Shopping ads that you are able to ship the products fast and free of charge. You can validate your shipping settings through the Google Ads conversion tag in GTM.

Provide shipping data for your Google Ads conversion tag
  • Shipping Postal Code: here you need to enter the zip code in the order where goods will be shipped to. See the steps bellow the image
  • Shipping Country: enter the country where the goods will be shipped to. See steps bellow the image
  • Estimated Delivery Data: this is the trickiest data you need to provide. This value is not present in the data layer. To provide this data, most probably you will need to create some additional JavaScript codes in your GTM container to calculate the date based on various factors
  • Shipping Cost: enter the amount your customer needs to pay for the shipment. See the setup steps below the image

To be able to fill in postal code, country and shipping cost, you will need to create 3 more GTM variables. Make sure you turned on the “Order Data in the data layer” option as described in step 3. There you can also see how to start creating a new GTM variable with the type “Data Layer Variable”.

You will need to go through this 3 times, each time with a different data layer variable name:

  • Shipping Postal Code: orderData,customer.shipping.postcode
  • Shipping Country: orderData,customer.shipping.country
  • Shipping Cost: orderData.totals.shipping_total

After creating this 3 new GTM variables, open your Google Ads conversion tag again and enter them into the corresponding input boxes.

Step 4: Enable Restricted Data Processing if necessary

This option is mandatory if you are required to comply with the California Consumer Privacy Act (CCPA). Google Ads can change how data is sent and processed based on this value. Unfortunately, there is no one way to set this value, it is usually dependent on the consent banner on your site and the options you show to your visitors. Each consent banner stores consent states in different 1st party cookies therefore I cannot give you one solution that will work with all consent management platform.

Step 5: Add the purchase trigger

You might already have this trigger in your container, thus check it before creating a duplicate instance.

The trigger should be created with the type: Custom Event and the name of the event should be: purchase

Create a purchase trigger for your Google Ads conversion tag

Enhanced Conversions

To setup the User-Provided data section, please read the separate guide to Enhanced Conversions.

Google Ads conversion tracking is easy to setup

Though not all options are available immediately, most of them can be setup very quickly and without programming knowledge. Delivery time is one exception but hopefully you will have someone to help with that too.

© 2025 Google Tag Manager for WordPress - Privacy policy

  • WordPress.org plugin page
  • Plugin support
  • Plugin reviews
Cookies are not evil
This website may use cookies to remember your log-in details, to optimize site functionality for your use, and deliver marketing based on your interests.

This does not include collecting any personal data of you. In any case we need to process any of your personal data, we will ask for your specific consent later for sure.

Accepting this message only means that we will be able to analyze site content performance using larger buckets of users and to deliver tailored messages to those user buckets. We will be not able to analyze your activity alone especially not in a way where your name or any personal data of you is attached to this analysis.

Accept Settings
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-*1 yearUsed by the cookie consent manager of this website to remember your choice of cookie usage.
gtm4wp_last_weatherstatusend of user sessionUsed by a plugin of this WordPress website to dump debug related non-personal data about the weather data identified during your site visit.
Advertising
Tracking codes that could be used to tailor our messages based on your interests. This does not mean that we will be able to track your activities alone especially not in a way that would allow us to connect your name or other personal data to your website activities.
Statistical
Tracking of website usage without using any feature that would involve personal data processing either by us or by our tracking vendor. This includes IP address anonymization and disabling features related to interest based advertising.
Save & Accept
  • Home
  • Features
    • Basic features of GTM4WP

      You can use many post or page attribute in you Google Tag Manager setup even for custom post types and taxonomies.

      Basic data

      Page / post attributes

      Site search

      User data

      Multisite data

      3rd party data

      Browser attributes

      Device attributes

      Operating system attributes

      Weather conditions

  • Setup
    • Setup advanced GTM4WP features

      Integrate your measurement with WooCommerce, setup Google Analytics 4, Google Ads remarketing or conversion tracking maximizing capabilities.

      WooCommerce related

      Google Analytics 4

      Google Ads – Dynamic Remarketing

      Google Ads – Conversion tracking

      Google Ads – Enhanced Conversions

      Other setup articles

      Exclude WordPress admins

      Embedded media players

  • Developers
    • Information for developers and WP managers

      There are several tools in GTM4WP to support your special needs and to adjust plugin behavior to your website or WooCommerce shop.

      Do you want to contribute with a bugfix or a new feature? Visit the GTM4WP’s GitHub page!

      For Developers

      Actions and filters

      WP themes + Proper ecommerce tracking

      For WP managers

      Setup GTM Environments

      Hard code GTM parameters

  • Blog
  • GDPR
Search