How can I A/B test my Nudges?

Adding Nudges to your website can increase your conversion rate by up to 15%. To measure exactly how much they help your business, you can run an A/B test.

While Nudgify doesn’t have a built-in testing tool, you can easily use third-party A/B testing software. Below, we explain three ways to test your Nudges using Google Optimize.

Option 1: Nudges vs. No Nudges

Use this option to see the total impact of Nudgify. You will show Nudges to half of your visitors (the "Variant") and no Nudges to the other half (the "Original").

How to set it up:

  1. Remove the Nudgify Pixel from your website’s regular code.
  2. In the Google Optimize editor, click the code icon < > in the top right.
  3. Select Global JavaScript.
  4. Paste your Nudgify Pixel into the box.
  5. Important: Remove the <script>     and </script>     tags from the beginning and end of the code.
  6. Click Apply.

Now, Nudgify will only load for visitors in the "Variant" group.

Option 2: Test Different Nudge Combinations (Stream 1 vs. Stream 2)

This is great for testing which types of Nudges work best—for example, comparing "Purchase Nudges" against "Review Nudges."

How to set it up:

  1. In Nudgify, create two Streams with the same targeting rules (e.g., both targeting your Home Page). Name them "Home Page Original" and "Home Page Variant."
  2. Add the specific Nudges you want to test to each Stream.
  3. In the Google Optimize editor, click the code icon < > and select Global JavaScript.
  4. Paste the following code:

    JavaScript

window.nudgify = window.nudgify || {};

window.nudgify.bootOptions = window.nudgify.bootOptions || {streamOverride: 11233};
  1. Replace 11233    with the ID of your "Variant" Stream. (You can find this ID in the URL bar when editing your Stream in Nudgify).


Google Optimize will now "force" the Variant Stream to show for your test group, while everyone else sees the Original.

Option 3: Hide Specific Nudge Types

Use this if you want to keep your Stream active but hide one specific type of Nudge (like a "Low Stock" Nudge) for half of your visitors.

How to set it up:

  1. In the Google Optimize editor, click the code icon < > and select CSS.
  2. Paste the following code into the box:

    CSS


.toast-nudge-type-purchase {
  display: none !important;
}

(This example hides the Purchase Nudge. To hide others, replace purchase with the keyword from the list below.)

Nudge Keywords for CSS:

  • Visitor: visitor     (or visitors     for All Visitors)
  • Reviews: review     (or reviews     for Ratings)
  • Sign-ups: conversion     (or conversions    )
  • Purchases: purchase     (or purchases    )
  • Tickets: event_purchase    
  • Stock: stock_level     or selling_out    
  • Shipping: free_delivery     or delivery_date    

How can I A/B test my Nudges on Shopify?

Because Shopify manages app scripts automatically, typical JavaScript testing won't work. The only way to A/B test Nudges on Shopify is by hiding them via CSS.

To hide all Nudges for your "Variant" group on Shopify, add this CSS in Google Optimize:

CSS

.ve-container-box, #ve-plugins-container-topLeft, #ve-plugins-container-topRight, #ve-plugins-container-bottomLeft, #ve-plugins-container-bottomRight {
     display:none !important;
}