Recommended: the Optimads plugin for WordPress.
- In Accounts, connect the WooCommerce store (URL + API keys — read-only keys work too).
- In Tracking → Configuration → Store install → WordPress / WooCommerce, click Download plugin: you get a zip pre-configured for your account.
- In WordPress: Plugins → Add New → Upload Plugin → choose the zip → Install Now → Activate.
The plugin puts the code on every page by itself, captures ViewContent / AddToCart (on any form) / InitiateCheckout / Purchase, saves the click identifiers on each order and sends orders to Optimads instantly, no polling. When you change the pixel in Optimads, the site updates on its own. The status shows in WordPress under Settings → Optimads.
Without the plugin: copy the code from the same section ("Manual install") and put it before </head> with an "Insert Headers and Footers" plugin. Orders then come from the connected store, within minutes.