LuriaDocs
Install

Count PayPal payments

Return PayPal buyers to a thank-you page on your own site and count the purchase there, because there is no PayPal connection to set up.

plain textupdated 2026-08-19

About 10 minutes

Luria does not connect to PayPal and never reads your PayPal account. There is no integration to switch on and no keys to paste. A purchase is counted on the page the buyer lands on after paying, on your own site, with the Luria snippet in its head.

That means the whole job is: make PayPal send buyers back to your page, then count the conversion on it.

What you'll need

  • The Luria snippet on your site, including on the thank-you page (Install on a custom site)
  • A thank-you page on the domain you registered with Luria, or a subdomain of it
  • Access to your PayPal account settings, or to the checkout code on your site

Steps

Step 1: Build a thank-you page on your own domain

Create the page buyers should see after paying, and put the Luria snippet in its <head>.

It must sit on the domain you registered with Luria, or a subdomain of it. Conversions sent from any other domain are rejected, so a PayPal-hosted receipt page cannot report anything.

Step 2: Make PayPal return the buyer to it

How you take paymentWhere the return URL lives
PayPal buttons on your own site (JavaScript SDK)Your onApprove handler: redirect the buyer to your thank-you page once the order is captured
Hosted PayPal buttons and Website Payments StandardTurn Auto Return on in your PayPal account settings, under website payment preferences, and set the return URL there
PayPal.me links, invoices, "send money" requestsNo return URL exists, so nothing lands on your site and nothing is counted

PayPal renames these screens from time to time. If the path does not match what you see, search PayPal Help for "Auto Return".

Auto Return is not guaranteed

With hosted buttons, PayPal shows its own confirmation page first and the buyer can close it before the redirect happens. Those purchases are never counted. If most of your sales go through PayPal, the JavaScript SDK path, where you control the redirect, is the reliable one.

Step 3: Put the conversion line on the thank-you page

PayPal does not pass a trustworthy amount to your return URL, so fill the value in from your own order template.

<script>
  (function wait(n) {
    if (window.luria) return window.luria.convert("purchase", 129.00);
    if (n < 50) setTimeout(function () { wait(n + 1); }, 200);
  })(0);
</script>

The snippet loads asynchronously, so the loop waits for it, up to about ten seconds. With no value to pass, use window.luria.convert("purchase"). Call it once: a reload runs it again and adds a second conversion.

If you'd rather write no code

Name the page /thank-you or /thank_you and skip the script. Luria counts that visit as a conversion on its own, once per browser, with no value attached. Auto-counted conversions appear in your totals but are not used to score your split tests.

Verify it worked

  1. Open your site in a private window with blockers off, accept the consent banner if one appears, then buy something and let PayPal return you to the thank-you page.
  2. Sign in at luriart.com/app. On Overview, "Conversions this period" goes up by one and your value shows in tracked revenue.
  3. Open the Customers tab. The converted session is listed with its source, first seen, and value.

Full checklist: Verify your install.

Common failures

  • Buyer never comes back. Auto Return is off, or the buyer closed PayPal's confirmation page. Nothing reaches your site, so nothing is counted.
  • Nothing counted although the page loaded. The snippet is missing from that page's <head>, or the site ID in the tag is wrong.
  • Return page on another domain. Only your registered domain and its subdomains can report conversions.
  • Counted twice. The line runs twice, or on reload, or on a path Luria already auto-detects. See Duplicates.
  • Testing with Global Privacy Control, Do Not Track, or an ad blocker on. Luria collects nothing in that browser, so window.luria never appears.
  • Expecting PayPal refunds to flow back. They do not. Luria never reads PayPal, so a refunded payment stays counted.

Next steps

On this page