bluebarry.
ReviewsPricingResources
Sign inBook demoBook a 15 min demo
Help Center/Launch and embed/Implementing the performance tracking script

Implementing the performance tracking script

Martijn Douma
Martijn Douma · Co-founder bluebarry
Updated September 25, 2026

The performance script tells bluebarry about the orders on your store. With it, you see how much revenue your quizzes bring in, per quiz. You add it once, on your order confirmation page, and it works for all your quizzes.

Do you need it?

  • Shopify: no. The bluebarry app tracks checkouts for you. See Track Shopify checkout conversions.
  • WooCommerce: no. The plugin sends completed orders. See Track WooCommerce checkout conversions.
  • Any other platform: yes, add the script below.

Not doing this yourself?

Adding the script needs someone who can edit your checkout templates. Copy this email, fill in the parts in brackets and send it to your developer:

📧 Email template
Subject: Add the bluebarry performance tracking script
Hi [NAME],

We use bluebarry for product quizzes on our store. To see how much revenue the quizzes bring in, bluebarry needs a small script on our order confirmation (thank you) page.

What needs to happen:

1. Add the bluebarry performance script to the order confirmation page.
2. Fill the example values in the script with the real order data: order ID, currency, totals and the ordered items.
3. Make sure it only runs after a successful order, and place a test order through a live quiz to check it.

Instructions and the script: https://bluebarry.ai/implementing-performance-tracking-script/

Our bluebarry tenant ID: [your tenant ID]

Questions? bluebarry support is at [email protected].

Thanks!

[Your name]

Step 1: Copy the performance script

The Implement your scripts section on the Launch tab with the Performance script and its copy button
  1. In the sidebar, go to Quiz funnels → All quizzes and click Edit on any quiz.
  2. Open the Launch tab and scroll to Implement your scripts.
  3. Copy the Performance script. Your tenant ID is already filled in.

Or copy it from here

This is the same script. Replace TENANT_ID_HERE with your tenant ID.

Performance script
<script>
  window.barry = window.barry || {};
  window.barry.tenantId = "TENANT_ID_HERE";

  function bluebarryTrackOrder() {
    barry.trackConversion({
      currencyIso: "EUR", // the currency of the order (3 character ISO code)
      conversionId: "ORDER-12345", // your internal ID of the order (max 64 chars)

      // Order totals
      orderProductTotal: 250.00, // total value of products excluding tax
      orderTaxTotal: 62.50, // total tax amount
      orderGrandTotal: 312.50, // grand total including tax

      items: [  // can be any number of items
        {
          itemId: "PRODUCT-001", // your internal ID/name of the product (max 64 chars)
          quantity: 2, // quantity of this item
          priceExclTax: 100.00, // price per item excluding tax
          priceInclTax: 125.00, // price per item including tax
          taxPercentage: 25.00, // tax percentage (e.g., 25 for 25%)
        },
        {
          itemId: "PRODUCT-002", // another item example
          quantity: 1,
          priceExclTax: 50.00,
          priceInclTax: 62.50,
          taxPercentage: 25.00,
        },
      ],
    });

    // Optional: uncomment and replace with the customer's email
    // barry.identify({
    //   email: "CUSTOMER_EMAIL_HERE",
    // });
  }

  // Uses the bluebarry script when the page already has it, and loads it otherwise.
  if (window.barry.trackConversion) {
    bluebarryTrackOrder();
  } else {
    window.barry.popups = false; // no popups or chat over the order confirmation
    window.barry.chat = false;
    var barryScript = document.createElement('script');
    barryScript.async = true;
    barryScript.src = "https://api.bluebarry.ai/sdk/" + encodeURIComponent(window.barry.tenantId) + "/advisor.js?quiz=true";
    barryScript.onload = bluebarryTrackOrder;
    barryScript.onerror = function () {
      barryScript.onerror = null;
      var fallback = document.createElement('script');
      fallback.async = true;
      fallback.src = "https://cdn.bluebarry.ai/advisor/advisor.js";
      fallback.onload = bluebarryTrackOrder;
      document.head.appendChild(fallback);
    };
    document.head.appendChild(barryScript);
  }
</script>

You find your tenant ID under Integrations in the sidebar, at the top of the page next to Tenant ID:. Click the copy icon.

The top of the Integrations page with the Tenant ID and its copy icon

Step 2: Fill in the real order data

The values in the script are examples. Replace them with the real data from the order, the way your platform provides it on the confirmation page:

  • currencyIso: the order's currency, such as EUR.
  • conversionId: your order number.
  • orderProductTotal, orderTaxTotal and orderGrandTotal: the totals of the order.
  • items: one entry per ordered product, with its ID, quantity, prices and tax percentage.
  • Optional: uncomment the barry.identify part and pass the customer's email. The order then joins that shopper's profile, together with their quiz answers.

Step 3: Add it to your confirmation page

Put the script on the page customers see right after a completed purchase, the thank you page.

  • It should only run after a successful order, not on a failed or cancelled payment.
  • The order data has to be available on the page when the script runs.
  • Is the Funnel script already on that page? Then the performance script uses it. If not, it loads it for you, with popups and product chat turned off so neither opens over the order confirmation.
  • Test it: take a quiz on your live store, click through to a product, and place a test order.

Once it works, the revenue from quiz takers shows up in your quiz analytics. See Understand conversion attribution.

Added the script before? If yours loads conversion.js, replace it with the script above. The older version only counts orders from shoppers who took a quiz, and it doesn't pass experiment details on, so order and revenue goals of search and popup experiments stay at zero. See Fix paused or stuck experiments.

Need a hand?

If you can't get it working, we probably can. Ask us in Discord or email [email protected].

Related articles

Understand conversion attribution

How bluebarry links an order to the quiz before it, how each platform tracks orders, and what to check when conversions are missing.

Read article →

Track Shopify checkout conversions

Learn what the bluebarry Shopify pixel records at checkout, how it links buyers to their profile, how to test it and which consent it needs.

Read article →

Use the JavaScript SDK

Use window.barry to open quizzes, search, chat and popups from your own code, identify visitors, track orders, add to cart and listen to events.

Read article →

Can’t figure it out? We probably can.

Every article here was written by the people who built the product. If one of them still leaves you stuck, tell us and we’ll fix it.

Contact usJoin Discord, free forever
bluebarry.

Helping beauty, health and outdoor brands reach their dream AOV

[email protected]+31 6 57 16 10 87De Ried 10, 9285KK Buitenpost (The Netherlands)
Martijn DoumaStan van RooyAnco PostmaJelmer Reitsma

The guys that are increasing your AOV.

Platform
Quiz funnelsLanding pagesProduct QuizRecommendationsSearchIntegrationsPricing
Resources
CasesHelp centerFAQCompare
Company
Contact usPartners & affiliateReviewsRequest demo
Book a 15 min demo
© 2026 bluebarry. All rights reserved.
Privacy PolicyCookie PolicyTerms & Conditions
English/Nederlands/Deutsch
bluebarry