Getting Started5 min read

WooCommerce Plugin

Install the official plugin to load the SDK and auto-track the WooCommerce commerce funnel, including revenue.

Browse docs

Install the official Otter plugin to load the SDK and automatically track your WooCommerce commerce funnel — including purchases with revenue — without touching your theme.

Whole-theme split tests

The same plugin works on WordPress without WooCommerce and can split visitors between complete installed themes. In Settings → Otter A/B Testing, approve the themes Otter may serve, confirm cache safety, choose an approved theme, and click Create a WordPress theme split test. Otter opens a prefilled site-wide wizard with the current theme as control.

The plugin selects the assigned theme for each request; it never invokes WordPress's global Switch theme action. For opt-in projects, no assignment is stored or applied until consent is explicitly granted.

Cache requirement: Exclude the otter_theme_assignment cookie from full-page cache at every cache/CDN layer, or use no full-page cache while the test runs. Theme setup stays disabled until an administrator confirms this boundary. Object caching is compatible.

Shopify gives opt-out projects a native pixel that reports completed orders with structured data; opt-in projects keep it disconnected because Shopify's pixel sandbox cannot inherit the theme consent decision. The WooCommerce plugin brings WooCommerce to the same level: it injects the Otter SDK in your site's <head> with anti-flicker, and tracks product views, searches, add-to-cart, checkout starts, and purchases for you. Order data (total, currency, line items) comes straight from WooCommerce in PHP — not scraped from the page — so your revenue numbers are exact.

Because the WooCommerce thank-you page is on your own domain, the visitor's first-party optimo_uuid cookie is available there, so each purchase is attributed to the variant that visitor saw. Revenue is deduplicated by order id, so a refreshed confirmation page never double-counts a sale.

  1. 1

    Download the plugin

    On your project's installation page, open the WooCommerce guide and click Download the WooCommerce plugin.
  2. 2

    Upload and activate

    In WordPress admin go to Plugins → Add New → Upload Plugin, choose the zip, click Install Now, then Activate.
  3. 3

    Paste your API key

    Open Settings → Otter A/B Testing, paste your project API key, and save. The SDK starts loading immediately.
  4. 4

    Verify

    Place a test order if you can, then click Verify Installation on your Otter project page. You should see commerce events arrive.

Events tracked automatically

ViewContentProduct page viewed
SearchSearch submitted
AddToCartProduct added to cart
InitiateCheckoutCheckout started
PurchaseOrder completed (with revenue)

Configure a goal against any of these event names to score it. To score revenue, add a Revenue goal with the event name Purchase — see the Goals and Revenue & Currency guides.

Under the hood, the plugin calls the SDK with the order data on the thank-you page — equivalent to:

optimo.revenue({
  value: 129.0,
  currency: 'USD',
  order_id: '1042',
  quantity: 2,
})

WordPress plugin tips

Remove any old snippet. The plugin injects the SDK for you. If you were loading Otter via a header plugin or theme edit, delete that so the SDK isn't loaded twice.

It works without WooCommerce too. The SDK loads on any WordPress site for A/B testing; the commerce events switch on automatically when WooCommerce is active.

Toggles live in settings. Anti-flicker, commerce events, and sending the customer email on purchase can each be turned off under Settings → Otter A/B Testing.

Frequently asked questions

Quick answers to the questions teams ask most about this part of Otter.