Install on WooCommerce
Add the Luria snippet to your WooCommerce store with a header plugin or child theme, and report purchases from the order-received page.
About 10 minutes
What you'll need
- A Luria account at luriart.com/app
- WordPress admin access to your WooCommerce store
- Either a header-scripts plugin (WPCode, also known as "Insert Headers and Footers") or a child theme you can edit
- Your Luria Site ID (Step 1)
Step 1: Copy your Site ID
Sign in at luriart.com/app and open Settings > Install. Copy the snippet:
<script async src="https://luriart.com/snippet.js" data-luria-site="YOUR_SITE_ID"></script>Step 2: Add the snippet to your site head
Pick one option. Option A is easier and survives theme updates.
Option A: WPCode (recommended)
- In WordPress, go to Plugins > Add New, search for "WPCode", install and activate it.
- Go to Code Snippets > Header & Footer.
- Paste the Luria snippet into the Header box.
- Click Save Changes.
Any similar plugin works (Insert Headers and Footers, Head & Footer Code, Site Kit's header field). Just make sure the box says "header" or "head", not "footer".
Option B: Child theme header.php
Only if you already use a child theme. Open Appearance > Theme File Editor > header.php (child theme), and paste the snippet on the line before </head>. Save. Don't edit the parent theme; the next update wipes it.
The WordPress Customizer's "Additional CSS" box is CSS only; it can't hold a script. You need a plugin or a child theme for head code.
Step 3: Report purchases from the order-received page
WooCommerce's thank-you page URL looks like /checkout/order-received/1234/. That does not match Luria's auto-detect patterns (/thank-you, /thank_you, /orders/<id>), so add one small hook that prints the conversion call with the order total.
Add this as a PHP snippet in WPCode (Code Snippets > Add Snippet > "Add Your Custom Code", type PHP, location "Run Everywhere"), or in your child theme's functions.php:
add_action( 'woocommerce_thankyou', function ( $order_id ) {
$order = wc_get_order( $order_id );
if ( ! $order ) {
return;
}
$total = (float) $order->get_total();
echo '<script>window.luria && window.luria.convert("purchase", ' . wp_json_encode( $total ) . ');</script>';
}, 10, 1 );This fires once per order, on the page the customer lands on after paying. Value is the order total in your store currency. If you'd rather count every order as equal, replace the convert(...) line with window.luria.convert("purchase").
Step 4: Purge your cache
If you run a caching plugin (WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache) or host-level caching (WP Engine, Kinsta, SiteGround), clear it now. Otherwise visitors keep getting the old pages without the snippet for hours.
Also check that your optimizer isn't delaying or deferring third-party scripts. Look for settings like "Delay JavaScript execution" or "Defer JS" and exclude luriart.com. A delayed snippet causes flicker.
Step 5: Verify
Open your store in a private window. In the Luria dashboard, you should see "Tracking live" within about 60 seconds. Place a test order (a 100% coupon works) and confirm it shows as a purchase with the right value.
Full checklist: Verify your install.
Troubleshooting
Check Step 3 is active and that the order-received page loads without a redirect to a custom thank-you page. If you use a custom thank-you page, add the convert call there instead (or name the URL /thank-you so it's auto-detected).
Clear caches (Step 4). Then view source on a product page and search for luriart.com. If it's missing, the plugin box or theme file isn't the one rendering the head; check your theme doesn't use a custom header template.
Exclude luriart.com/snippet.js from delay, defer, minify, and combine. WP Rocket: Settings > File Optimization > Excluded JavaScript Files. LiteSpeed: Page Optimization > Tuning > JS Excludes.
You edited the parent theme. Use WPCode (Option A) or a child theme.
Move the snippet to the header box (not footer), remove it from any "delay JS" list, and purge cache.