Condition recipes
Each recipe lists the snippet type and location, then the rules. "AND" means a rule in the same group; "OR group" means a new group. See Conditions for how groups combine.
Only on the live site, never on staging
Keep tracking scripts off staging and local copies.
- Any type, any location
- Environment is Production
Make sure your staging site sets WP_ENVIRONMENT_TYPE to staging in wp-config.php (many hosts do this for you).
A banner for visitors from a campaign
- HTML, After <body> opens (wp_body_open)
- Query parameter
utm_campaignequalssummer-sale
The parameter is only there on the landing page. To keep showing the banner as they browse, add a small JavaScript snippet that sets a cookie on that page, and use Cookie summer_sale exists as an OR group.
A scheduled promotion
- HTML or CSS, front end
- Date range from
2026-11-27 00:00to2026-11-30
The snippet switches itself on and off. It stays switched on in Snipfire the whole time; the rule does the timing.
Opening hours notice
- HTML, Before post content
- Post / page ID is (your contact page) AND Time of day from
18:00to09:00 - OR group: Post / page ID is (your contact page) AND Day of week is Saturday, Sunday
Everywhere except the checkout
- JavaScript, Front end, footer
- Page type is not WooCommerce: cart, WooCommerce: checkout
Only for a section of the site
- CSS, Front end
- URL starts with
/docs/
Free-shipping nudge Pro
- HTML, Before post content or a WooCommerce hook such as
woocommerce_before_cart(use Custom hook…) - Cart subtotal is less than
50AND Items in cart is at least1AND Country isGR,CY
$left = 50 - WC()->cart->get_subtotal();
?>
<p class="free-shipping-nudge">
Add <?php echo wc_price( $left ); ?> more for free shipping.
</p>
The page cache note applies: the cart and checkout are usually not cached, which is where this nudge belongs.
First-time buyer offer Pro
- HTML, Custom hook…
woocommerce_before_checkout_form - Customer's paid orders is less than
1
Guests count as first-time buyers too.
Thank-you page conversion tag
- HTML, Site footer (wp_footer)
- Page type is WooCommerce: order received (thank you)
With Pro, set Cookie consent to Wait for: Marketing so the tag only fires after consent.
Content for one language Pro
- HTML or CSS, front end
- Language is English
Works with WPML and Polylang; without them it checks the site language.
Something unclear or missing? Tell us