single php

How to Track WooCommerce Add to Cart Events in Google and Meta (Step-by-Stepย  Guide)

·

·

Without Code or developer assistance, we can set our own add-to-cart tracking. 

This saves us a lot of time, gets rid of code complexity, and stops relying on the developer to get this job done.

Because setting up add to cart setup is now easy like a user manual to set your cupboard. Just click, copy, paste, toggle on, drag, and select thatโ€™s it.

In this step-by-step guide, weโ€™ll learn how to track WooCommerce Add to Cart events accurately in both Google and Meta without GTM or custom code. Weโ€™ll walk through the exact setup, verification steps, and data is clean, reliable, and actually useful for ad optimization.

What is the right way to track the WooCommerce add-to-cart event

To stay ahead of the game, WooCommerce marketers have to adapt to the advanced tools that help collect data effectively, play around with it, and sync with Google Ads without any signal loss. 

One of the advanced tools that helps track all the events, including the add to cart event, effectively is the CustomerLabs WooCommerce conversion tracking plugin. It also feeds Google Ads with the right audience signals. It also feeds Google Ads with the right audience signals. It offers a robust conversion tracking feature that powers your Google Ad campaigns with the right audience signals.

Note: CustomerLabs WooCommerce conversion tracking plugin also helps you track events on any website built on WordPress.

Read the blog 5 best plugins to set up conversion tracking for your WooCommerce store โ€“ their features, pros, and cons to find the right plugin..!

Banner showing the message โ€œTrack Add to Cart and Purchase events using first-party dataโ€ with a Schedule a Demo button.
Visual represents secure first-party data tracking for eCommerce events.

How to track Add to cart event using the WooCommerce Conversion Tracking plugin by CustomerLabs

CustomerLabs WooCommerce Conversion Tracking plugin offers direct integration with Google & Meta Ads for your WooCommerce store through a server-side connection. It automatically by default tracks the following events:

  • Add to cart
  • Remove from cart
  • Product viewed
  • Category viewed
  • Purchased
  • Checkout made

Additionally, you can track any custom event with the help of the CustomerLabs no-code event tracker without a developerโ€™s help.

Sometimes, when you have an iframe for the payment gateway, you are unable to track the purchase event for your WooCommerce store. In that scenario, to track the purchases made, people generally track the WooCommerce thank-you page. The CustomerLabs plugin will make it easy to track the WooCommerce thank you page without any additional effort.ย 

Hereโ€™s a step-by-step setup to track WooCommerce add to cart

Integrate CustomerLabs with WooCommerce to track visitor events along with key parameters and unify customer profiles. This unified data can then be synced across your martech stack, helping you improve attribution, targeting, and overall marketing effectiveness.

Integrate Customerlabs and WooCommerce

  • Follow these steps to start tracking events from your WooCommerce server:
  • Sign up or log in to your CustomerLabs account.
  • On the Home page, under Connect Website, enter your website URL and click Save.
This images shows the dashboard of customerlabs
  • Once the setup is successful, log in to your WooCommerce (WordPress) dashboard.
  • From the left panel, click Plugins – Add New, then search for CustomerLabs
This is the screenshot of arrow pointing towards plugin
  • Click Install now
Screenshot shows that install customerlabs plugin
  • Open the CustomerLabs App and copy the โ€œAccount IDโ€ as shown in the image below.
This image explains to copy the Accound ID in customerlabs dashboard

For the complete WooCommerce + Customerlabs setup, check out our official document along with the Facebook configuration and WooCommerce conversion tracking in Google Ads. Now, moving forward, letโ€™s get into the core section of the blog, the WooCommerce add to cart tracking that is integrated with CustomerLabs.

Integrate Customerlabs and add to cart tracking

Add-to-cart tracking helps understand exactly how shoppers interact with store before they buy. It allows you to retarget visitors who showed purchase intent but didnโ€™t convert, using more relevant and personalized messaging. It also gives clear insights to optimize website and remove friction points that stop users from completing a purchase.

  • To set up add-to-cart tracking, follow these simple steps:
  • Log in to your CustomerLabs account.
  • From the Home page, open the No-Code Event Tracker to start tracking add-to-cart events without any developer support.
This screenshot shows to click the launch no code event tracker
  • Youโ€™ll be redirected to your website, where the No-Code Event Tracker panel will automatically open.
  • Click Record Action to begin capturing the event.
  • From the Action Name dropdown, select Added to Cart (or create a custom name if needed), and set the Action Type to On Click.
Image explains the two coloum, action name and action type
  • Next, click on the Element Picker, which will take you back to your website. Once there, simply select the Add to Cart button you want to track.
This image explains to add the element picker add to cart
Image explains the add to cart feature have been added to the website
  • Once you select the Add to Cart button, youโ€™ll be taken back to the No-Code Event Tracker panel.
  • Check the Pick a common selector option and click Add details.

(Want to understand how this works? Learn more about Pick a common selector.)

Pick common selector
  • From the dropdown, choose the attributes you want to track, such as product_name, currency, product_price, and more.
  • For example, select product_name, then click the Element Picker and choose any product name on your website. Make sure to enable Pick a common selector so the rule applies across all products.
This image shows the result in appearing add to cart
  • Click Save to apply the changes.
  • In the same way, add the product_price attribute. Click the Element Picker, select the product price on your website, and make sure Pick a common selector is enabled.
In this image it shows to click element picker
  • To track currency, select JavaScript as the source, choose the appropriate currency from the dropdown, and specify the currency format (for example, USD or INR). Once everything looks correct, click Save.
This image shows to click the verify button
  • Repeat steps 10 and 11 to add additional product attributes such as product variant, size, quantity, and more.

Configure the success scenario:

  • a. If the action redirects users to a success page (like a thank-you page or confirmation page), you can track it by adding the page path, as shown in the example image.
  • b. For the Add to Cart event, thereโ€™s usually no separate success page. Instead, you can track the success confirmation message.
  • Select Static Text, then click the Element Picker and choose the โ€œItem added to cartโ€ message displayed on the website (marked with an asterisk in the image). Once selected, click Save.
This image shows to select the static text and click element picker

Alternatively, you can skip this step by clicking Next | Tracking rule.

  • Select the pages where you want this action to be tracked, then click Save to complete the setup.
Screenshot shows the drop down and select all pages
  • Finally, click the Save icon to complete and store the event setup
This image shows after all the process clcik save to implement
  • Thatโ€™s it! Your eCommerce Add to Cart event is now successfully set up and ready to track

(Note: You can also add 1P domain tracking to start tracking your user data using first-party cookies set on the server side)

Thatโ€™s it. All the events, including the add to cart event, flow into your Google Ads Meta Ads for your WooCommerce store.ย 

Now, we have WooCommerce add to cart setup for Google and Meta ads. Letโ€™s learn the benefits of using CustomerLabs 1PD Ops

Banner highlighting how CustomerLabs fixes missing Add to Cart events with a Book a Demo call-to-action.
Includes CustomerLabs branding and a clean, minimal design.

What are the Benefits of using CustomerLabs to track WooCommerce add-to-cart events

Here are a few benefits you can leverage for your WooCommerce store using CustomerLabs:

When using CustomerLabs, we can create custom conversion events, such as high AOV purchases or a specific product category purchased event, and sync these synthetic events with ad platforms. These custom conversion events help WooCommerce marketers go beyond the limitations of all the other plugins, only to boost their marketing strategies, ultimately leading to increased revenue.

โ€œUsing CustomerLabs, we implemented conversion tracking effectively, which helped us see a clear spike in the overall ad campaign performance. I would recommend CustomerLabs for tracking conversions and boosting the ad performance with more signals.โ€ 

~ A Business Owner who did not want to be disclosed.

Should we optimize for the WooCommerce Add to cart event?

This is one question people often ask or think about because the goal is to get purchases. Then why optimize for adding to cart? So, the ad algorithms need enough data to run ad campaigns efficiently.

Now, letโ€™s say your ad campaign, optimized for a purchase event, does not work as expected, due to insufficient purchase data. In this scenario, you must optimize your ad campaign for the second most valuable action – checkout made/add payment info.ย 

If you still lack data, it is advisable to optimize for the add-to-cart event, get more add-to-carts, and then, in the next campaign, optimize for the purchase event.

Thatโ€™s how the entire funnel is optimized inside Google Ads for a WooCommerce store. 

Banner showing WooCommerce connected to Meta and Google Analytics via first-party data operations.
Includes a Free trial sign up button and platform icons.

Conclusion

The right implementation of conversion tracking for a WooCommerce store helps to track the add-to-cart event and other useful events accurately in Google Ads. Using the right plugin to implement event tracking can help witness the entire funnel inside Google Ads. 

As we have seen, 1P domain tracking with server-side tracking will enhance the conversion tracking, ensuring efficient attribution in Google Ads. Thus, you get to see the true performance of a Google Ads campaign.

CustomerLabs helps you go beyond tracking standard events such as add-to-cart events to give a boost to your marketing strategies and unleash the full potential of your first-party data. This flexibility and customization of events help meet the specific marketing needs of your business.

The journey of conversion tracking or event tracking does not stop at setting up the connection and event flow into Google Ads. It just starts there. Adapting the advanced marketing strategies using the conversion tracking for your WooCommerce store is the need of the hour to stay ahead of your competitors in the era of 1PD Ops or first-party data ops. Start your 14-day free trial and track for more user data. If you face any difficulties, do call our expert for clarification.ย 

Frequently Asked Questions (FAQs)

Yes, absolutely. Purchase events alone donโ€™t give ad platforms enough behavioral data, especially for new or low-volume stores. Add-to-cart tracking helps you understand drop-offs, build high-intent audiences, and train ad algorithms faster when purchase data is limited.
This usually happens due to browser-based tracking limitations, redirects, ad blockers, iframe checkouts, or poorly configured plugins. Most default WooCommerce plugins track events client-side, which leads to signal loss. Server-side tracking with first-party data significantly reduces these discrepancies.
Yes. With tools like the CustomerLabs WooCommerce Conversion Tracking plugin, Add-to-Cart, and other key events are tracked automatically using a no-code setup. You donโ€™t need GTM, custom scripts, or developer support.
If your store doesnโ€™t have enough purchase data, optimizing for Add-to-Cart (or Checkout) is a smart move. It gives Googleโ€™s algorithm more signals to learn from. Once you collect sufficient purchase data, you can switch optimization back to Purchase events.
1P domain tracking sets cookies on your own domain via server-side tracking, making data more reliable and privacy-safe. This improves attribution accuracy, reduces data loss, and sends stronger audience signals to ad platforms like Google Ads and Meta.

The latest news, perspectives, and insights from CustomerLabs

More Blogs

View all
Blog header graphic showing a browser window with a magnifying glass focusing on user icons, representing user tracking in WooCommerce. Includes CustomerLabs branding and the blog title.
How to Enable User Tracking Setup in WooCommerce

Set up WooCommerce user tracking easily and capture essential data for improved conversions and targeted marketing campaigns.

Read more
An educational banner titled โ€œHow to Track Events for Facebook with WooCommerce Conversion Tracking.โ€ The image displays WooCommerce and Meta logos connected by a flow diagram, symbolizing event tracking integration for online stores. Designed by CustomerLabs.
Complete Guide to Facebook Conversion Tracking for WooCommerce

Unlock the secrets of Facebook conversion tracking for WooCommerce to measure ad performance and boost your online sales.

Read more
Illustration of a step-by-step guide to setting up WooCommerce conversion tracking.
Detailed Overview on WooCommerce Conversion Tracking

Learn how to set up WooCommerce conversion tracking using server-side tracking, Fix Meta CAPI, GA4, and Google Ads with first-party data.

Read more

Get started with
CustomerLabs 1PD Ops

Schedule a 1-1 Demo