Snippet library
WordPress code snippets, ready to use.
707 free & Pro snippets and modules. Copy-paste-ready, or import in one click with SnipCraft.
Meta Pixel WooCommerce Events (AddToCart/Purchase)
Fires Meta Pixel AddToCart (on AJAX add) and Purchase (on order confirmation) events for WooCommerce.
WooCommerce GA4 Add-to-Cart and Checkout Events
Fires GA4 add_to_cart and begin_checkout ecommerce events via server-injected scripts; requires gtag.js on the page.
Track Video Play Events in GA4
Fires GA4 video_play, video_pause, and video_ended events for native HTML5 video elements on the page.
Track Form Submissions as GA4 Events
Fires a GA4 form_submit event on every form submission, capturing form ID, class, and action URL.
Track Scroll Depth as GA4 Events
Fires a GA4 scroll_depth event when the user reaches 25%, 50%, 75%, and 100% of the page.
Google Consent Mode v2 Default Settings
Sets Google Consent Mode v2 default states before any tags fire, denying ad and analytics storage until consent is granted.
Google AdSense Auto Ads Code
Loads the Google AdSense Auto Ads script that automatically places and optimises ad units across your site.
Microsoft Advertising UET Tag
Loads the Microsoft Advertising Universal Event Tracking (UET) tag for Bing Ads conversion tracking.
Reddit Pixel Base Code
Loads the Reddit Pixel base tag and fires a PageVisit event on every page.
X (Twitter) Pixel Base Code
Loads the X (formerly Twitter) Pixel base tag for conversion tracking on all pages.
Snapchat Pixel Base Code
Loads the Snapchat Snap Pixel base tag and fires a PAGE_VIEW event on every page.
Pinterest Tag Base Code
Loads the Pinterest conversion base tag and fires a page-view event on every page.
HubSpot Tracking Code
Loads the HubSpot portal tracking script for analytics and live chat on all pages.
Yandex Metrica Tracking Code
Loads the Yandex Metrica counter tag with click map, link tracking, and accurate bounce measurement.
Matomo Analytics Tracking Code
Loads the Matomo self-hosted analytics tag with page-view and link tracking.
Hotjar Tracking Code
Loads the Hotjar behavior-analytics tag for heatmaps, recordings, and surveys.
Microsoft Clarity Tracking Code
Loads the Microsoft Clarity heatmap and session-recording tag on every page.
Change the Place Order Button Text
Replaces the default 'Place order' label on the WooCommerce checkout submit button with a custom string.
Bulk Delete Orders Tool
Adds a 'Delete Permanently' bulk action to the WooCommerce admin orders screen, supporting both legacy post-based and HPOS order storage.
Add an Empty Cart Button
Adds a nonce-protected 'Empty Cart' button to the WooCommerce cart page so customers can clear all items in one click.
Add a Custom Product Information Tab
Appends an extra 'More Information' tab to the WooCommerce single-product tab row, populated from a custom product meta field.
Hide Specific Categories from the Shop Loop
Excludes one or more product category slugs from the WooCommerce shop, archive, and search loops while keeping individual category pages accessible.
Add a Products Column to the Admin Orders List
Inserts a 'Products' column into the WooCommerce orders list screen showing each order's item names and quantities at a glance.
Register a Custom Flat-Rate Shipping Method
Defines a code-based WooCommerce shipping method with a configurable title and fixed cost, assignable to shipping zones.