WooCommerce

The WooCommerce connector gets your WooCommerce data into Google Sheets and Google Data Studio. Use it to track your key metrics in a spreadsheet or a Google Data Studio report.
What you can report on
- Orders, revenue, and average order value
- Product and category-level sales performance
- Customer purchase history and repeat order rates
- Refunds, coupons, and discount usage
- Tax, shipping, and net revenue breakdowns
- Orders that are not paid or completed yet, for example Cash on Delivery orders. See Report on unpaid and Cash on Delivery orders.
Prerequisites
- A WordPress site with WooCommerce installed
- A WooCommerce REST API Consumer Key and Consumer Secret. See How to get your credentials.
- A store that accepts REST API requests from outside. If a security plugin, a WAF or your host restricts access by IP address, see IP whitelisting.
How to get your credentials
- Sign in to your WordPress admin. Then open WooCommerce › Settings › Advanced › REST API.

- In the Keys/Apps section, select Create an API key.

- Fill in the form:
- Description: a label for this key, for example "Two Minute Reports"
- User: the WordPress user who owns the key
- Permissions: select Read/Write

- Select Generate API key.

- WooCommerce shows your Consumer Key and Consumer Secret. Copy them and save them now.

How to create a connection
- In the Hub, open Connections & accounts.
- Select Create connection.
- Select WooCommerce in the connector list.
- Select Next.

- In Name the connection, enter a name.
- Enter the web address of your store in Store URL.
- In API key, paste your Consumer Key. In API secret, paste your Consumer Secret. If you don't have them yet, see How to get your credentials.
- Select Test and save.


- Enable the accounts you want to report on.
- Select Done.

How to get WooCommerce data into Google Sheets or Google Data Studio
To get WooCommerce data into Google Sheets:
- In the Two Minute Reports sidebar, open Data Queries.
- Select Add.
- Select the accounts you want to report on. You can select more than one.
- Select your metrics and dimensions.
- Select the date range.
- Set sorting and filters if you need them.
- Select Run query. Two Minute Reports adds the data to your sheet.


To get WooCommerce data into Google Data Studio:
- In the Hub, open Google Data Studio › WooCommerce.
- Select Create report.

- Select or create a query config:
- To use a query config you have: select it in Choose your query config. Then select Save.
- To create a query config: if you already have one, first select Create new query config in the list. Enter a name in Name your query config, and select the accounts in Select your accounts. Select Save.


- Select Create from scratch. If templates show under Quick start from a template, you can select one instead.

- Looker Studio (formerly Google Data Studio) opens in a new tab, with the Two Minute Reports connector. If you are in more than one team, select your team in Select your Team.
- In Select Query Config, select your query config.
- Select Connect in the top-right corner.

- In your new report, add WooCommerce metrics and dimensions to the canvas.

Report on unpaid and Cash on Delivery orders
The Sales metrics, for example Total sales and Net sales, count an order only when it is paid or completed. The WooCommerce Analytics report does the same. If your store uses Cash on Delivery, an order can stay in Processing, On hold or a custom status for some days. During that time, the Sales metrics do not include the order. Thus, your totals can be lower than the totals in WooCommerce Admin.
To include all the orders, use the metrics in the Sales (including pending) group. These metrics count each order, also when it is not paid or completed. Each metric in the group has the words (including pending) in its name, for example Total sales (including pending) and Gross sales (including pending).
Why the totals are different from the Sales metrics
The two groups use different dates:
- The Sales (including pending) metrics use the date when the order was created.
- The Sales metrics use the date when the order was paid or completed.
Thus, for the same date range, the two groups count different orders. Total sales (including pending) is not equal to Total sales plus the unpaid orders. Also, Total sales subtracts refunds, but Total sales (including pending) does not. Use one of the two groups in a report. Do not compare them side by side.
Fields that you can use with these metrics
You can use the Sales (including pending) metrics only with these fields:
- The dimensions in the Order details (including pending) group, for example Order date (including pending) and Order month (including pending). Use these dimensions in place of the fields in the Time group, for example Date and Month.
- The dimensions in the Orders group, for example Order number, Order status, Order payment method title, and the billing and shipping fields. You cannot use Order ID, or the tax line, shipping line, fee line and coupon line fields of the order.
- The Store dimensions: Store name, Store description and Store URL.
If you add a different field, Two Minute Reports shows an error and does not run the query. This applies, for example, to Total sales, the metrics in the Orders group, Date, and the fields in the Customers, Products and Line items groups. These fields can make the totals too large.
Get one row for each order
A query gives one row for each different set of dimension values. For example, you select only Order billing email and Order status. Two orders from the same customer with the same status then show as one row. To get one row for each order:
- Add the Order number dimension. Each order then has its own row.
- If the query gets data from more than one store, also add Store URL. Two stores can have the same order number.
- Add the metrics and the other dimensions that you want.
IP whitelisting
Two Minute Reports reads your store over the WooCommerce REST API, from outside your site. A security plugin (Wordfence, Sucuri, iThemes Security), a WAF such as Cloudflare, or IP rules set by your host will block those requests. The block is usually silent, and often intermittent, which looks like a store that stops returning data for no reason.
Two Minute Reports connects from these fixed IP addresses. Add all 5 to your security plugin, your WAF and your host's firewall before you create the connection. Allowing only some of them gives you a connection that works until a request leaves from one of the others.
49.13.34.182
5.75.217.220
116.203.164.91
95.216.182.151
91.99.28.86Where you add them depends on what is doing the blocking. A security plugin keeps an allowlist in its firewall settings. A WAF keeps IP access rules. A managed host may need them added from its control panel, or by its support team. If you aren't sure which of the three is refusing the request, add the addresses to all of them.
Still blocked after adding all five? See Connection blocked by a firewall or IP allowlist.