LuriaDocs
Install

Install on WordPress

Add the Luria snippet to a WordPress site (blog, lead-gen, landing pages, Elementor, Divi, Bricks) and count form submits as conversions.

plain textupdated 2026-08-19

About 8 minutes

What you'll need

  • A Luria account at luriart.com/app
  • WordPress admin access
  • A header-scripts plugin (WPCode, also known as "Insert Headers and Footers"), a child theme, or your page builder's custom code area
  • Your Luria Site ID (Step 1)

This guide is for WordPress sites that are not WooCommerce stores: blogs, lead-gen sites, landing pages, agency and service sites. Selling with WooCommerce? Use Install on WooCommerce instead.

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 A: WPCode (recommended, works with any theme or builder)

  1. Plugins > Add New, search "WPCode", install and activate.
  2. Code Snippets > Header & Footer.
  3. Paste the snippet into the Header box. Save Changes.

Option B: Your page builder's custom code

  • Elementor Pro: Elementor > Custom Code > Add New, location <head>, paste, publish to Entire Site.
  • Divi: Divi > Theme Options > Integration > "Add code to the head of your blog".
  • Bricks: Bricks > Settings > Custom Code > Header scripts.

Option C: Child theme header.php

Appearance > Theme File Editor > header.php in your child theme, paste before </head>, save. Don't edit the parent theme; updates overwrite it.

"Additional CSS" in the Customizer can't hold a script. Use one of the options above.

Step 3: Count form submits as conversions

On a non-store WordPress site the conversion is usually a form: a quote request, a contact, a download, a booking. Pick whichever is easier:

Easiest: redirect to a thank-you page. Set your form to redirect to a page whose URL contains /thank-you (for example yoursite.com/thank-you/). Luria auto-detects it. No code.

Form pluginWhere the redirect lives
Gravity FormsForm Settings > Confirmations > Redirect
WPFormsSettings > Confirmations > Go to URL (Redirect)
Contact Form 7Use the "Redirection for Contact Form 7" add-on, or the script option below
Elementor FormsActions After Submit > Redirect
Fluent FormsSettings > Confirmation Settings > Redirect to URL

Or: fire the event on submit without a redirect. Add this in WPCode's Footer box (or your builder's footer code area). It listens for the common success events and reports a lead.

<script>
  function luriaLead() { window.luria && window.luria.convert("lead"); }
  // Gravity Forms
  document.addEventListener("gform_confirmation_loaded", luriaLead);
  // WPForms
  document.addEventListener("wpformsAjaxSubmitSuccess", luriaLead);
  // Contact Form 7
  document.addEventListener("wpcf7mailsent", luriaLead);
  // Elementor Forms
  document.addEventListener("submit_success", luriaLead);
</script>

Gravity Forms fires gform_confirmation_loaded through jQuery rather than the document; if leads don't register, use the redirect approach for Gravity. Keep only the lines for plugins you use.

Step 4: Purge your cache

If you run a caching plugin (WP Rocket, LiteSpeed Cache, W3 Total Cache) or your host caches pages (WP Engine, Kinsta, SiteGround), clear the cache now so the snippet reaches visitors.

If your optimizer has "Delay JavaScript" or "Defer JS", exclude luriart.com. A delayed snippet makes pages flash the original content before Luria's version.

Step 5: Verify

Open your site in a private window and check the Luria dashboard for "Tracking live" within about 60 seconds. Submit a test form and confirm a lead appears.

Full checklist: Verify your install.

Page builders

Elementor, Divi, Bricks, Beaver Builder, and the block editor all work the same way: the snippet sits in the site head, and Luria tests changes on the page visitors see. Luria never edits your builder layouts or saved templates. Pausing Luria restores the original within about 60 seconds.

Troubleshooting

Next steps

On this page