How to setup WooCommerce Event Tracking in GA4 and Facebook Pixel

Learn how to Setup WooCommerce Google Analytics (GA4) Conversion Tracking” and send your event data to ad platforms.

R
Rohan
Jul 8, 2024 5 min read

Setting up woocommerce event tracking can be extremely complicated. And imagine doing it without a developer; it would become an endless journey. 

Trust me, it will be a nightmare, with writing codes, placing them and everything.

To make your job easy, I have decided to introduce you to an easy way of implement woocommerce tracking with GA4 and Facebook Pixel.

In this guide, we’ll cover how to set up Google Analytics 4 (GA4) and Meta (Facebook) Pixel for WooCommerce easily, step by step. Plus, we’ll show you how 1PD Ops makes the whole process faster, easier, and (dare we say?) painless.

Setting up WooCommerce Event Tracking in GA4 and Facebook Pixel

Step 1: Create Your CustomerLabs Account

Start by creating an account on CustomerLabs.

  1. Go to the Sign Up page.

  2. Choose to register with either your Gmail account or your work email address.

customerlabs signup form to create an account 1

  1. Enter the required personal details when prompted.

customerlabs signup form to create an account 2

  1. Provide your company information in the next step.

customerlabs signup form to create an account 3

After submitting the details, you’ll be taken directly to the product’s home page.

Step 2: Install the CustomerLabs Tracking Code

Once your account is created, you’ll need to install the tracking code on your website.

  1. After your account is created, you’ll land on the Home page, where your website URL will appear inside a box. Click Save to confirm your domain.

customerlabs dashboard to connect the domain -

  1. Once the domain is saved, copy the tracking code provided and insert it inside the <head> tag of every page you want to monitor.

The image shows the customerlabs dashboard which has the screen to copy the tracking code provided and insert it inside the <head> tag of every page on the website

Verifying Tracking Code Installation

1. If the tracking code is correctly installed, you’ll begin receiving the default pageview event. You can confirm this on the Home page by clicking Verify Event Data.

the image shows the creen to verify event data inside customerlabs

You should see pageview events appearing.

this image shows all the events to verify whether the event are properly flowing into the system

2. If the code wasn’t added properly, no event data will show up.

This image indicates that if the setup is not smooth, the event data will not appear and the screen will show error as "Event data not received"

3. For troubleshooting, open the website you want to track → Right-click anywhere on the page → Select Inspect → Navigate to the Sources tab at the top.

4. If you find the highlighted tracking script in the Sources panel, the installation is successful.

The image indicates if he highlighted tracking script in the Sources panel is seen, the installation is successful

5. From here, you can begin tracking additional events using the No-Code Event Tracker.
(If you’re on a direct e-commerce platform, follow the respective integration guide linked above.)

This step ensures that CustomerLabs starts receiving default website events like page views.
Read on how to improve your woocommerce store retargeting using 1PD (First-party data)

Setup Woocommerce Google Analytics conversion tracking for free - Grab the free trial now

Step 3: Integrate WooCommerce with CustomerLabs

CustomerLabs provides a WooCommerce plugin to make things simple.

1. Sign in to your WordPress admin dashboard.

the image shows the dashboard of WordPress website and indicating the plugins option

2. Search for the CustomerLabs WooCommerce plugin and install it.

The image shows Search for the CustomerLabs WooCommerce plugin and click on install.

3. In your CustomerLabs account, locate your App ID (also referred to as Account ID).

This image shows CustomerLabs account, locate your App ID (also referred to as Account ID.

4. Go to the plugin settings in WordPress and paste the CustomerLabs App ID into the required field.

This image shows wordpress, paste the CustomerLabs App ID

This plugin will automatically capture eCommerce events such as:

  • Product Viewed

  • Add to Cart

  • Remove from Cart

  • Checkout Started

  • Purchase

Want to track purchase events in Woocommerce? Book a consultation call today

Step 4: Select the Events You Want to Track

Inside the WooCommerce plugin settings, you’ll see a list of events.

  • Tick the boxes for the events you want to capture.

  • Click Save Changes.

This image shows the inside of the woocommerce plugin settings and tick  boxes for the events to be captured

This allows you to focus on meaningful actions without cluttering your data.

Step 5: Verify Events in CustomerLabs

After setup, test your WooCommerce store by performing actions (like adding a product to the cart).

  • Go to CustomerLabs → Events Manager in your dashboard.

  • Check if those events appear in real time.

This images shows the customerlabs dashboard -events manager where all the events gets reflected

If they do, your integration is working correctly.

Step 6: Send Events to Google Analytics (GA4)

Now that CustomerLabs is collecting events, you can send them to GA4

  1. Sign in to your Google Analytics account.

  2. Choose the account you want to connect.

  3. Go to Admin and create a new Property in GA4.

This image shows the GA4 dasboard and option to create a property or choose the existing property

  1. Once the property is created, click on Data Streams.

  2. Select Add Stream → choose Web.

This image shows the options for data stream and indicates to choose the option web

  1. Open the newly created data stream and copy the Measurement ID.

This image highlights the web stream details like url, name, and measurement ID that has to be copied

  1. Log in to your CustomerLabs account.

  2. From the menu, go to the Destinations section.

  3. Search for and select Google Analytics gtag.

This image shows the destinations inside customerlabs

  1. Click Subscribe, then open Configuration Settings.

  2. Paste the copied Measurement ID into the Website Tracking ID field.

This image shows that the copied measurement id should be pasted in the website tracking id field

This ensures GA4 receives both browser and server-side events for more accurate attribution.

Try woocommerce conversion tracking without the need of dev - get an exclusive free trail

Step 7: Send Events to Facebook Pixel & CAPI

  1. Log in to your CustomerLabs account.

  2. Go to the Destinations tab and choose Facebook.
    (Here you’ll see a list of available destinations such as Meta Ads, BigQuery, Audience Lab, Convert Fox, Customer.io, Drip, Emblue, and other custom integrations.)

This image shows the customerlabs destinations dashboard and indicates to select facebook

  1. Copy your Facebook Pixel ID, here’s how to create Meta Tracking Pixel if you do not have one:

    • Go to Meta Business Manager and select your business.
    • Navigate to Data Sources > Pixels > Click ‘Add’ near the search bar.
    • Name your Pixel, enter your website URL, and click ‘Continue’ to generate the Pixel ID.
  2. Then proceed with the Facebook option, which will redirect you to your Facebook account.

This image shows the redirection to the facebook account to itegrate facebook pixel and CAPi

  1. Authenticate your Facebook account and enable the option to send data via server-side.
    • Click on ‘Click Here’ next to ‘Not Recommended Authentication’.
    • You’ll be redirected to Meta. Choose the account you want to use for running ads through CustomerLabs.
    • Select the Meta Page associated with your business.
    • Choose ‘Select All’ (recommended) and ensure all necessary permissions are granted.
    • Once permissions are confirmed, you’ll be redirected back to CustomerLabs.

The image indicates the toggle for sending the data via server side inside customerlabs

  1. To configure workflows, go to Setup Action Workflow.

image shows the facebook configuration inside customerlabs

  1. Click on ‘Submit’ to save your configurations.

  2. Toggle the ‘Send data via server-side’ button to ON to activate Meta Conversions API for your WooCommerce store.

Image shows the toggle option to enable server side events

Important: If your WooCommerce store is directly connected to Facebook through a plugin, disconnect that integration before proceeding.

Also read on the benefits of effective event tracking.

if you want to know how to add conversion tracking code to WooCommerce Thank You Page

Your CustomerLabs integration with Meta Pixel and CAPI is now complete. You can now send all the events from both the browser and server-side to Meta Ads and boost your EMQ score.

Now, Facebook will receive your key WooCommerce events for retargeting and ad optimization.

Conclusion

Implementing effective event tracking is essential for optimizing the performance of your WooCommerce store. This not only provides insights into customer behavior but also enhances ad campaign performance across platforms like Google Analytics 4 and Meta Ads.

With CustomerLabs 1PD Ops, setting up advanced event tracking for your WooCommerce store becomes a straightforward journey—tracking a variety of user interactions from product views to purchases. 

You can also seamlessly integrate your WooCommerce store with GA4 and Meta Ads through CustomerLabs to understand the audience behavior on Google Analytics and send the event data to boost ad campaigns on Meta. 

Here’s the highlight—you achieve all this without the need for any complex coding.

Want to implement this setup for free?

Start your free trial or book a consultation call with our experts to track WooCommerce events in GA4 & Meta with zero code and 100% accuracy.

FAQ

Frequently Asked Questions

1. How do I enable conversion tracking in WooCommerce?

The quick and easiest way to enable conversion tracking in WooCommerce is through the CustomerLabs plugin. First, integrate your WooCommerce store with CustomerLabs and set up event tracking on your store. The entire conversion tracking setup for your WooCommerce store is seamless with the CustomerLabs plugin.

“Excellent first-party tracking without the gimmicks. We identify more customers than other services and feed that data back into Meta and Google to target users who are actually purchasing.”
Justin G. · Small-Business Owner G2