<head> so it loads on every page — shop, cart, and checkout included. Then measure sales by tracking a purchase on the order-received page.
Before you start
- A tinyanalytics site. If you don’t have one yet, follow the Quickstart.
- Your snippet from Settings → Tracking in your dashboard.
Add the snippet to your header
The simplest method works on any WordPress site and survives theme updates:1
Install a header code plugin
From Plugins → Add New, install and activate a headers-and-footers code plugin.
2
Paste the snippet into the header
In the plugin’s settings, paste your tinyanalytics snippet into the header (
<head>) section and save.header.php), see the WordPress guide — every WordPress install method applies to WooCommerce.
Track purchases
Because your WooCommerce checkout runs on your own site, the tracker is present on the order-received (thank-you) page. Fire a custom event there to record each completed order, and include the order total as revenue:Verify
Open your store in a browser, then check Realtime in your dashboard for your visit. Place a test order and confirm thepurchase event appears in your Events report. See Verify your setup for the full check.
Your install is working when your own visit appears in Realtime and a test order’s
purchase event appears in your Events report.Related
Install on WordPress
Every WordPress install method applies here.
Track custom events
Record purchases and other actions.
Goals
Turn a purchase into a conversion metric.
Verify your setup
Confirm tracking works.