LuriaDocs
Install

Install the universal snippet

One script tag in the head of any non-Shopify site, what it collects, and the one line that counts a conversion on your thank-you page.

plain textupdated 2026-08-19

About 5 minutes

This is the path for everything that is not a Shopify theme: custom sites, static HTML, Next.js, Rails, Webflow, and the rest. One tag, one place.

What you'll need

  • Your tag, with your site ID already filled in. Luria gives it to you during onboarding, or by email from hello@luriart.com if you ask. The dashboard does not show your site ID yet, so do not go hunting for it.
  • A way to edit the <head> of your pages (a layout file, a template, or your platform's custom code box).

Step 1: Paste the tag into your head

The tag looks exactly like this, with your own site ID in place of YOUR_SITE_ID:

<script async src="https://luriart.com/snippet.js" data-luria-site="YOUR_SITE_ID"></script>

Put it inside <head> on every page you want Luria to work on. In a framework, that means your root layout so it ships on every route.

It loads async, so it never blocks your page, and it fails open: if anything goes wrong, your page behaves exactly as if Luria were not there. Nothing on your page is hidden while it loads.

Marketing pages, not app screens

Luria runs once per full page load. It does not hook into single-page-app routing, so a client-side route change does not re-run it. Install it on your marketing, landing and sales pages, not inside a logged-in app.

Step 2: Count your conversions

On your thank-you or confirmation page, call one line:

<script>
  window.luria && window.luria.convert("purchase", 129.00);
</script>

For a lead or a signup with no value:

<script>
  window.luria && window.luria.convert("lead");
</script>

The snippet has to be in that page's head too, and the call has to run once. Call it twice and it counts twice.

Luria also detects a conversion by itself, once per order, on paths ending in /thank-you or /thank_you, and on /orders/<token> paths. If your confirmation URL already looks like that, you can skip the call.

The same idea covers hosted checkouts. Luria does not integrate with Stripe, PayPal, ThriveCart, SamCart, Cal.com or form tools. You point the checkout at your own success page, put the snippet and the conversion call on it, and the conversion is counted there.

Step 3: Deploy and load a page

Publish the change and open your site in a private window with blockers off. That first load is what tells Luria the install is real.

What the snippet collects

Content-free events only, never customer names, emails, phone numbers or addresses. It creates a random visitor id in localStorage and sends:

  • Session start, with device type, referrer and any utm_source, utm_medium, utm_campaign
  • Page views
  • Clicks on links and buttons, with the visible label
  • The moment someone starts filling a form
  • A checkout step, when the URL path contains checkout or payment
  • Variant exposures and conversions

Events are batched and sent to luriart.com about every 1.5 seconds.

Before any of that, two gates apply. If the browser sends Global Privacy Control or Do Not Track, Luria collects nothing at all. In the EU, UK and Switzerland, and whenever the visitor's country cannot be determined, the snippet shows its own small banner ("We use analytics to measure and improve this site. May we?") with Accept and Decline, and tracks nothing until someone answers.

Verify it worked

Load a page in a private window with blockers off and open DevTools, Network tab. You are looking for requests to luriart.com/api/patches and luriart.com/api/events. Full walkthrough: Verify your install.

Common failures

  • Tag is in the body, not the head. It still runs, but visitors can see the original page first.
  • Site ID missing or mistyped. No site ID, no tracking. The snippet exits silently.
  • GPC or Do Not Track is on in your test browser. Nothing is collected, by design. Test in a clean private window.
  • You declined the consent banner in your test browser. The decision is remembered. Clear the site's local storage and reload.
  • An ad blocker is on. Luria fails open, so the page is fine and nothing is tracked.
  • Your site sends a Content-Security-Policy. Allow https://luriart.com in both script-src and connect-src. The snippet fetches /api/consent, /api/patches and /api/events from that host.
  • The snippet is installed twice. The second copy is ignored, but remove it anyway.

Next steps

On this page