×

How to Set Up WooCommerce Google Ads Conversion Tracking

Sofiia Wycisk

Last Modified on July 12, 2024

Do you want to analyze your users’ activity on your ad campaigns to organize the traffic to your website? 

One of the most valuable actions for marketers is tracking purchase values and conversions. 

In this guide, we’ll set up WooCommerce Google Ads conversion tracking via Google Tag Manager.

We’ll learn to implement a purchase conversion and track its value with dynamic values for WordPress WooCommerce on our website by creating Tags and implementing them. 

An overview of what we’ll cover:

Let’s start! 

Why Do We Need to Set Up Conversion Values? 

Conversion value enables us to see the revenue in our conversion reports. 

It’s crucial to know how much profit you’re generating with Google Ads to keep track of your return on investment.

You can generate even more profit using this value for your campaign optimization and thus increase your conversion rate. 

🚨 Note: Learn how to optimize Google Ads Campaign using the top five strategies.

The total value of your conversions can also help you identify which keywords, ad groups, and campaigns have the best performance. 

Additionally, you can also use it for your bidding strategies to boost your campaign performance.

Today, we’ll dive into the implementation of eCommerce stores built with WordPress WooCommerce.

So let’s start setting up our conversion with dynamic values! 

Setting up a Conversion in the Ads Account

On the home screen of your Google Ads account, navigate to Tools & Settings → Conversions

Accessing the conversions from the tools & settings section of the Google Ads account

We’ll choose the Website option, as we’re implementing the new conversion for your eCommerce store. 

Choosing the website method to implement the tracking of conversions

If you’re not sure about which option to choose, we recommend you read a complete overview of each step

Once done, we’ll choose our category as Purchase. Let’s also give this conversion a name. 

We’ve made the conversion as Purchase with a value

Adding purchase as the category and adding the purchase with value option for selecting the action to track conversions

It’s always a good habit to have your own naming conventions for your campaigns. 

This results in a better navigation process and facilitates your workflow by keeping everything well-structured and organized. 

Moving forward, we’ll keep the Use different values for each conversion option for implementing the values of the conversions as we can have multiple products to offer to customers. 

Here, you should also provide a default value for your purchase conversion. One of our next steps will be the implementation of dynamic values. 

If your dynamic values are missing or not working properly, the default value you entered here will be used and shown later in your report. 

Under the Count category, select Every in the count section, as each purchase is valuable to us.

Configuring the values and counts for tracking the conversions by creating a conversion action for your website

Once done, click on Create and continue to save and proceed.   

Next, we have to add the dynamic variables. There are several ways to do this, and this is why you should understand how your Google Tag Manager is implemented. 

Let’s check how the Google Tag Manager is implemented on your webpage to find the optimal data layer solution. 

Verifying Google Tag Manager Implementation

You can verify Google Tag Manager implementation by two various methods. 

The first option is to implement it in the code directly or with a plugin different from GTM4WP. 

We will also need a data layer to grab our dynamic values from it. We suggest you find a solution for your situation in case you don’t already know. 

The next option enables us to implement it with the help of the GTM4WP plugin. 

We’ll use this method for today’s guide. It’s frequently used for GTM implementation, so we decided to focus on it.

On your WP admin panel navigate to PluginsInstalled Plugins.  

Search for Google Tag Manager for WordPress, and click on Settings

Accessing the GTM settings from the installed plugins section of the WordPress admin channel

Once done, go to IntegrationWooCommerce from the opened window. 

Select a tick on Track enhanced e-commerce and save your changes.

Selecting the enhanced eCommerce tracking option from WooCommerce section of the Integration section

However, we still need to check if the data layer is working properly by making a test purchase that helps us in analyzing the situation. 

Let’s see how.

Making a Test Purchase to Analyze

Even when you add a product to the cart, you should see the eCommerce data with the help of the extension by simply clicking on it.

Accessing the datalayer checker plugin from the website browser

You’ll be able to see that the eCommerce object is displayed and contains our desired value.

In our case, it’s ecommerce.purchase.actionField.revenue, and you can even copy the key directly from the extension. 

Copying the conversion key from the datalayer checker plugin from the website browser

We can also use the GTM preview to see what is happening on the webpage. You should click on the Data Layer to see the object we’re going to grab dynamic values from. 

If you’re not sure how you can access the needed value in the JavaScript object, you can also use the extension mentioned above.

Choose one of your products and make a test purchase. In this way, you can see what you can use for your variable setup. 

Since we have to track purchases, we’re interested in tracking a purchase confirmation. 

We can see the event gtm4wp.orderCompletedEEC that’s sent by the plugin when a user makes a purchase, and we’ll use it for our trigger. 

Verifying the data layer values from the fired events in the GTM section of the website

Next, we’ll see how to add a corresponding trigger for our Tag. 

Creating a Tag With The Correct Trigger

We choose the GTM option in the Ads account, and there you’ll find your Conversion ID and Conversion label.

Accessing conversion ID and the conversion label from the Tag setup section

💡 Top Tip: Since the implementation is done via GTM, check if your conversion linker is there, and ensure accurate Ads conversion tracking.

Configuring the conversion ID and the conversion label into a Google Ads conversion tracking Tag

Next, we’ll add our dynamic variable. Click on the gray plus next to the conversion value and create a new Data Layer Variable

Choosing data layer variable as the variable type to configure in a Google Ads conversion tracking Tag

Next, paste the copied key into the variable name field. We named our variable as Revenue, but you can use any name you prefer.

Do exactly the same steps for your transaction ID. To avoid duplicate conversions, we should create one more data layer variable for the order ID. 

Sometimes customers might buy products and save a confirmation page to check it one more time, or simply reload it after purchasing items. 

If you have a transaction ID set up in your Tag, Google Ads is smart enough to understand that the second conversion with the same transaction ID is a duplicate and it won’t be counted.  

We made our test purchase and identified the trigger condition to be used. 

Configuring the conversion ID and the conversion label into a data layer variable

Let’s add a Custom Event type trigger. We’ll choose the event sent by a data layer gtm4wp.orderCompletedEEC to make sure our dynamic values are available at that stage. 

Therefore, we fire our trigger on All Custom Events for our trigger and copy its name. This event can be seen in the preview or in the extension as well.     

Configuring the event name and the trigger type into a custom event trigger

Lastly, we’ll test the work we’ve done.

Testing

Let’s preview our implementation. We have to make a test purchase again to check if our Tag is firing. 

If the configuration is done correctly, we’ll see that our Tag has fired. 

Verifying the fired Tags for a purchase on the website from the GTM section of the browser

However, the firing tag is not enough in our case, as our main goal is to track revenue. Therefore, we should also check the Variables section to see if our Revenue is displayed correctly.

Verifying the conversion revenue for a purchase on the website from the variables section of the GTM section of the browser

Your implementation is successful if your values are mentioned correctly. Don’t forget to publish your container. 

FAQ

How do I verify the Google Tag Manager implementation?

There are two methods to verify Google Tag Manager implementation:
Method 1: Direct Implementation
Implement GTM directly in the code or with a plugin other than GTM4WP.
Method 2: Using GTM4WP Plugin
1. In WordPress admin panel, go to Plugins → Installed Plugins.
2. Search for “Google Tag Manager for WordPress.”
3. Access the settings.
4. Enable the “Track enhanced e-commerce” option under Integration → WooCommerce.

How can I make a test purchase to analyze the implementation?

To make a test purchase:
1. Add a product to the cart on your website.
2. Use a data layer checker plugin to verify if the eCommerce data is displayed correctly, including the desired value.
3. Use GTM preview or Data Layer to inspect the JavaScript object and identify dynamic values for your variable setup.

What should I do if my dynamic values are missing or not working properly?

If your dynamic values are missing or not working properly, then:
1. Ensure data layer is implemented correctly and values are accessible.
2. Double-check variable configuration in Google Tag Manager.
3. Use the correct keys.
4. Use data layer checker plugin or GTM preview to inspect and troubleshoot values.

Summary 

Now, you should be able to implement a purchase conversion with dynamic values for WordPress WooCommerce without any problems. 

This method helps you get a better understanding of your audience set and helps in customizing your ad campaigns. 

Moreover, you can also implement Facebook Pixel as well as Google Ads conversion tracking for an even better tracking experience on your website. 

Did you set up your conversions successfully? What naming conventions do you use for your campaigns? Let us know in the comments below!

Sofiia Wycisk

Sofiia is a web analytics instructor and consultant at MeasureSchool. She holds a Google Analytics certification from Google Digital Academy. She loves solving tracking riddles and strives to share her passion for technologies with other marketers.

Related Posts

Retargeting without Cookies blog featured image

Retargeting Without Cookies [Ultimate Guide]

Usman Qureshi

How to Build Google Analytics 4 Dashboards blog featured image

How to Build Google Analytics 4 Dashboards

Eric Huguenin

Subscribe
Notify of
guest
11 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Julian Juenemann
Admin
Julian Juenemann
2 years ago

great post

maria
maria
2 years ago

Awesome! Thank you very much! This is a wonderful article

Daniel Dao
Daniel Dao
2 years ago

It could be clearly. If you have a video about this post. Thank you

Dustin M
Dustin M
2 years ago

Any info on the best way to implement Enhanced Conversions in Woocommerce?

Julian Juenemann
Admin
Julian Juenemann
2 years ago
Reply to  Dustin M

I would recommend a combination of a dataLayer implementation + GTM.

Milovan
Milovan
2 years ago

Any idea which variable to use for Customer data (customer email), as that is not in the dataLayer code? Thanks

Gultekin
Gultekin
2 years ago

Thanks for a very detailed article… very clear and smooth!

Mark
Mark
2 years ago

Hi, great post i have did it for google ads, Thank you so much! Is this works with bing ads too? Or any related post about woocommerce+ bing ads tracking?

NOW IT'S TIME TO

Start Measuring Like A Master

Itching to jump into the world of MeasureMasters? This is what you have to look forward to.

Ready to take your digital marketing to the next level?

Subscribe to our newsletter and stay ahead with our latest tips and strategies.