# WooCommerce Integration

> Complete guide to integrating AnyTrack with WooCommerce for automated conversion tracking, real-time data sync, and optimized ad performance across Google Ads, Facebook Ads, and TikTok Ads.

<Prerequisites
  title="Before you begin"
  items={[
    { label: "You have an active AnyTrack account", done: true },
    { label: "You have admin access to your WordPress dashboard", done: true },
    { label: "WooCommerce is installed and active on your site", done: true },
    { label: "You can install and activate WordPress plugins", done: true },
  ]}
/>

## WooCommerce Integration Overview

The AnyTrack WooCommerce integration automatically syncs customer behavior data between your store and AnyTrack. Once connected, you can track and measure key customer actions like:

* Product page views
* Add-to-cart events
* Purchases and other conversions

AnyTrack sends this data automatically to your connected ad platforms (Google Ads, Facebook Ads, and TikTok Ads) via their Conversion APIs, so your campaigns optimize on real purchase data instead of modeled conversions.

### What this integration does

* Sends accurate conversion data to ad platforms so they can optimize bidding and targeting.
* Tracks the full customer journey from click to purchase, across sessions and devices.
* Attributes revenue to the correct campaigns, ad groups, and creatives.

### How does the WooCommerce AnyTrack integration work?

Here's the simple 4-step process that happens automatically:

1. **Traffic Capture**: When visitors arrive on your site, AnyTrack captures UTM parameters, referrer data, and first-party data.

2. **Customer Journey Tracking**: AnyTrack automatically monitors customer interactions such as product views, add-to-cart actions, and purchases.

3. **Attribution Processing**: Conversion data is processed and displayed in your AnyTrack dashboard reports.

4. **Ad Platform Sync**: AnyTrack sends conversion data to your advertising platforms via their Conversion APIs. This powers campaign optimization and audience targeting.

### Technical Details

| Reference          | Value         | Information                                                              |
| ------------------ | :------------ | ------------------------------------------------------------------------ |
| Tracking Group     | `WooCommerce` | Use this to activate the integration programmatically.                   |
| Subid Parameter    | `click_id`    | The click ID passed and stored in WooCommerce.                           |
| Integration Method | `Plugin`      | The official AnyTrack plugin tracks both browser and server-side events. |

### WooCommerce Standard Events and Conversions

| Event Name         | Description                                               | Data Source | Meta Ads Mapping |
| ------------------ | --------------------------------------------------------- | ----------- | ---------------- |
| `ViewContent`      | A visitor views a product page                            | JS          | ViewContent      |
| `AddToCart`        | A visitor adds an item to the cart                        | JS          | AddToCart        |
| `InitiateCheckout` | A visitor begins the checkout process                     | JS          | InitiateCheckout |
| `AddPaymentInfo`   | A user enters payment information                         | Server      | AddPaymentInfo   |
| `Purchase`         | A user completes a purchase                               | Server      | Purchase         |
| `Upsell`           | A user orders a product set as Upsell through FunnelKit  | Server      | Upsell           |

> 📘 **Note**
>
> These events are automatically mapped to corresponding ad platform events to ensure accurate attribution.

> ⚠️ **Event Mapping is fixed**
>
> Event Mapping for the WooCommerce integration cannot be changed. The events above are sent automatically to your connected ad platforms via the Conversion API.

### The WooCommerce Plugin

The [AnyTrack Plugin for WooCommerce](https://wordpress.org/plugins/anytrack-for-WooCommerce/) lets you connect your store, track conversion events, and send them to your ad platforms through the AnyTrack Conversion API. If you need to install the [Tracking Tag](/docs/install-anytrack-tag) separately, the plugin handles this automatically.

***

## Setup Guide

### Step 1: Set up the integration in AnyTrack

1. In the [AnyTrack Dashboard](https://app.anytrack.io), create a property for your WooCommerce site.
2. Open the **Integration Catalog** and add the **WooCommerce** integration.
3. Copy the **Property ID** shown in the integration setup screen.

### Step 2: Install and connect the WooCommerce plugin

1. In WordPress, go to **Plugins → Add New** and search for **AnyTrack for WooCommerce**.
2. Click **Install**, then **Activate**.
3. In WordPress, go to **WooCommerce → AnyTrack** and paste the Property ID you copied. Save.

> 📘 **Where to find the plugin settings**
>
> The plugin settings live under the **WooCommerce** menu in WordPress, not under a top-level AnyTrack menu.

<Image alt="Plugin Setup Screenshot" border={false} src={readmeAsset1} />

> ❗ **Important**
>
> Disable any other plugins that interact with ad platforms to prevent duplicate tracking.
>
> Learn about AnyTrack [deduplication](/docs/deduplication) methods.

📽️ [Watch the integration tutorial on YouTube](https://www.youtube.com/watch?v=f2fwfcd0SKg)

***

## Validate Your Integration

Use the **Event Log** in the AnyTrack dashboard to confirm WooCommerce events are flowing in. The Event Log is a new feature for WooCommerce and shows both server-side and client-side events in near real time.

1. In the AnyTrack dashboard, open the **Event Log** for your WooCommerce property.
2. In a private/incognito window on your store, trigger a `ViewContent`, an `AddToCart`, and a test `Purchase`.
3. Confirm each event appears in the Event Log within a few seconds.

> 📘 **Note**
>
> Server-side events (e.g., `Purchase`, `AddPaymentInfo`) appear with a server icon. Client-side events (e.g., `ViewContent`, `AddToCart`) appear with a browser icon. If only client-side events show up, double-check that the plugin is active and the Property ID matches the one in your AnyTrack dashboard.

You can also install the [AnyTrack Pixel Helper Chrome Extension](https://chromewebstore.google.com/detail/anytrack-pixel-helper/ojmhkmdpagjeopleoeihbhgejcfoijjn) to inspect client-side events on your store as they fire.

***

<FaqAccordion
  title="WooCommerce Integration - Frequently Asked Questions"
  icon="fa-duotone fa-circle-question"
  items={[
    {
      question: "Why don't I see conversions in the AnyTrack dashboard?",
      answer: "Start by opening the Event Log in your AnyTrack dashboard and triggering a test purchase from your store. If events do not appear, confirm the plugin is installed and active, verify the Property ID in the plugin settings matches your AnyTrack property, ensure you are using the official AnyTrack for WooCommerce plugin, check whether you have hit your plan traffic cap in the billing section, and make sure WordPress, WooCommerce, and the AnyTrack plugin are up to date."
    },
    {
      question: "Where do I find the plugin settings in WordPress?",
      answer: "Under the WooCommerce menu in WordPress, not under a separate top-level AnyTrack menu. Open WooCommerce, then AnyTrack, to access the Property ID field and integration options."
    },
    {
      question: "Can I change which event Purchase is mapped to?",
      answer: "No. Event Mapping is fixed for the WooCommerce integration and cannot be edited. If you want upsell revenue rolled into the Purchase event, use the FunnelKit option to combine sales and upsells into a single Purchase event."
    },
    {
      question: "Can I import past conversions?",
      answer: "No. AnyTrack only tracks conversions that happen after the visitor session is recorded. Historical orders placed before the plugin was installed cannot be imported."
    },
    {
      question: "Should I manually add the Tracking Tag in the head section of the site?",
      answer: "No. The WooCommerce plugin handles the Tracking Tag installation automatically. You do not need to add it manually."
    }
  ]}
/>

<Cards columns={2}>

  <Card title="Advanced Options" href="/docs/woocommerce-advanced" icon="fa-sliders" iconColor="blue-500">
    Configure client-side tracking as a fallback when the plugin cannot be deployed.
  </Card>

  <Card title="FunnelKit Integration" href="/docs/funnelkit-integration" icon="fa-filter" iconColor="blue-500">
    Track upsell and downsell conversions from your FunnelKit funnels.
  </Card>

</Cards>
