> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eykdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# WooCommerce

> Connect your WooCommerce store to Eyk with REST API keys, so your orders, products and customers land in BigQuery.

Connect WooCommerce to Eyk to collect your orders, products and customers.

## What Eyk builds from this data

Eyk copies your orders, products and customers into your own BigQuery project. BigQuery is the data warehouse Eyk sets up for you. Data from all your stores lands in the same tables, so you can compare stores side by side.

| Table in BigQuery | What it holds |
| - | - |
| `fact_sales_items` | Every order line, with its discounts, refunds, shipping, taxes and costs |
| `dim_product_variants` | Your product catalog, down to each variant |
| `dim_customers` | Each customer once, with their country and marketing consent |
| `fact_attributions` | Your revenue per marketing channel, campaign and ad, for each attribution model |
| `rfm_segmentation_scores` | Each customer's RFM segment, with how recently, how often and how much they buy |
| `rfm_segmentation_segment_descriptives` | Each RFM segment, with its number of customers and their average orders and spend |

In Canvas and Alvin AI, these tables show up as **Sales**, **Product Variants**, **Customers** and **Attributions**. Attribution needs Eyk's first-party tracking on your website. Eyk builds the RFM tables when RFM segmentation is on for your organization.

Connect an ad platform too, to see your return on ad spend and your profit after ad spend next to your sales. To open your BigQuery project, click **Google BigQuery** at the bottom of the Eyk sidebar.

## Before you start

You need:

* Access to **WooCommerce** >> **Settings** in your WordPress admin.
* Access to the **Sources** page in Eyk.

Setup has two parts. First you create REST API keys in WooCommerce. A REST API key is a password that lets Eyk read your store data. Then you enter the keys in Eyk.

## Part 1: Create REST API keys in WooCommerce

**1. Open REST API**

In your WordPress admin, go to **WooCommerce** >> **Settings** >> **Advanced** >> **REST API**.

**2. Add a key**

Click **Add key**. Enter a description, like `Eyk`, and set **Permissions** to **Read**.

**3. Generate the key**

Click **Generate API key**.

**4. Copy both keys**

Copy the **Consumer key**, which starts with `ck_`, and the **Consumer secret**, which starts with `cs_`. You need both in Part 2.

> [!WARNING]
>
> WooCommerce shows the consumer secret only once. If you lose it, create a new key.

## Part 2: Add the source in Eyk

**1. Open the source library**

In Eyk, go to **Sources** and click **Add new source**.

**2. Select WooCommerce**

In the **Data source library**, click **Add** next to **WooCommerce**.

**3. Enter your store details**

Enter your store address under **Store URL**, like `store-name.com`. Paste the keys from Part 1 under **Consumer Key** and **Consumer Secret**.

![WooCommerce source form in Eyk with the Store URL, Consumer Key and Consumer Secret fields](https://mintcdn.com/eyk-data/bLMX2sfOr9PtO8G_/images/sources/woocommerce-eyk-form.png?fit=max\&auto=format\&n=bLMX2sfOr9PtO8G_\&q=85\&s=b12b5f6ec41e32556f8fa1d6b847ee25)

**4. Add the source**

Click **Add source**.

## Check it worked

In Eyk, go to **Sources**. WooCommerce is in the list with the text **Your data source is connected.** Eyk updates your BigQuery tables every night.

## Troubleshooting

> [accordion] WooCommerce shows Attention needed
>
> Open the WooCommerce source in Eyk and check the store URL and keys. If a key no longer works, create a new key in WooCommerce and enter it there.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.