Setting up shipping threshold tests can be very technical, requiring thorough QA and monitoring to ensure tests are set up correctly. Therefore, we suggest working closely with a team of developers or upgrading to our Pro plan before launching a test on shipping thresholds.
Testing different free shipping thresholds requires passing test assignment data through to checkout. Here's the recommended approach:
1
Step 1: Create a JS API Test in Shoplift
Set up a new JS API test. This will generate two HypothesisIDs (one for each variant) that you will need to reference in your theme and checkout logic.
2
Step 2: Expose HypothesisIDs as Cart Attributes
Store the assigned HypothesisID as a cart attribute. This ensures the visitor's test assignment persists through to checkout, where shipping rates are determined.
3
Step 3: Create Shipping Methods in Shopify
Configure two separate shipping methods in Shopify, each corresponding to one of your test variants (e.g., free shipping at $50 vs. free shipping at $75).
4
Step 4: Implement Assignment Logic
You have two options:
Recommended: Shopify Function Write a Shopify Function that reads the cart attribute and returns the corresponding shipping rate at checkout. This approach is cleaner and more stable for checkout-level control.
Alternative: Theme Logic Implement similar logic directly in the theme (can do this with JS API or theme tests). This works but offers less reliable control at the checkout stage.