single php

How to setup WooCommerce Event Tracking in GA4 and Facebook Pixel

·

·

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 <header> 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 <header> 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.

    Frequently Asked Questions

    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.
    Event tracking is about tracking all the events in your website whereas conversion tracking is just about tracking the events that are valuable to your business, and you term them as conversions. So, conversion tracking is nothing but setting up what the conversion action is inside the ad platform and tracking that event inside it, to get the required actions of that particular event.
    Setting up event tracking with CustomerLabs 1PD Ops is straightforward. After signing up for CustomerLabs, you install the CustomerLabs ActionRecorder plugin on your WooCommerce store. Next, select the events you want to track (e.g., 'Add to Cart', 'Checkout'), and start tracking the user interactions in real-time.
    Integrating Google Analytics 4 with your WooCommerce store allows you to track the entire customer journey, giving you detailed insights into user behavior. This helps you formulate marketing strategies, and boost your WooCommerce store performance by leveraging custom audience segmentation strategies inside Ad platforms for enhanced ad personalization.
    Meta Conversions API is a server-side connection that allows you to send event data from your WooCommerce store directly to Meta Ads without signal loss. This integration helps optimize ad campaigns based on customer interactions and conversion events along with helping measure the campaign performance accurately.
    No. CustomerLabs simplifies event tracking and integrations with platforms like Google Analytics and Meta Ads through a no-code approach. Basic configuration steps and plugin installations are all that's needed to start tracking and optimizing your WooCommerce store. Itโ€™s all plug-and-play with CustomerLabs 1PD Ops.
    You can verify the event tracking is working correctly by navigating back to the CustomerLabs CDP dashboard, clicking 'Verify Event Data', and ensuring the events are being tracked in real-time.
    Install the CustomerLabs WooCommerce plugin, add your App ID, then connect Facebook Pixel under Destinations. Authenticate your account, enter your Pixel ID, and enable server-side events for accurate tracking.
    Create a GA4 property, copy the Measurement ID, and paste it into CustomerLabs under Google Analytics gtag. This ensures WooCommerce events are sent to both GA4 and Meta Ads seamlessly.
    Track key WooCommerce events like Product Viewed, Add to Cart, Remove from Cart, Checkout Started, and Purchase Completed. These cover the full customer journey for accurate reporting.
    In CustomerLabs, go to Destinations โ†’ Facebook, enter your Pixel ID, and enable server-side callbacks. Events like product views, cart actions, and purchases will flow to Facebook automatically.

    The latest news, perspectives, and insights from CustomerLabs

    More Blogs

    View all
    The blog banner of Meta Conversions API for WooCommerce
    Meta Conversions API for WooCommerce to Maximize Ad Performance

    Setup Facebook Conversions API for WooCommerce, with advanced setup to leverage synthetic event optimization & boost ad campaign performance!

    Read more
    Blog banner titled "7 best plugins for Woocommerce"
    7 Best Plugins for your WooCommerce Store

    Finding the right plugin for your WooCommerce store can be confusing and time-consuming. Here are top 7 plugins and their features.

    Read more
    A blog banner titled, "Your guide to eCommerce conversion tracking to scale your marketing"
    Guide to eCommerce conversion tracking to scale your marketing

    Here is a complete guide to conversion tracking for your eCommerce business. Find out how it helps to scale your marketing.

    Read more

    Get started with
    CustomerLabs 1PD Ops

    Schedule a 1-1 Demo